Sunday, May 11, 2008

Redoing my photo gallery

I have, for some years now, maintained an online gallery of my photographs on dip.

It has, for most of it's existence, been maintained by a rather complex and fragile set of shell scripts, so , with the recent spate of long weekends, I finally got around to replacing them with some more maintainable python code. This, after poking at the problem off and on for the last two weeks, reached a point that I started moving my gallery over to this on Friday. While the code is not bug-free yet [1], it works pretty well.

Why write yet another gallery generator, though?
  1. Why not? With python's tools, most of the heavy lifting can be passed off to PIL and elementtree, and it's just the file parsing that needs attention.
  2. Most existing packages are trying to solve a different problem, namely managing the gallery entirely through a web browser. I don't need to do that, and so focus on creating static pages offline.
  3. I'd have to write a tool to import the existing image annotations into whatever gallery I use.
  4. I've wanted to experiment with git for a while, so this project also gave me an opportunity to poke around at that.
Version 0.1 is available from at the moment, but I'll probably be rolling a version 0.2 with several recent bug fixes (see [1]) soon. Then it's time to look at adding an RSS feed generator.

[1] For instance, I had to fix a memory issue this evening. Keeping references to 100 odd 2592x1944 images after PIL's loaded them completely is not the brightest thing I've ever done.

No comments: