Skip to content

add --sidecar-format flag for XMP sidecar generation#1274

Open
fabb wants to merge 1 commit into
simulot:developfrom
fabb:feature/write-xmp
Open

add --sidecar-format flag for XMP sidecar generation#1274
fabb wants to merge 1 commit into
simulot:developfrom
fabb:feature/write-xmp

Conversation

@fabb

@fabb fabb commented Jan 3, 2026

Copy link
Copy Markdown

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

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 fabb requested a review from simulot as a code owner January 3, 2026 14:27
@fabb fabb changed the base branch from main to develop January 3, 2026 14:27
if err != nil {
return err
}
// XMP?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XMP!

Comment thread docs/commands/archive.md
| 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 |

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is debatable, and could also be hidden behind another flag

Comment thread docs/commands/archive.md
| 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 |

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is debatable, and could also be hidden behind another flag

Comment thread docs/commands/archive.md
| 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`

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is debatable, could also map to TagsList or something else

Comment thread docs/commands/archive.md

**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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be annoying

Comment thread adapters/folder/run.go
}
}

// If no JSON but XMP exists, promote XMP metadata to FromApplication for upload

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Archive: generate xmp sidecar files

1 participant