I've written up a little script (gallery.py) to generate HTML
galleries of my pictures. There are tons of scripts to do this, but
this one's mine ;). It uses ImageMagick's mogrify to generate
thumbnails and supports per-picture captions via similarly named
caption files (e.g. some-pic.jpg.txt
contains the caption for
some-pic.jpg
).
You'll probably want to tweak the script to create appropriate header or footer code for your particular site. Perhaps I'll convert the script to use jinja2 in the future.
The original script generated static HTML inside the image direcories. This worked fine, but I don't run a high-traffic site, so keeping the gallery up to date was more trouble than it was worth. I've upgraded my script (versions >0.4) to run via CGI. Versions >0.5 can optionally run via SCGI. Now the gallery updates itself on the fly when I add new pictures.