pgriess / photoscrub

Scrub metadata from macOS Photos.app photos
MIT License
1 stars 0 forks source link

Automator Workflow can be replaced with photoscript #1

Open RhetTbull opened 2 years ago

RhetTbull commented 2 years ago

This looks like a cool project! I noticed you were using an Automator workflow to show a photo. You can likely accomplish what you're trying to do directly in python using the photoscript package which provides a python-to-Applescript bridge for Photos. photoscript and osxphotos use the same UUID (which is used by Photos) to reference individual photos.

>>> import photoscript
>>> photo = photoscript.Photo("8EC216A2-0032-4934-BD3F-04C6259B3304")
>>> photo.spotlight()

Full docs for photoscript here

pgriess commented 2 years ago

Ah, very nice. I spent some time looking around the AppleScript bindings for Photos.app but couldn't figure out how to do this. Thanks, using photoscript would be much cleaner than shelling out to automator.