Contact Information Andrew Harrington Loyola University Chicago Computer Science Department 820 N. Michigan Ave. Chicago, IL 60611 anh@cs.luc.edu 312-915-7982
Basis of a Lightning talk at PyCon 2005
Even a new user of a program may end up doing repetitive actions, and common GUI interfaces can be tedious to navigate repeatedly. The author uses photo gallery software as an example, comparing existing tools and a program he has written that uses a simple text file to help the user's productivity.
After the author attends an event and takes many digital pictures, he wanted to be able to process them all quickly, creating a static web gallery with meaningful names for the pictures and with optional comments, and rotating pictures as necessary. A quick web search showed a variety of tools with GUI interfaces that required many mouse interactions beyond what was necessary to process the desired information. The author wrote a Python application to generate a thumbnail index and individual pages for images with their titles and comments.
For the user, the central feature is a simple plaintext file. The program, using the only information known originally, the initial image file names in the source directory, creates the original version of this file. The user can view the bare gallery associated with this information while adding optional annotations to the file: title and introductory comments for the whole gallery, title and comments for individual images. Also simple rotation instructions may be entered by placing '>' or '<' after a file name.
When the program processes the text file, the default behavior is to change each current file name (initially a meaningless number generated by the camera) to a name based on the title (filtered to replace blanks and punctuation). Since the text file is not only a description of static data to keep (titles and comments) but also changes to make (rotations and file name changes), the text file is likely to be out of date as soon as it is applied. Hence the program regenerates the text file to reflect the current situation: removing rotation instructions after images are already rotated, changing file names after the names have been modified in the file system, while keeping any titles and comments.
This allows the user to make further incremental changes in the gallery, going back to the updated text file.
The format of the text file is extremely simple, so even a new user can save time in annotations with a modest number of images to process, using already ingrained text processing techniques. The only special markups are
The following line is taken as a title, and further lines are taken as a comment to be included on the page dedicated to that image.
For example, camera might provide a directory 170035 containing files Pict0001.jpg, Pict0002.jpg, and Pict0003.jpg. If I run the gallery program for that directory, I generate a raw gallery with the original picture names and directory name, and a text file is automatically created containing
170035 ###Pict0001 ###Pict0002 ###Pict0003
While viewing the raw gallery, this text above can easily be edited to be the following.
4th of July We crewed on Schuy's boat for the trip to the 4th of July fireworks. ###Pict0001 Heading Downtown ###Pict0002 > Kate at the Mast Alethea's friend Kate came along. ###Pict0003 Fireworks Oh, well, a boat is not the best place for a time exposure. It was fun!
Making the gallery again makes the directory and file names be based on the new titles, and inserts all the text into the html. The text file is also updated and returned in case further editing is desired:
4th of July We crewed on Schuy's boat for the trip to the 4th of July fireworks. ###Heading_Downtown Heading Downtown ###Kate_at_the_Mast Kate at the Mast Alethea's friend Kate came along. ###Fireworks Fireworks Oh, well, a boat is not the best place for a time exposure. It was fun!
You may view the final gallery.
No special buttons or instructions are needed for common operations: to delete from the gallery - just delete the entry; to reorder the thumbnails, just reorder the entries; easily copy any repetitive comments. All comments are together for easy proofreading.
Writing gallery programs appears to be a popular activity. A long list of freeware alternatives is at http://graphicssoft.about.com/od/webgalleryfreepc/
Many of the packages have an entirely GUI interface with buttons and individual text fields, allowing only one comment to be visible at a time and requiring multiple mouse clicks or tabs to navigate. Some require each individual picture to be manually selected. Some of the interfaces are efficient if only comments are going to be added. For instance JAlbum skips immediately to the comment field for the next picture with just a tab. If title or rotation need to be changed, it is not so efficient.
Several packages do allow titles and comments for multiple images to be stored in a single file. The feature packed Source Forge Gallery project allowed only 10 images to be considered together, and hence still required the specific subset of the images to be explicitly specified. The developers suggested that I submit my approach as a requested feature. Galleroo does work with a text file specifying all titles and comments. None of the programs checked allow easy file name changes and rotations along with comment and title changes.
There are obviously many situations where a traditional GUI interface is useful: where there are many fields to select from and operations are not routinely repeated. On the other hand, many activities involve repeated human interaction on a known collection of objects. Processing a directory full of digital camera images is merely an example. What is easy to follow in a GUI for a few repetitions becomes tedious with more repetitions. Thought needs to be given to making repeated actions efficient. This may be accomplished in many ways. One option, a well-designed text file interface, appears to be underutilized, and may be worth consideration as an option, even though many flashier possibilities are available. It is also important for easy direct user interaction that the file format was custom, without excess markers and syntax to make it fit into some general interface like XML.
The current gallery program and this page are at http://www.cs.luc.edu/~anh/gallery.