Replies: 4 comments
-
See To do this programmatically, you can use photoscript which I've also written (and is used by osxphotos). Photoscript is a python wrapper around Photo's AppleScript interface. It can set the date but not the timezone. To set the timezone, the Doing this from memory but using photoscript should be something like this: import datetime
import photoscript # already installed by osxphotos as a dependency
# assuming photo is a osxphotos.PhotoInfo object:
photoscript.Photo(photo.uuid).date = datetime.datetime(2022,11,16,8,43,0) The |
Beta Was this translation helpful? Give feedback.
-
You're very welcome! I'm glad you've found it useful. Don't hesitate to ask questions. The discussions page is good for non-bug/feature discussion. |
Beta Was this translation helpful? Give feedback.
-
This is a freaking amazing tool - thank you! |
Beta Was this translation helpful? Give feedback.
-
Main question: Is it possible use OSXPhotos to modify dates of existing pictures in the main photos library, especially in batches?
Here's my situation - I am now trying to curate my roughly 14,000 photos library, ensuring people are correctly tagged, chronological order, etc. I have a several thousand photos that I've scanned/imported into the library (all our old picture albums), and have done a good bit of work on tagging people, even if Photos hasn't recognized a face (yet). I made the mistake, though, of not editing EXIF dates in the photos prior to importing them into the library.
Photoanalysisd has basically run its course over the last few weeks, and I'm still left with thousands of photos that would need to be manually tagged, even though faces are detected. My gut is telling me that because I've tagged all sorts of different people (from baby pictures through mature adult phase), photoanalysisd is seriously confused because of the differences between someone's infant pictures vs. current day.
The Photos app itself only allows for changing the date of a photo one at a time, rather than in bulk. This would turn into hundreds of hours of work going through each individual photo to change those dates.
I've read through the OSXPhotos documentation, and I see (and have verified) that it can make changes to the database by creating a new album and then tagging photos into those albums. My thought has been trying to exporting batches of photos at a time from Photos, getting the photo name and/or UUID, and coming up with a file of name/UUID/corrected dates, and trying to then modify the Photos database itself. What I'm trying to avoid is a process of exporting photos, deleting them from the Photos database, fixing the dates, and then reimporting the photos as that would erase the work I've done with all the manual face tagging I've done. My hope is to do this in batches based on those newly identified dates, but I could also just generate bash scripts to call OSXPhotos to do this one-at-a-time if necessary.
So...is that a possibility with OSXPhotos? Or maybe there's a different approach I could use? I'm running on Venture 13.0.1, Photos 8.0.
Thanks! This has been an awesome tool to learn and use, especially from a programming standpoint. And apologies if I've not tagged this correctly; I don't think it's a bug or a feature request.
Beta Was this translation helpful? Give feedback.
All reactions