Support arbitrary sidecar files#210
Open
qlyoung wants to merge 2 commits intoivandokov:masterfrom
Open
Conversation
ivandokov
requested changes
Nov 13, 2023
Owner
ivandokov
left a comment
There was a problem hiding this comment.
Thank you for this great PR! There are just a few small notes I left and please add tests for this feature.
Currently support exists for handling .xmp sidecars. This change adds support for arbitrary sidecar extensions. It also expands the set of sidecars which are handled by default. The new default set, and the reason this set was chosen, is: .xmp - general metadata format for all image types .json - generated by google takeout when exporting from g photos .yml/.yaml - used by Photoprism Users can override this default set by passing the new --sidecars option. For example, to handle .xyz, users should pass --sidecars="xmp,json,yml,xyz"
49563a4 to
04789d0
Compare
ivandokov
requested changes
Nov 17, 2023
Owner
ivandokov
left a comment
There was a problem hiding this comment.
Looking good. Please add tests.
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.
Currently support exists for handling
.xmpsidecar files. This change expands that support to any arbitrary sidecar file. It also expands the set of sidecars which are handled by default. The new default set, and the reason this set was chosen, is:.xmp- general metadata format for all image types; written by Lightroom, Digikam, Darktable, etc.json- generated by google takeout when exporting from g photos.yml/.yaml- used by PhotoprismUsers can override this default set by passing the new --sidecars option. For example, to handle
.xyz, users should pass--sidecars="xmp,json,yml,xyz"; and to disable sidecar handling altogether, pass--sidecars=''As with my other patch, I'm submitting this without tests so we can reach consensus about the feature.
Example
Before the change,
.jsonsidecars are placed inunknownrather than being moved with their images:After, they're handled correctly: