5

I have been using f-spot for a few years to manage my photo archive, which is about 50K images at the moment. With the development of f-spot slowing down in the recent years and me switching to KDE, I'm looking at using DigiKam, which seems to be very nice and packed with features beyond my wildest hopes :)

One thing I'm missing though is the way f-spot was importing the images: it was creating subdirectories based on the image's shooting date:

$HOME/Photos/2011/11/12/IMG_1234.jpg
$HOME/Photos/2011/11/13/IMG_1235.jpg
$HOME/Photos/2011/11/13/IMG_1236.jpg

I don't seem to be able to find a way to make DigiKam to behave like this - although it has some settings to change the image filename according to some mask which may include shooting date, I see no way to tell it to create sub-directories. (Update - as user26687 pointed out, there is a way to create subdirectories like Photos/2011-11-13, but still I can find no way to create separate subdirectories for year, month and day)

Is there a way to make DigiKam to behave like this? Or, alternatively, what is a good program to import images from a camera and save them on disk in subdirectories according to their shooting date?

1

2 Answers 2

8

digiKam

Offline docs: K > Applications > Help > Application Manuals > Graphics > digiKam

digiKam > Using digiKam > Using a Digital Camera With digiKam > Automatic Destination Albums Creation

Online docs: http://docs.kde.org/development/en/extragear-graphics/digikam/using-camera.html

If your camera provides information about the date of the photograph's taking, digiKam can use this to automatically create subalbums in the destination Album when it is downloaded...

Plug in a device. The digiKam import window has the settings for the "Auto Creation of Albums"

enter image description here

In recent versions of digiKam you can create multiple levels of sub-albums by using / in a custom date format:

auto-create sub-albums with date format "yyyy/MM/dd"


It seems that older versions of digiKam are limited to only one level automatic sub directories, so here is an alternative way:

A workaround is to use the [ExifTool] (http://www.sno.phy.queensu.ca/~phil/exiftool/#filename) ("Renaming and/or Moving Files"):

For example, the following command moves all images originally in directory "DIR" into a directory hierarchy organized by year/month/day:

  exiftool "-Directory<DateTimeOriginal" -d "%Y/%m/%d" DIR

ExifTool ubuntu package: libimage-exiftool-perl.

The easy way is to download the images to the main directory and move the pictures with the ExifTool. There is also an option to add a KDE device action.

An Example with the KDE/Kubuntu

The KDE has editable device/solid actions:

The KDE has a GUI to add/edit the device actions: System Settings > Device Actions.

A quick way with the commandline:

  1. Create the local action directory:

    mkdir -p ~/.kde/share/apps/solid/actions/
    
  2. Copy the digiKam action to work as a template:

    cp /usr/share/kde4/apps/solid/actions/digikam-opencamera.desktop ~/.kde/share/apps/solid/actions/movewithexiftools.desktop
    
  3. Edit the new action ~/.kde/share/apps/solid/actions/movewithexiftools.desktop to:

    [Desktop Entry]
    X-KDE-Solid-Predicate=[ [ StorageVolume.ignored == false AND StorageVolume.usage == 'FileSystem' ] OR Camera.supportedDrivers == 'gphoto' ]
    Type=Service
    Actions=open;
    
    [Desktop Action open]
    # %f gives StorageAccess.filePath, %d gives Block.device, %i gives UDI
    Exec=konsole --workdir ~/Pictures --noclose -e exiftool "-Directory<DateTimeOriginal" -d "%Y/%m/%%d" "%f"
    Icon=camera-photo
    Name=Move with the ExifTool
    
  4. Reboot

Testing with few pictures

Now there is a new option: Move with the ExifTool.

enter image description here

The Device Action is showing the success/failure with the terminal:

enter image description here

The sub directories have the /YYYY/MM/DD format

enter image description here

Working at here may or may not work there.

5
  • Thanks for pointing this out, however, the feature does not quite work as I would like: it seems to only be possible to create a single level of sub-folders, i.e. Photos/2011-11-20. I tried creating a custom format "yyyy/MM/dd", but it says "Album name cannot contain /"
    – Sergey
    Nov 20, 2011 at 11:34
  • Thanks for the update, I somehow missed it. I'll try to follow your instructions and will report back
    – Sergey
    Dec 30, 2011 at 8:40
  • After another reading I realized that the updated recipe will only work for cameras in "mass storage mode", or for a card-reader... guess I finally need to get a card-reader...
    – Sergey
    Dec 30, 2011 at 20:45
  • Thanks for the alternative/exiftool version. I keep being amazed at what exiftool can do. Dec 1, 2012 at 20:52
  • 3
    Looks like 2020 Digikam already allows multilevel album creation, so no workaround is needed. Just set format to something like 'yyyy/M/dd' and it will create subalbums as needed.
    – jesjimher
    Aug 25, 2020 at 11:53
2

You can use Rapid Photo Downloader and create whatever directory structure you like using a GUI. Be aware, however, that it works better when you use a memory card reader.

3
  • The application looks awesome, however, it doesn't see my camera (which, as I understand, uses PTP mode, i.e. it's not mounted as a storage device). The note on the site is a bit confusing - "You may find that if you can set your camera to PTP mode, it will work better—it will be recognized as an external drive by Linux." - my understanding is that PTP mode is the opposite of "mass storage device" mode, so the camera won't bee seen as an external drive while in PTP mode
    – Sergey
    Dec 30, 2011 at 8:37
  • The quickest and easiest way is to use a card reader. Works every time, and is much less hassle. Dec 31, 2011 at 7:12
  • Ok, with a card-reader it works wonderfully. Accepting the answer, thanks
    – Sergey
    Jan 5, 2012 at 12:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .