Using Hazel to add keywords and title for Photos for OS X

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Is there a way to edit a file's EXIF data in Hazel? I would like to make my photo title match my filename and also add a keyword "cull". I saw a few posts about Phil Harveys EXIFTool but was curious if I could do it natively within Hazel.

I know AppleScript has a dictionary for the new Photos app for OS X but I've never used AppleScript before so I'm not sure how to write the code. I did come across some code that someone posted where you can actually do this from within Photos but it requires you to select the photos inside Photos app and I'd like to just add it to my Hazel import workflow. Here's the code in case it helps.

Code: Select all
on run {input, parameters}
   tell application "Photos"
      activate
      set the name of im to the filename of im
   end tell
end run


Thanks.
Lori
L2L
 
Posts: 6
Joined: Wed May 06, 2015 12:40 am

Search the help for "AppleScript" as you need to change that script to work with Hazel. If embedding it in Hazel, in the very least, get rid of the handler (the "run" stuff). Also, not sure what "im" is referring to but the script instead should refer to "theFile", which is the file being processed.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thank you Mr_Noodle.
L2L
 
Posts: 6
Joined: Wed May 06, 2015 12:40 am


Return to Support