1. When importing photos into DigiKam, I want them to be renamed based on the ISO8601 datetime they were taken, ideally to millisecond precision to avoid conflicts when multiple images were taken in a single second. This has the nice side-effect that photos from multiple camera sources are guaranteed to be displayed in the correct order when browsing files, which is important and practical for me.

    I started out using this custom file renaming template on import:

    [date:"yyyy-MM-ddTHHMMss"]-[file]
    

    as DigiKam’s [date] placeholder didn’t have an option for milliseconds, and I couldn‘t find a counter option which could handle my desired “append -# per-collision if this renaming scheme results in collisions”, so ended up just adding the entire camera-generated filename to the end.

    Unfortunately, this led to my files all being in the wrong order, even from the same camera. I haven’t quite figured out why, but it seems that there are several different internal datetime values stored in the image files: file creation date (which is completely wrong), the values used in DigiKam’s [date] templates (which are mostly wrong), and the DateTimeOriginal values stored in Exif data, which are not only correct but provide sub-second resolution too!

    So here’s the DigiKam import naming template which I will be using going forward:

    [meta:Exif.Photo.DateTimeOriginal]{range:1,10}{replace:":","-"}T[meta:Exif.Photo.DateTimeOriginal]{range:12,}{replace:":",""}s[meta:Exif.Photo.SubSecTimeOriginal]
    

    which produces ISO8601-ish filenames like this:

    2023-06-16T143139s922.JPG
    

    Broken down,

    [meta:Exif.Photo.DateTimeOriginal]
    

    evalulates to a string like

    2023:06:16 14:31:39
    

    but I don’t want colons in filenames for portability, so I take only the date part with {range:1,10}, replace the colons with hyphens {replace:":","-"}, add a literal T separator to avoid spaces in filenames, take the time part of the datetime and remove the colons completely, add a literal s separator to delimit seconds and milliseconds as I wanted to keep them separate but not use the typical . delimiter.

  2. Jovian Salak: @BarnabyWalters If I have time, I'll buy my domain from http://t.co/BV6k81mo6r tonight. Any specific 'package'? Then we can begin...

    Jovian Salak just go for the cheapest one. Looking forward to seeing your photos! I did a nice panorama from the office roof a couple of days ago, and have made a fancy way of showing it on the web

  3. Drew McLellan: Pimping out my daughter's new MBP with 16GB RAM. That should make her GCSE Photography project work a bit less tiresome.

    drewm if my recent experience with GCSE photography is anything to go by, an external HD and a knowledge of rsync will be v. useful too :)

  4. Jaisen Mathai: @BarnabyWalters Nope. Everything works off the files in the /base/ directory. A few obscure functions might not work but 99% will w/o orig.

    @jmathai marvellous, I’ll bear that in mind and have a go at moving them elsewhere when things get out of hand