[Digikam-users] about "synchronizing XMP sidecars and the digiKam database"

M. Fioretti mfioretti at nexaima.net
Thu Feb 21 17:11:02 GMT 2013

On Thu, Feb 21, 2013 11:52:24 AM -0500, Elle Stone wrote:

> A few DAM tools (Resource Space, for one) do use exiftool, but for
> whatever good and valid reason, digiKam decided to use exiv2 instead
> of exiftool, probably because of the perl dependency? So digiKam
> itself is not likely to ever interact with exiftool.

(if my assumptions are correct) it doesn't need to, and it doesn't
matter whether digiKam uses exiv2 or exiftool. digiKam writes stuff to
its database and to image/sidecar files in formats that are known or
can be known, e.g. (I'm making stuff up, just to explain my point) the
picture title may be written:

to the Sqlite or MySql database as  "Title: 2009 birthday"
to the picture  as  "Title = '2009 birthday'"
to the sidecar  as  "Title => {2009 birthday}"

so it doesn't really matter _who_ wrote what with _which_ library.
There is no need to know anything at all about how digiKam _works_,
only what it writes and where.

In other words, what matters is only:

1) where the stuff is (Sqlite or MySql db) or must go (image/sidecar
file) and what the exact formatting must be in each place

2) if there is some nasty side-effect

I know how to do (1): there are standard command line tools to extract
data from either Sqlite or MySql databases, regardless of _who_ put
them there; other tools to reformat those records, and exiftool to
write the results in the right places, and I know how to use this
stuff. What I don't know is (2), and what is the fastest way to find
the formatting information: the one you mention:

> write out a few test images with all the metadata that you normally
> save, and check using exiftool to see what gets written

which is no problem, or something faster.

> Such a script would need constant updating to keep up with the
> latest digiKam/exiv2.

Why? If I understand correctly, there is no more "constant updating"
to do in this that in the commands you use now. digiKam and exiv2 can
change as much as they want internally, but as long as the strings
they write remain the same we don't care, do we now?

Besides, if one has a lot of pictures, even changes whenever exiv2 or
digiKam _change_ should be way quicker and less boring than all the
manual configuration changes at each digiKam _session_.


More information about the Digikam-users mailing list