A Simple Page Turner

I’m not really sure the world needs another page turning application. The Internet Archive already has a pretty good open source one here that has some great features and is fairly simple to use.   There’s also METS navigator from Indiana University.  Still, when project co-PI Dot Porter recently tweeted to ask for a simple, no frills page turner with no server dependencies for a TEI project she was working on, few tweeps tweeted back.   So, in case anyone finds a very simple TEI-centric page turner useful, I’ve written one and uploaded it here.

Unzip the file and you’ll find, in the root directory, a file called “config.js”

If you open it in a text editor (TextWrangler for Mac or Notepad++ for Windows are favorites) , you’ll find a JSON object with a bunch of parameters.   If you use the HTML provided in the zip file, you will only need to modify the value of  “imageFile” to point to the TEI file that lists your images and the imagePath to point to the directory where the images live (if that information is already in the TEI file, just change this parameter to an empty string (“”).

Note that the code that builds the list of images is in “getImages.js.”  This code assumes a TEI document with images listed in the “url” attribute of the “graphic” tag.  If you don’t want to use TEI and you’re fairly comfortable with jQuery you can simply replace the code in this function to generate the image list in a different way.

You can see the code in action here.

Download: PageTurner.zip

This entry was posted in Uncategorized. Bookmark the permalink. Both comments and trackbacks are currently closed.

3 Comments

  1. Dot
    Posted September 27, 2010 at 11:37 am | Permalink

    Doug, would it be difficult to add a facility whereby you could see what page/folio you are on at any time, and an option to “go to” any given page?

  2. nkelber
    Posted November 4, 2010 at 9:28 pm | Permalink

    Awesome. Nice work Doug!

  3. Posted February 22, 2011 at 5:06 am | Permalink

    Awesome! Great work, thanks.