ubuntu-photographers team mailing list archive
-
ubuntu-photographers team
-
Mailing list archive
-
Message #00031
Re: script to sort out a bunch of photographs!
On 6 April 2010 11:31, louis taylor <louis@xxxxxxxxxxxxx> wrote:
> Hello there everyone on the mailing list!
>
> I am writing here to ask the guidance of the ubuntu photographers about a
> small problem I have.
> I have about 3000 photographs (taken by about 6 different cameras) in a
> filesystem with not too much order (photographs placed in a jumble of
> directorys).
> I would like to put these in a neat filesystem with all of the photographs
> taken in 2009 in the folder '2009', with the photographs in this subdivided
> into folders orded by the month, with these divided into the weeks.
>
> I could write a script to do this for me (by reading the metadata) in
> python, and I was wondering if:
> a) someone has made something like this before.
I'm sure someone has - I've started many times but never finished
because it's not something that I really needed (I already organised
stuff by date, so most of my scripts worked by munging directory
names).
> b) this would be useful for any ubuntu photographer.
Almost certainly. I know I'd use it on my older, non-date-sorted image archives.
> c) there is something that I haven't thought of which makes this whole thing
> quite difficult.
I don't think so. What you need is a Python library that can read EXIF
tags from images. That plus datetime.strptime() and you're away. I
know there are Python EXIF libraries out there (ISTR that the PIL
supports reading EXIF, but don't quote me); it's just a case of
finding one that suits your cause best.
But on the whole, go for it! I'd love to have something like this available.
--
Graham Binns | PGP Key: EC66FA7D
Follow ups
References