f-spot to digikam conversion howto?

Hi folks,

Since f-spot seems rather unsupported and no longer installed by default in recent
opensuse releases, I am trying to convert my photo archive to digikam. I’m having
a bit of trouble right now, in the sense that, as I understand it, I need to get the
sql db converted over to digikam and such.

I’ve tried to use the python conversion utility from Roland Geider that is available
here: https://bitbucket.org/rolandgeider/f-spot-to-digikam

but end up with errors because of what appear to be problems with getting device
UUIDs. It can’t find or figure out what to do about /org/freedesktop/UDisks, whatever
that is. Contacting him was unsuccessful in the sense that it was some old code
for him, for an old digikam version, and he wasn’t able to answer any recent questions
about it. Sigh.

Anyone have another utility that can be used to do the conversion, that would work
with an opensuse environment?



Maybe show us the errors you get??

Sorry. The errors are below. Some background first. As described in the ‘readme’ information for the
python script, I started up digikam and pointed it at my f-spot Photos directory hierarchy for the photos,
and at the ~/digikam directory I created to store the digikam database. Then the script incantation
goes as follows:

Myprompt: python fspot_to_digikam.py digikam
Checking for F-Spot database file
→ OK
Checking for Digikam database file
→ OK
Making a backup of the Digikam database…
→ OK, the backup file is located at: /home/photos/digikam/digikam4.db-2015-12-27_1109.bak
If there are problems after running this script rename to /home/photos/digikam/digikam4.db
Traceback (most recent call last):
File “fspot_to_digikam.py”, line 217, in <module>
ud_manager_obj = bus.get_object(“org.freedesktop.UDisks”, “/org/freedesktop/UDisks”)
File “/usr/lib/python2.7/site-packages/dbus/bus.py”, line 241, in get_object
File “/usr/lib/python2.7/site-packages/dbus/proxies.py”, line 248, in init
self._named_service = conn.activate_name_owner(bus_name)
File “/usr/lib/python2.7/site-packages/dbus/bus.py”, line 180, in activate_name_owner
File “/usr/lib/python2.7/site-packages/dbus/bus.py”, line 278, in start_service_by_name
‘su’, (bus_name, flags)))
File “/usr/lib/python2.7/site-packages/dbus/connection.py”, line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UDisks was not provided by any .service files

The script at this point has (with line numbers added):

212 # Setup a DBUS helper function
213 #
214 # Yes! we are murking with Dbus and devices’ UUIDs because we need to map digikam’s
215 # volume identifier to a mountpoint in the system, as fspot uses
216 bus = dbus.SystemBus()
217 ud_manager_obj = bus.get_object(“org.freedesktop.UDisks”, “/org/freedesktop/UDisks”)
218 ud_manager = dbus.Interface(ud_manager_obj, ‘org.freedesktop.UDisks’)
220 uuid_mapper = {}
222 for dev in ud_manager.EnumerateDevices():
223 device_obj = bus.get_object(“org.freedesktop.UDisks”, dev)
224 device_props = dbus.Interface(device_obj, dbus.PROPERTIES_IFACE)
226 # make a mapping mountpoint ==> UUID
227 if device_props.Get(‘org.freedesktop.UDisks.Device’, “IdUuid”) and
228 device_props.Get(‘org.freedesktop.UDisks.Device’, “DeviceMountPaths”):
229 uuid_mapper[str(device_props.Get(‘org.freedesktop.UDisks.Device’, “DeviceMountPaths”)[0])] =
230 str(device_props.Get(‘org.freedesktop.UDisks.Device’, “IdUuid”))

So it appears that the error comes primarily from not having an /org/freedesktop/UDisks
file/directory hierarchy, which presumably means version skew between what opensuse does and what ever
the distribution the script expects does.

I took a look and I have installed on my machine both a udisk package and a udisk2 package, according to yast.
Don’t know what the difference is or what they do.

Thanks for any information you can provide.


Where do you have the photo files? Are they in a single directory (divided, perhaps, into subdirectories?) on your HD?

The photos live in ~/Photos/*, which is where f-spot puts them by default. Under this
directory, there are hierarchies of subdirectories, defined by the date a particular photo
was taken, assuming the date that we set in the camera itself was accurate. This was
not always true, since sometimes a battery would get replaced or something else,
and the time would reset to Jan 1, 2007 (for our current camera).

So, essentially, under Photos, there are directories like this:

2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015

and under each of these subdirectories, there are further subdirectories for month and date. For
example, for 2015, we have:

01 02 03 04 05 06 07 08 09 10 12

and for October (10), we have:

01 03 17 24 28 30

Inside each of these date directories, there are the individual jpg files, that are managed by f-spot.



Did you launch digiKam, then go into Settings=>Configure digiKam?

On there, choose the path to that directory?

Use the full path.

In my case, the path is **/home/myusername/Pictures/
You should have /home/yourusername/Photos/

digiKam will then build a database (SQLite?) of that directory and subdirectories, and show them as albums.

(Is it that simple, I hope?):\

AFAIK, udisks2 is the default, so is udisks installed which is also available for 13.2?


Thanks for the reply. Not quite so simple unfortunately,

While yes, digikam does build a database when I fire it up and point it
at the directory hierarchy, the problem is that the f-spot db has information
in it, that does some various fixup of dates etc, and this does not transfer

For example, we’ve had occasions when our camera has gotten its dating mixed up
or reset, so the images end up in an incorrect date directory when imported into
f-spot from the camera. As this has happened, I’ve gone into f-spot and gotten the dates
changed so that the pictures appear in the correct sequence in fspot. Presumably this
information is stored in the sql database that f-spot maintains. I know for sure that it does not
get inherited by the actual files, which stay where they were, and the file metadata still
appears to contain the incorrect date. Some hundreds of images have been affected
by this problem over the many years I’ve been using f-spot, so it is non-trivial to fixup

This is what I was hoping would transfer over when I ran the f-spot to digikam conversion




Yes, I can pull in udisks via yast. I’m just not a python programmer
and so don’t know what the relevant changes are that are needed in
the script, to point it at the right places and get the required behavior
back that the rest of the script expects.




… and, I see now why, with your further information.

Good luck.


And then there are all the images with versions, such as come from redeye fixups etc.



Shouldn’t that be:

“A-a-a-aa-aaa-aaaargh-h-h !!!”