main - code

photoname

about

photoname is a command-line utility for renaming/moving photo image files. The new folder location and naming are determined by two things: the photo shoot date information contained within the file's EXIF tags and the usually-camera-assigned serial number, often appearing in the filename.

photoname is written in Haskell. It's known to build under GHC 6.12.1 and 6.10.4 on systems where System.Posix (unix) packages are available. It did at one time build under GHC 6.8.3 but this hasn't been confirmed for some time. Bjorn Bringert's libexif binding library is required to build this software.

The path calculation scheme used here is admittedly specific to my needs. I welcome suggestions discussing, or patches allowing, more flexibility.

news

2010-01-25 (v2.3.0)
2009-06-07 (v2.2)
2009-04-18
2009-01-23
2008-10-11 (v2.1)
2008-03-20
Debian binary package of v2.0 available for AMD 64-bit thanks to generous packaging work from Magnus Therning
2008-03-05 (v2.0)
2007-09-14
Debian binary package of v003 now available for AMD 64-bit thanks to generous patch and packaging work from Magnus Therning
2007-09-13 (v003)
Repairs for a build problem with GHC > 6.6 specifically related to depending on FilePath instead of filepath and now requiring import of Data.Time.Format
2007-04-28 (v002)
Initial release

documentation

photoname's --help usage information:

Usage: photoname [OPTIONS] PARENTDIR FILES
Rename and move photo files based on EXIF data

Options:
  -n  --no-action  Display what would be done, but do nothing
  -q  --quiet      Suppress normal output of what's being done
      --move       Move the files, don't just hard-link to the new locations
  -h  --help       This help text

This software is for renaming and storing your digital photos. It
will extract shoot date from the EXIF data in the image file and use
that along with the usually-camera-assigned serial number to build a
meaningful filename.

You get a subdirectory hierarchy consisting of directories for the years,
then subdirs within those for the day photos were shot. These day dirs
contain the image files, renamed as follows:

A photo shot on 2002-May-02 with a Canon camera:
   img_1790.jpg -> <PARENTDIR>/2002/2002-05-02/20020502_790.jpg

The code is basically looking for three digits before the file extension
to use as a 'serial' number for the day's photos. This is a seemingly
common occurrance with cameras that we can pick numbers off the end of
the filename, or at least I hope that's the case. Examples of the two
that I have:

                    vvv (use these digits)
   Panasonic:  P###0###.jpg
   Canon:      img_####.jpg
                    ^^^
The <PARENTDIR> is the one given on the command-line to this
utility, and represents the top-level of where you're storing photos.

Note that the default behavior of this software is to create hard links to
the new paths and leave the original links as they were. You can use the
--move switch to blow away the original location, leaving only the new.

Version 2.3.0  2010-Jan-17  Dino Morelli <dino@ui3.info>

getting it

older



last modified 2010-01-25