Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --exiftool-merge #299

Closed
RhetTbull opened this issue Dec 20, 2020 · 5 comments
Closed

Add --exiftool-merge #299

RhetTbull opened this issue Dec 20, 2020 · 5 comments
Labels
feature request New feature or request

Comments

@RhetTbull
Copy link
Owner

--exiftool overwrites any keywords, persons, etc in the file when exporting with the data in Photos. Add a --exiftool-merge flag that causes exiftool to first read the original data then merge it and de-dup it with the new data before writing

Given the behavior is already to overwrite the existing metadata, maybe an option for --merge-exifdata that would cause osxphotos to read all exifdata on the original file then merge it before writing it back to the file.

Originally posted by @RhetTbull in #292 (comment)

@RhetTbull RhetTbull added the feature request New feature or request label Dec 20, 2020
@RhetTbull
Copy link
Owner Author

Fixed in v0.38.18

@narensankar0529
Copy link

Would this only work if the exif is stored directly in the file? Is it possible to support merging for the XMP and JSON sidecars?

@RhetTbull
Copy link
Owner Author

Yes. It works with --sidecar as well as --exiftool. The merge options read keywords and/or persons from the original file's exif data and write it to the sidecar and/or the exported file's exif data.

@narensankar0529
Copy link

Sorry - just to double confirm - If I use an external app to write tags to the XMP, Keywords and/or PersonInfo, then osxphotos will not overwrite it if I use the --exiftool-merge parameter - right? so it would read the existing XMP and the dc:Subject and then potentially merge with new keywords from the Photos database and write out the sidecar?

@RhetTbull
Copy link
Owner Author

No, sorry, I misunderstood your question. --exiftool-merge-keywords/--exiftool-merge-persons options only read the exif data directly from the original image in the Photos library. There is no support for reading the XMP or json data -- osxphotos writes those but does not read them. If you modify the XMP or json files outside osxphotos, they'll be overwritten the next time you run export with --update. osxphotos is an export tool not an asset management system. You could use exiftool to read the XMP file and write back to the image using something like this:

exiftool -tagsfromfile SRC.xmp -all:all DST.jpg

If you ran osxphotos export --update again with --ignore-signature option it would not overwrite the updated image files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants