Exchanging tags between Photomechanic and Darktable

Hello,
I wonder if there is a way to force read (by a lua script?) some tags written with an external app like Photomechanic into darktable? And the other way around ?
The idea would be to use tags for star ratings and colour tabs from one to the other. I like using Photomechanic to explore my photos and make collections.

If I delete the ..xmp file, remove the file from the darktable database and re-import the file, I get the tags written with photomechanic… not an easy workaround!

Thanks for any help,
Nicolas

Can photomechanic write its xmp files with the pattern filename.ext.xmp? If yes, then darktable will see them automatically. If not, you’ll need some lua or something else to copy the data into the darktable sidecar.

I cannot find the option in photo mechanic… that is why I thought of a lua script, which I have no idea how to write… I would like a script that would do an “read” : that is write the tags from the .xmp to ..xmp and another that would do “write” the other way, if it is at all possible!

I think round tripping is probably a bad idea and you’ll eventually loose some data. Better to define the flow one way and do your metadata work in one application.

Broadening this discussion a bit, it would be great (and immensely helpful) if rather than merely reading tags assigned to individual photos via another application, darktable could import and save an entire taxonomy structure from which tags could be selected and assigned to new files.

I’ve spent nearly a gazillion accumualted hours defining and assigning tags to photos with DigiKam. As that particular software has become an almost unweildly over-sized behemoth of (in my opinion) kitchen sinks full of extraneous functionality including politically-incorrect facial recognition features, I’d like to finally run away from it. Alas, my tagging investment keeps me tethered. Thus far.

You should be able to instruct digiKam to write darktable compatible sidecar files. Make a backup first!

Sidecars would only be applicable per each photo, correct?

As noted, with a single push of a virtual button (or a line or seven of code), I’d like to replicate the entire current toxonomy structure from DigiKam into darktable. Otherwise, I’d have to meticulously and manually recreate every individual tag (in the correct hierarchy) so that they would then be available for future tagging exercises. Up to now (and probably in to the near future) I’ve been much too lazy to do this :crazy_face:!

Have you tried to import an xmp that has darktable’s hierarchical tag structure in it? What does that do?

Yes I have (tried). In fact, this is how I “back-up” and transfer my tag structure between computers:

  • Open a ‘Master photo’ (mine is a photo of a paper tag :wink:)
  • In “Tags”, select all available tags and assign to the Master
  • Save
  • Transfer the photo to the new computer
  • Open in DigiKam
  • Voila, the entire tag structure is automagically imported and available to all other photos, even when the master is no longer active.

I’ve not experienced the same result in darktable.

So it doesn’t populate the hierarchical tags if you import?

Nope.

The option to “import tags from a Lightromm keyword file” has always sounded promising. However, I’ve never been able to create one from my DigiKam data.

But digiKam can write darktable style heriarchical tags, can’t it?

If this is a rhetorical question, it seems that my problem is imaginary! Now I must just see how I can get digiKam to spit-out the tags in the desired format…

Thanks for the hint, Mica.

I thought I remeber reading that digiKam made some changes a few verions ago that wrote xmp tags darktable could read, but I don’t know the extent.

Yes, I can confirm that. I typically tag my images in darktable and digiKam imports those tags the next time I open it. It also works the other way around.

From the top of my head, I had to change a setting, that digiKam uses the name.ext.xmp (darktable) convention for xmp files and not the name.xmp (Adobe) one. I’m not at my computer right now to check if there was any other relevant setting to change.

However this has worked for me with digiKam 7.x on both Ubuntu (appimage) and Windows.

2 Likes

Which is the way I work normally: sort, tag and comment in digikam, then switch to dt. Iirc, the only catch is that you have to select the tag you want and all its parents, to get the proper tree back in darktable. I can’t remember having seen problems with sidecar extensions between the two programs.

1 Like

The idea to use Digikam is enticing…
I had tried it a few years ago and gave up, I found it very confusing.
I have downloaded version 7.4 and my new idea is to do my tagging and keywording in DT, but use a DAM (digikam?) to have virtual collections.
The photos in my database cover family snapshots, personal work (street and landscape) + photos taken for assignments for my photo club and also photos for demonstration for the club. Collections are a handy way to have a single database (some photos can be used for several purposes) but still have some separation. Keywording everything is tedious.

I am nearly thee but not quite.
a) If I change a keyword in DigiKam, it updates when I restart DT (look for updated xmp is checked).
b) If I change a keyword in DT, it does not sync with Digikam (I reread metadata from file)… unless I delete the ..xmp file manually first…
c) Color labels do not sync either way but star ratings do

I have to have deleted the .xmp file first or else digikam just writes to that.
In the xmp file, there is a digiKam:TagsList which seems to store the keywords I add but they are not in the list that dk reads.

There seems to be an option for digikam to read the ..xmp while also having a .xmp present in the directory but I tried several options and I can’t make it work

FUJIFILM-X100V-2021-12-14-11h14min49s.raf.xmp (17.0 KB)

Integration does not look that easy… !

Sorry, but collections in digikam correspond to directory trees. You’ll still need keywords to create a virtual collection

As I rarely change keywords in darktable, I don’t know about that. I do know that adding tags to an image that has none in darktable carries over to digikam.
This might have something to do with the order in which digikam processes the keyword XMP tags, combined with the XMP tags darktable uses to store keywords. That order in digikam can be changed.

Color labels won’t sync, as the way they are used is fundamentally different between digikam and darktable:
in digikam you can assign only one color label to an image, in darktable you can assign as many as you want to one image (within the choices provided of course).
Star ratings work similarly between the two programs, so they can be synchronised.

And yes, integration is difficult. That is because you deal with two programs developed by different teams, where interoperation with other programs was not the first priority. That said, both have made efforts to play nice with other FOSS programs, less so with commercial programs.
And there are some areas where interoperability is illusionary: there’s no way one program can take the editing instructions from another program without copying the algorithms used by that other program (of course, there are some exceptions, like cropping).

Yes, I realise there are problems but tags are supposed to be standardised are they?
I don’t think I’ll be using digikam, seems more trouble than it is worth…

keyword “supposed”…
If I look at my XMP files, I see five tags dealing with keywords, only one of which is in the digikam namespace…
(and three tags for the caption as well)