I’ve been using Moves for iOS to track my movement and I wanted to add the saved images the app can produce to Day One for OS X for journaling purposes. So, if you create a Hazel rule to check if you have one of these images, you can then process them with this AppleScript. This script assumes you created the log the following day (or the moves) and then it uses that created day –1 to create a Day One entry for the day the moves actually happened.
set theFile to choose file tell application "System Events" set old_date to creation date of (info for theFile) set new_date to old_date - days * 1 set processed_date to ((month of new_date as number) & "/" & day of new_date & "/" & year of new_date as text) & " 11:59PM" end tell set photo_path to quoted form of POSIX path of theFile set the_script to "echo \"Moves\"" & "| /usr/local/bin/dayone -d=\"" & processed_date & "\" -p=" & photo_path & " new" do shell script the_script
When you’re running this as an embedded script in Hazel, just remove the line where you set
theFile. Also, you’ll have to manually export the file from Moves. There’s no way to automate that unfortunately.