Monday 24 August 2009

Creating a Picture Gallery

I have a terrible memory so I take a lot of pictures. I've been uploading these since about the year n. I was using Fotopic which has served me well. I pay for the premium service.

I've found that it has become a bit slow of late and also that the tedious process of uploading files the sorting them on a remote site, adding captions etc was slowing me down. I'm now over a year behind. And I'd run out of space.

So I dedicated some effort to sorting the problem. I have two virtual servers with Bytemark (who rock) so I cleared my obsessive number of backups of backups off the machines and that left me with gigs of space to store my piccies.

My initial thought was to put Gallery (or Gallery 2 ... and then it gets a bit confusing as Gallery 2 seems to have been missed in an Debian release) on the server and then get it to automatically add the photos. But this didn't really address one of my ideals which was to be able to sort and caption offline.

Plan 2, which I started to implement was to have Gallery on my lovely newish (but scratched) Acer Netbook. This was okay. There was a bit of a drain having apache/gallery2 and mysql running on it but it seemed to work. The tedious bit was all the syncing and dumping of databases etc. And for what? I gained all the cool features of Gallery but most were useless cos the remote database where people could comment etc would get wiped as I uploaded. Also I wasn't trying to create a community, I just wanted to show my friends the photos they were in.

So backpedal a bit and have a look around. Finally found llgal. It totally rules. Configurable in all ways. Just generates a static site from the pictures and a captions file. So I can write the captions in a something useful like vi, manage the pictures with gthumb, run llgal to generate it and then a simple directory traversal script finds anything that has a directory called 'Remote' in it and uploads it to the server.

I added a bit to make my own index page but I'm fussy like that.