I’ve owned my digital camera for about two years now. Needless to say I’ve amassed a large amount of photos in my archives. I’ve tried my best to organize, but haven’t given too much thought into it. Now is the time to start.
I’m talking about the physical organization on my hard drive. Sure, I could download one of those photo programs that claim to do everything, but I’m a simple guy. I don’t need another bulky application. Viewing thumbnails in Windows XP isn’t too shabby anyway. Since the UI is integrated with my OS, I can’t see any third party writing a faster solution. It’s all a big database problem. How do I want to view my photos? By date? By context? By content? These are problems we’ve all had, and most of them are addressed (or will be addressed) by Flickr.
Well, that’s all well and good for the few photos I can upload to their database, but what I need is a sane way to organize my filenames and folders.
Perl to the rescue! I knew that the solution would be simple with a little Perl. But I just never got around to it. Here’s what I did.
First thing’s first. I must decide on a directory structure for all my photos. I logically chose /YYYY/MM/. Seems simple enough. Next, I must choose a file naming convention. I opted for the less USian standard: DD-MM-YY_HHMMSS_description. I never really understood why we used MM-DD-YY. We should say 7th January, 2004 instead of January 7th, 2004. Or at least be consistent and say the reverse. But I digress.
Next, I needed to extract the EXIF information from each JPEG. I was about to write my own when I found jhead, a free command line utility that extracts all the EXIF goodness.
My job at this point is almost done. I just needed to hack some Perl to extract the date and time, and rename my Canon filenames to conform. It’s an easy script (I’m no Perl god myself), and I got it working in short time. If anyone wants some tips just drop a line, and I’ll help as much as possible.
It’s odd looking at such conformed filenames after living with inconsistency. Very serene. Of course, there are millions of things that I’ve left out. One notable item is the file descriptions. Needless to say, I did not hand label every photo. I basically kept the old description that I typed into my Canon utility to download photos in batches. They’re horribly maligned, and need to be hand tagged. However, the effort to do this is too large. Still, it would be quite useful to have all that metadata filled out.
One good way to do it is to catch myself when I’m more apt to name photos. This happens during slideshows. I set my computer’s screen saver to display random photos from my archive. I’d be much more apt to name a photo if it randomly popped up on my screen. It would be perfect if I could just type it in as I’m watching the slide show. Gordon Bell’s My Life Bits project actually implements this (I saw him talk at a NASA lecture). It’s a great idea, and I hope it catches on with the mainstream. Metadata is extremely useful, but humans are lazy and stupid. The future should be aimed at easy going metadata entry.
