About Archive Tags RSS Feed

 

I am the edge!

23 June 2010 21:50

Over the past few years I've amassed a collection of a few thousand images taken with a succession of digital cameras.

I'm pretty good at organising images, in a directory hierarchy which makes sense to me, in a few simple and broad categories:

skx@birthday:~$ tree -L 1 ~/Images/
/home/skx/Images/
|-- Misc
|-- Parties
|-- People
|-- Pets & Animals
`-- Travel

Beneath ~/Images/People, for example, I have subdirectories for specific individuals (or a "Debian/" folder for Debian-people who've been snapped but don't warrant their own folder.)

~/Images/Travel has things like Travel/Local/2010, Travel/Vienna/2008, etc.

In summary I have images of people, places, and things stored beneath what should be a reasonably discoverable directory hierarchy, however this just doesn't work. I still struggle to find images - for example images of myself might be located in ~/Images/People/Self/*, but in practise I'm often included in ~/Images/Travel/* as well.

A few times I've looked at using f-spot, digikam, and similar tools to perform image-organisation (but not editing, or timelines, or anything else. Just organisation). I've found I didn't like being locked into their formats, didn't want them to copy my images to a second location, and other gripes. In the end I've forced myself to come up with a Steve-Specific-Solution. Not for the first time, but I think I have just cause...

I'm now using the User-Comment field in the image's EXIF data to store tags. (When it comes to EXIF data I keep camera-generated fields, but sometimes update/set "Copyright", "Comment", and "Title" fields. So UserComment is one I've never used until now, and thus I run no risk of trashing existing meta-data.)

I've put together a simple perl script, called itag, which will:

  • Index the tag information from all images beneath ~/Images into a DBM file.
  • Show the filenames of all images matching a tag, or tags.
  • Allow me to add tag(s) to an image (which both updates the EXIF data and updates the DBM "cache").

This is enough for me to be able to see all images of "Edinburgh", via:

~$ qiv --fullscreen --slide --delay 5 $(itag --search=edinburgh)

Similarly I could find myself:

~$ itag --search=steve --search=people

I'm not sure it is useful to others, mostly on the basis that people probably fall into their own routine when it comes to filing, and I suspect that people with vast collections of images will just get annoyed by the obscenely slow indexing process I've got. (Hint: run "exiftool" on every /.jpe?g$/i file..)

Still its a simple enough idea and I think it should scale in the future - I can even see myself writing a wee GUI to do tag exploration and similar. Just not today.

ObFilm:Aeon Flux

ObRandom: Apologies for people waiting on email - it's been that kind of week.

| 9 comments

 

Comments on this entry

icon Andreas at 21:21 on 23 June 2010

Folder > Year>Month
Then tag every image with, parties, self, friends, places.
Nice way to remember stuff that THAT year and such. And its simple to see if you are missing a folder in 2005,2006,2007, and you know every "year folder" should hold at least 12 folders. Easy to see if something went wrong during backup etc.

icon Kjetil at 21:44 on 23 June 2010

This script sounds real useful. I've been pondering for ages how to get images tagged and such stuff. At the moment i'm simply storing things, similar to Andreas, in dated directories.

Hope to see itag in your software repo eventually :)

icon rvdnberg at 01:33 on 24 June 2010

To me there's only one way that works when organising years and years of photo's: only time is an objective criterion, all other categorisation is subjective.

2006-12-christmas
2009-05
2009-05-06-birthday
2009-06-summer_holiday
2010-01
2010-01-01-newyear
2010-02

icon Joey Hess at 01:52 on 24 June 2010

A recent LWN thread suggested that digikam can also use EXIF info for tagging done in it. It would probably be good to use the same EXIF field in the same way as it does, and turn that into an interoperable standard.

icon Steve Kemp at 06:06 on 24 June 2010

@Kjetil - you can find a quick copy of the script itag homepage.

@Joey - I'll have to investigate how digikam works, and see if I can adopt their storage mechanism. Interoperability would be nice.

icon Francesco at 08:12 on 24 June 2010

Thanks, this script seems to be very useful. I would second Joey: Digikam can also index images using the UserComment EXIF tag (although it is probably more complex than you solution since it can synchronize EXIF/IPTC/whatever tags)

I have actually been organizing my pictures in a way very similar to what you describe. For me, the main issue was not searching through tags, but rather tagging pictures. Exiftool is very nice but tagging pictures on the command line is very tedious. On the other side, Digikam's interface is often way more complex than it would have to be to simply tag pictures...

icon Steve Kemp at 22:10 on 24 June 2010

@Francesco : I've now added a simple GUI tagger which is built around Gtk and Perl.

While it isn't too flexible it does work nicely enough for my needs..


icon sr at 06:20 on 25 June 2010

Thanks for itag!
(Completely agree with "locked into their formats", worse, some even change (meta)data without your consent!)

Did you look at mapivi (esp. IPTC aspects)?
Did you consider filesystem user extended attributes?

icon Steve Kemp at 09:10 on 25 June 2010

Using file-system attributes is tempting, but ultimately non-portable, so I didn't really consider it.

I've used mapivi in the past and didn't like it; which is a shame because objectively it seems that it is very close to what I'd want.