Journaling with Drafts and Day One (Revisited)

by xab13r

I really liked Jarrod Whaley’s post in which he explains how to link together two great apps Drafts for iOS and Day One to get a very fast way to save your thoughts.

Sometimes I just want to dash off a thought really quickly–without launching DayOne, waiting for it to open, entering my passcode, tapping to begin a new entry, and so on and so on. I decided I’d find a quicker way to add entries to my journal

He uses Drafts on iOS and a combination of Hazel, Shell Script and Day One CLI on OSX to get a piece of plain text converted in a great diary entry.
There is just one little problem – even though it’s not a problem – your Mac has to be always awake to let Hazel doing its job and sending your thoughts to Day One, if it is not, you will end with Hazel sending them to Day One at a different time from the one they were created[1].

So I made some little adjustments to Jarrod’s idea, according to my needs.
As him, I decided to use Hazel to monitor a folder I called DayOneDrafts, placed in my Dropbox folder.

The 'set color label' action is optional

The ‘set color label’ action is optional

In this folder I will store the text files captured with Drafts on my iPhone or iPad using this Dropbox Action.

Dropbox Action

Then we have to integrate Hazel and Drafts, I have choosen to do it using an AppleScript and the Day One CLI. I’ve to say thank you to Brandon Pittman and this article about his use of AppleScript with Day One CLI.
Here Brandon’s code readapted for Hazel:

set entry_file to POSIX path of theFile

tell application “System Events”
set file_date to creation date of (info for theFile)
set entry_date to ((month of file_date as number) & “/” & day of file_date & “/” & year of file_date as text) & “ ” & (time string of file_date)
end tell
set the_script to “/usr/local/bin/dayone -d=‘“ & entry_date & ”’ new < ” & entry_file
do shell script the_script


  1. The time in which you start/wake your Mac and Hazel can start his job.  ↩

About these ads