mkphotodir: Turn a directory of photos into a web page

Overview

I use a digital camera to collect pictures. After I am back, I dump these photos into a directory, delete the ones which didn't turn out, turn the rest of the photos into a web page using this program, and then go back to annotate the web page so others can make sense of the photos.

Each of the photos is converted to two additional formats. The first is small enough so that all can be on a single web page. The second is a reasonable size to fill a browser screen, wrapped in enough of an HTML page to allow the user to go back and forth through the mid-sized images. In addition, any HTML text in the same file name, but with a .wh file type is placed into this page. The original photo is kept as an image which hopefully has enough resolution to be used for printing.

See the test page for a quick example of the raw page before annotation.


Getting started

In order to use this program, you need a few prerequisites:

This program looks for a number of files starting with the current directory, and working it's way up the directory tree. At each level it also looks in Include and image subdirectories. If not in any directory there, the program also searches the /etc/mkphotodir directory. In this way, you can put the common files in some appropriate place in your web tree, and then if you need a specialized version, can place that version closer to the specific application.

The files which are deal with in this fashion are:

To install this program, install all of the prerequisite packages first. Then type "make install" to install the files in standard place. Check the Makefile to ensure that these files will go where you want. At that point, you can go into a directory with a set of images and type mkphotodir and come out with a web page.

Note that any local changes you have made to the files in /etc/mkphotodir/ will not be over written. Pay attention to see if there were differences noted, and if so decide how you want to deal with those differences.

If the file head.wh2 exists in the current directory, it is included after the title is generated. In a similar fashion, if the file tail.wh2 exists in the current directory, it is included just before the end of the web page. These files allow a certain amount of application specific HTML to be included into your web page.

This program normally operates on all of the *.gif and *.jpg files it finds in the current directory, in sorted order. However, if the file photo.list exists in the current directory, it is assumed to have image filenames, one to a line, in the order that the user thinks is important.

As the individual pages are created for each photo, the program looks for a file with the same stem as the image file, but with an extension of .wh. If found, this file is included into the web page.


Command line options

This program understands a number of command line options. These options are specified at five different levels, to allow you to control default values.

This program understands a number of options:


Obtaining the current version (v0.12)

You can get the full package for this program. In order to use this, you will need a copy of tar and gzip.