Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
add comment

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
    
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 '11 at 8:37
    
The quickest and easiest way is to use a card reader. Works every time, and is much less hassle. –  Damon Lynch Dec 31 '11 at 7:12
    
Ok, with a card-reader it works wonderfully. Accepting the answer, thanks –  Sergey Jan 5 '12 at 12:07
add comment

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

--- Edit - an alternative way ---

It seems that the digiKam is limited to only one level automatic sub directories.

An earlier question from the digiKam user (https://mail.kde.org/mailman/listinfo/digikam-users) mailing list, september 2010 (http://mail.kde.org/pipermail/digikam-users/2010-September/011048.html).

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) Making the local action directory:

mkdir -p ~/.kde/share/apps/solid/actions/

2) copying 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) Editing the new action, after the edit ~/.kde/share/apps/solid/actions/movewithexiftools.desktop:

[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.

share|improve this answer
    
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 '11 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 '11 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 '11 at 20:45
    
Thanks for the alternative/exiftool version. I keep being amazed at what exiftool can do. –  Savanni D'Gerinel Dec 1 '12 at 20:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.