Repository navigation
Conversation
- Move XMP code into a new xmp_sidecar module and parse with quick-xml - Resolve IMG.CR2.xmp (digiKam/darktable) before IMG.xmp - Read digiKam ColorLabel, darktable colorlabels, digiKam TagsList and lr:hierarchicalSubject (leaf names) as fallbacks - Store imported tags as user tags so clearing AI tags keeps them - Add an XMP conflict policy setting (fill empty / newest wins / XMP wins) - Never write to IMG.CR2.xmp; escape tags and drop the user: prefix when writing IMG.xmp Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Hi @yoyozbi, thanks for this PR. I ran into XMP sync problems with Lightroom sidecars and wrote them up in #1945. Your reader with quick-xml looks like a good basis, and I would like to build on it. In a quick test with a few of my Lightroom sidecars I noticed some points that might need a closer look. Some are probably just because main moved on since you opened the PR:
In the issue I suggested splitting the work into smaller PRs, with the reader and the darktable/digiKam support from this PR as separate steps. How would you like to proceed? Happy to work on it together, or to take over parts if you prefer. |
|
Hello @apweisskopf , Your multiple PRs approach is a good thing, and the approach you describe in the issue is great. For me, the first step would be to clearly define how we would tackle the different XML file formats between lightroom and darktable. In my opinion, the digikam or lightroom processing should be clearly separated, serializing/deserializing the data into a common struct. The app should then decide which backend to use. |
|
Thanks, glad to work on this together While waiting for your reply I started drafting the steps from the issue, mostly to check that the split into small PRs holds up. It turned into a full draft. The numbers follow the list in #1945, and each link shows only the commits of that step:
The branches are stacked and nothing is final, so please treat it as a proposal, not a done deal. On the backends: I think we mostly agree, but I would avoid separate backends. All these apps write XMP. They differ in the file name and a few extra fields like Remembering the format isn't needed either. One lookup picks the sidecar for both read and write ( For the darktable/digiKam step, I mainly drafted it to see how your PR could fit on top of the new reader and writer. I don't have much experience with darktable or digiKam, so if you would like to take it over, rework it or start fresh from your PR, that's fine with me. Happy to help or review either way. |
Description
Type of Change
Changes Made
xmp_sidecarmodule.quick-xmlto serialize part of digikam/darktable CR2.xmp files and resolve them before .xmp files..rrdataand.CR2.xmp(fill empty / newest wins / XMP wins).Screenshots/Videos
Testing
Test Configuration:
Checklist
Additional Notes
The project has known quite a duplication of code between the original .xml sidecars code that supports read/write and the added .cr2.xmp code. I didn't know what you had in mind about the .xml format, if it was used in another software, or something else.
If required I could also rework this change to handle sidecars in a more abstract way, building the foundation for future sidecars format support.
AI Disclaimer:
Please state the involvement of AI in this PR: