add --sidecar-format flag for XMP sidecar generation#1274
Open
fabb wants to merge 1 commit intosimulot:developfrom
Open
add --sidecar-format flag for XMP sidecar generation#1274fabb wants to merge 1 commit intosimulot:developfrom
fabb wants to merge 1 commit intosimulot:developfrom
Conversation
Add XMP sidecar creation support to the archive command with --sidecar-format json|xmp|both flag. Also fix upload to use XMP metadata when no JSON sidecar exists.
fabb
commented
Jan 3, 2026
| if err != nil { | ||
| return err | ||
| } | ||
| // XMP? |
fabb
commented
Jan 3, 2026
| | Rating | `xmp:Rating` | 0-5 scale | | ||
| | Favorited | `xmp:Rating` | Stored as Rating=5 when Favorited=true | | ||
| | Tags | `digiKam:TagsList` | Hierarchical paths | | ||
| | Albums | `digiKam:TagsList` | As `Albums/<AlbumName>` prefix | |
Author
There was a problem hiding this comment.
this is debatable, and could also be hidden behind another flag
fabb
commented
Jan 3, 2026
| | DateTaken | `exif:DateTimeOriginal` | ISO-8601 format | | ||
| | Description | `dc:description`, `tiff:ImageDescription` | Both namespaces for compatibility | | ||
| | Rating | `xmp:Rating` | 0-5 scale | | ||
| | Favorited | `xmp:Rating` | Stored as Rating=5 when Favorited=true | |
Author
There was a problem hiding this comment.
this is debatable, and could also be hidden behind another flag
fabb
commented
Jan 3, 2026
| | Albums | `digiKam:TagsList` | As `Albums/<AlbumName>` prefix | | ||
| | GPS | `exif:GPSLatitude`, `exif:GPSLongitude` | DMS format | | ||
|
|
||
| **Fields NOT preserved in XMP** (JSON-only): `Trashed`, `Archived`, `FromPartner`, `FileName` |
Author
There was a problem hiding this comment.
this is debatable, could also map to TagsList or something else
fabb
commented
Jan 3, 2026
|
|
||
| **Fields NOT preserved in XMP** (JSON-only): `Trashed`, `Archived`, `FromPartner`, `FileName` | ||
|
|
||
| A warning is logged when using `--sidecar-format xmp` for assets with these non-preservable fields. |
fabb
commented
Jan 3, 2026
| } | ||
| } | ||
|
|
||
| // If no JSON but XMP exists, promote XMP metadata to FromApplication for upload |
Author
There was a problem hiding this comment.
this changes upload behavior, so if you like, it could be put behind a flag.
alternatively to preferring the json, could also merge the data from json and xmp for upload. could be nice for the case the xmp files were manually modified, but the json not updated/deleted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add XMP sidecar creation support to the archive command with --sidecar-format json|xmp|both flag. Also fix upload to use XMP metadata when no JSON sidecar exists.
fixes #1273