Posts Tagged ‘programming’

Revision Control Revision

Monday, June 1st, 2009

I’ve been using CVS for revision control for quite some time for a number of different things here, not the least of which being a public repository of scripts and miscellany that I have tossed into the Internet for public consumption. Recently I have started to feel the desire to change to one of the newer version control systems out there. Git and Hg smell a lot of ‘ooh shiny’ syndrome and we use Subversion at work so I was sort of naturally drawn towards Bazaar. It doesn’t help that I’m a huge fan of Canonical and Ubuntu, and as that seems to be the VCS du jour over there these days I figured that this would give me a good excuse to learn it.

The moral of this story as I’m sure no one cares why I chose which VCS is to say that any of the code hosted on my CVSweb and linked to in one of my previous posts is likely to have moved to the new loggerhead interface over at repo.ub3rgeek.net. If you happen to follow me on FriendFeed or watch the home page here, you will see updates from my bazaar commits as they happen.

Fancy, eh?

Processing my digital photos

Sunday, December 21st, 2008

I’ve finally gotten to the point where I HAD to do something about my digital photos. The ~/Photos/lumix folder has over 1100 images in it and it’s just painful loading it up anymore. Nautilus takes like 45 seconds just loading the thumbnails for the folder during which time the scroll bar is jumping all over the place making navigation impossible.

So here is how I finally made this work out in a really manageable way.
1) I wrote a Python script image-process.py that moves the image file to a place in the format of CCYY/MM_Month/CCYY-MM-DD_HH-MM-SS_Exif Make-Exif_Model.jpg, so a photo from my Panasonic Lumix called P1020411.JPG gets moved to 2008/12_December/2008-12-21_19-08-17_Panasonic-DMC-FZ7.jpg

2) Setup Gnome to run my script upon mounting of a device:
Under Ubuntu, navigate to System -> Preferences -> Removable Drives and Media then under the Digital Camera section I enabled “Import digital photographs when connected” and pointed the Command to my script using the %m macro and my script’s -d flag. This passes the location that Gnome mounted my camera at to my script as a directory and lets it do the rest.

3) My laptop is backed up periodically to an external hard drive, so all my photos are more or less safe, barring a catastrophic failure of both my laptop’s hard drive and the external drive.

I am hoping to get bbtrack working on my BlackBerry so I can save GPS tracks, then using the Exif Capture Date and the GPS track my image-process.py can geolocate the photos automatically. I’m sure I will post an update if I ever get that working.

I’d be interested to hear how other people solve this particular problem. Also any suggestions of a decent photo viewing application for Gnome that I can point at my directory hierarchy, that won’t go through and try to move the photos into it’s own crap like F-Spot does?