Curator is a powerful script that allows one to generate web page image galleries with the intent of displaying photographic images on the Web, or for a CD-ROM presentation or archiving.
It generates static web pages only - no special configuration or running scripts are required on the server. The script supports many file formats, hierarchical directories, thumbnail generation and update, per-image description file with any attributes, and 'tracks' of images spanning multiple directories.
The templates consist of HTML with embedded Python. Running this script only requires a recent Python interpreter and the ImageMagick tools. If you've been looking for a simple yet very powerful script to do this task you've come to the right place.
There are many other worthy similar systems on the web. It seems everyone and their sister has been writing an image gallery generation script these days. Why did I write my own, mind you ask? Most of the existing ones required server customizations (PHP, cgi scripts) and thus will not work off of an archive CDROM, or required some annoying installation of some special image manipulation packages, or didn't support templating. Besides, I really wanted the tracks feature, and when I started diddling a prototype for the embedded Python execution within the template HTML, I thought it was so cool, I just had to do it.
Another way to view the services that this script provides is this:
You could probably easily retarget it to some other application (e.g. viewing hierarchies of animations, text files, mp3's, etc.).
This script was written with the following requirements/goals/features:
on the client side: nothing more should be required than a web browser to use it;
on the server side: the web pages should be statically generated (no need for special server configuration, no cgi, no PHP, no Zope, no nonsense, just HTML);
all links are relative links (i.e. it should work when burned on a CDROM or moved);
the output HTML should be templated/themeable (i.e. the user can change the look of the output HTML). In fact, the templates themselves are written with embedded Python code in the HTML, the possibilities are endless;
each photograph can have arbitrary attributes associated to it, in a per-image attributes file. The script simply makes these available to the template code to take advantage of. For example, this is how you can include photo description, EXIF camera settings, or any other user-define attribute (just write a template that uses those);
thumbnails should be generated automatically, the thumbnails reside alongside the photos themselves;
can be created to fill in variables in the templates (e.g. title, description, camera settings, other);
tracks of images, independent (and across) of directories can be generated using the attributes file. The script compiles these list of images and they're available to the templates. This could be used, for example, to links are your "people", or "black and white" images together, each photograph can be part of one or more tracks;
a global, per-track and per-directory index page should be generated;
it should be simple to use (it should be able to work with a simple hierarchy of image files, with a trivial invocation, try it now, if it don't work, I've failed);
we're not assuming that the names of the files are unique across the hierarchy (for digital camera images);
supports many file formats;
it should be trivial to install, and portable (i.e. should not use more than what is available in base installs of most linux distributions). In this respect, thus this script only depends on the availability of:
- Python, version 2 or more;
- ImageMagick tools;
There is no special library to install, no special tools, nothing. Download and run. This runs on a default redhat install. There is a switch for supporting old versions of the ImageMagick tools.
Note
Note that curator does not resize the large digital camera images to a viewable size automatically. We have planned a redesign which will allow to integrate this feature elegantly and generically.
This program packages Gene Cash's EXIF.py library.
Running the script with the default templates should be as easy as cd'ing in the root of the image hierarchy and typing curator.
Run curator --help for command line interface options, description of the required inputs and of what the script generates.
One of the most important "features" of curator is that it does not depend on much to run or to view the pages.
curator will run under any platform that has a Python2 (or more) interpreter and the ImageMagick tools. It has been tested under Linux and IRIX. curator is known to have worked under Windows using the PIL (tested on 2003-11).
Contributions from other people can be found here.
Copyright (C) 2001-2004 Martin Blais. All Rights Reserved.
This code is distributed under the GNU General Public License;
Martin Blais <blais@furius.ca>