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?

Sergey
  • 44,353

2 Answers2

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.

luator
  • 235
  • 3
  • 15
user26687
  • 15,174
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.