(Get it? Day One in My Life – a day in the life? Groan.)
Amazingly, someone wants to see my code. Here are screen shots of the Hazel rules for you.
Here is a view of the Dropbox folders I have Hazel watching:
Here’s a view of the rule. I just match any file in the folder, run the script, then move the file to the trash:
This view shows the script I use to process text entries. It’s an embedded AppleScript that executes a shell script to get the modification date. Then it executes a shell script to call the Day One command line interface, feeding it the modification date of the file and the filename. Day One grabs the content of the file and adds it to my journal on the appropriate date:
This view shows the script that processes Facebook photos. It’s basically the same as the text version above, except it uses the -p parameter to have Day One load the photo instead of redirecting the text contents into the journal:
I still have occasional errors with some files, probably because I’m not properly quoting special characters. I hope to fix this some day. If you fix it, please let me know. I enjoy opportunistic reuse.