Convert Shotwell Photo Metadata to Digikam Metadata


Mostly notes to myself.

Shotwell stores most of its information in a database. Which I lost. Because I'm an idiot.

But a bunch of metadata is also stored in the image's EXIF metadata!

Most importantly is the "Original File Name" which should become the "Description" in DigiKam. Unfortunately, there's no way to copy those values automatically on import.

So here's a one-liner which will read the "Original File Name" and store it in the "Title" EXIF - ready for DigiKam to parse!

 Bashexiftool "-XMP-dc:Title<XMP-getty:OriginalFileName" whatever.jpg

If you want to make sure any existing Title isn't overwritten, use:

 Bashexiftool "-XMP-dc:Title<${XMP-getty:OriginalFileName}" -if "not defined $XMP-dc:Title" whatever.jpg

Finally, to do it recursively, across all files:

 Bashexiftool -r "-XMP-dc:Title<${XMP-getty:OriginalFileName}" -if "not defined $XMP-dc:Title" /path/to/images

Share this post on…

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

See allowed HTML elements: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">

To respond on your own website, write a post which contains a link to this post - then enter the URl of your page here.
Learn more about WebMentions.