-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add push-exif command to CLI #160
Comments
Ideas for how this could work:
This would add "{person}" template as a keyword in Photos and add person name as keyword to exif data using exiftool (against the original and edited images). Could be used with or without exiftool. Without it, wouldn't modify originals, only the keywords or description in Photos. Use all the usual
Also add new |
|
osxphotos push-exif
Pushes metadata from Photos to the exif data of the original file (and optionally edited) using exiftool. Specify which metadata gets pushed: osxphotos push-exif [--push|--compare] [all keywords location faces date title description favorite] specify all or subset using one or more of: all keywords faces date title description e.g. --dry-run would show which files would be updated --verbose would show each field that's written --include-edited : also write EXIF data to edited files What about raw? (can EXIF data be written to raw files?) When run, first reads the metadata from the file and stores it in an undo database (like --compare: use instead of --push and print out a diff for those fields which are different. Undo database would use SqliteKVStore with key of UUID and value of JSON dict from reading with ExifTool. --report to write report of what was updated. Support CSV, JSON, and SQLite as export does. Also support the following
To implement, the code from photoexporter.py that handles exiftool should be pulled out into a separate Create a new osxphotos/osxphotos/photoexporter.py Lines 1736 to 1760 in 1bdd993
|
Implemented in v0.63.0 as |
@all-contributors please add @Jmuccigr for ideas |
I've put up a pull request to add @Jmuccigr! 🎉 |
Great to see push-exif coming to life as a distant echo to a conversation we had with @RhetTbull in late 2021. Wondering whether push-exif would simplify this... Did anybody try already ? PS: same question about adding the metadata in the Finder tags for each photo in the Photos Library, would this approach make exported photos searchable on the iPhone ? |
@pdewost exporting to iPhone isn't a supported use case for osxphotos so I'm not sure there's a whole lot osxphotos can do. What I would try is to export the metadata to a test image then copy that image to the phone to see if the iOS version of Photos picks up the keywords etc. If you import a photo into the Mac version of Photos that contains embedded keywords these do get added as keywords in Photos. If this does work, then |
Thank you @RhetTbull for this quick reply ; last point leaves me puzzled. Imported embedded keywords are passed to Photos yet are they transferred to the iPhone Photos app when you sync using the Finder (on Sonoma) ? |
I'm sorry, I don't understand what you're asking. What I was suggesting is to try an experiment: sync keywords to a single photo using |
So I exported a photo with So the question becomes : the same operation with |
Interesting. I exported an image using How are you copying photos to the Phone? Are you doing this from Photos? If so, it's possible Photos is exporting a version of the photo that strips metadata. In this case, it's probably better to export images using |
I copy photos to the phone using the synchronization feature that was before in iTunes/Music and now is part of the Finder on macOS Sonoma. I select albums (including smart albums) and then let the sync happen, via a usb-c cable. All copied photos appear in "on my Mac" section of the iOS Photos album view yet they cannot be searched by tags or by face name. Using Using Could it be because of the fact that I do export the keywords and persons in the Finder Tags and that these are "ingested" into macOS Photos at import ? Would there be an option for |
I would be surprised if that's it. In my test, the iPhone clearly ingested keywords from the EXIF/XMP keywords fields. I think you need to do some some experiments to isolate certain variables to see exactly what it is. Try an export with only |
The iPhone ingests for sure when using Airdrop. What I am trying to do is to work directly in the Photos macOS App where I manage 900Gb and 40 years and make sure that I can find the "synced" pictures in my iPhone in an easier manner than just scrolling through albums. Using the iOS Photos search feature would help if only it were capable of finding people (faces) as well as keywords (tags). So the osxphotos export to Mac and then import in iPhone is impractical... Now I did test the following with just one image : 1/ 2/ 3/ running This sucks. Tried a rebuild of the Photos Library work hoping it maybe would update the Mac's keywords and tag system with the EXIF metadata found in the pictures, yet there was no change. Photos synchronized to the iPhone are arbitralily searchable by keywords (some keywords will return 3 photos instead of dozens...) and none by person name. As my purpose is to make photos search as easy on iPhone than it is on my Mac, I was wondering whether such dysfunctional behavior would change if I were using referenced photos instead of photos that are imported (and buried) in the Photos Library package. Maybe the export to the iPhone would leverage buried push-exif metadata ? Sorry but this is very confusing to me... |
If this is the case, then you can easily use Select one or more photos in Photos then run:
This sets the Photos keywords to include the person name. Are the other settings like title, description, favorite status transferred? |
Some people still use photosmeta due to --inplace exif update feature. Add a similar feature to osxphotos to update the metadata of the photos in the actual library without exporting.
The text was updated successfully, but these errors were encountered: