Super-Fast Journaling With Drafts And DayOne

I have an incredibly geeky need to log information about my life–for my own uses, mind you–and a big part of how I address that need is in journaling with DayOne, an app with variants on both OS X and iOS. It syncs flawlessly across devices and (Apple’s) platforms, and has a well-designed interface which makes it a joy to use. The act of writing stuff in DayOne is great for me, which is why I have to find some problem with it.

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[1]. Luckily, the developer of DayOne has implemented a pretty handy (if basic) command-line interface, which means that it’s easy to script and automate the app. What I ended up with is this: I type my markdown-formatted entry in Drafts, fire a Dropbox action, and…that’s it. It doesn’t open another app. It just adds the entry to my journal in the background. It takes a little bit of work to set it up, but it’ll save you a lot of time over the long haul. It’s awesome.

Dependencies

Before you tackle any of this, you’ll want to go ahead and make sure that you have all of the software / setup required:

  • A Mac on which to run the actual automation, despite the fact that you’ll be initiating it from an iOS device.
  • DayOne for Mac at a bare minimum; this workflow is entirely doable without the actual iOS app (though I do still recommend it).
  • The DayOne CLI.
  • Dropbox is a necessary part of how this workflow works, but you don’t necessarily have to use it to sync your journal in normal usage. iCloud sync is fine, and won’t interfere with these scripts.
  • Drafts for iPhone, iPod Touch, or iPad, for the actual text entry.
  • Hazel handles the automated scripting.

How It Works

Drafts will send your text to a temporary text file in a folder in your Dropbox which is being watched by Hazel, which will then use a pair of scripts to add the text to your journal, and then delete the temporary text file.

Setup on the Mac

First of all, create a folder somewhere in your Dropbox and call it “DayOneDraft.” I put it in the “Apps” folder, to keep it out of plain sight. Now that you have that folder, you’ll want to make Hazel watch it with the settings shown below:

Screen Shot 2013-05-30 at 5.23.27 PM

Click on “edit script” on the “run shell script” line; in the “shell” field, enter /bin/zsh, and in the script window enter this command:

cat $1 | dayone new

Then add an action to send the file to the trash, as shown in the above screenshot.

Setup on iOS

Now open up Drafts on your iOS device, and create a custom Dropbox action with exactly the following settings:

drafts-action

Now Just Use It

Whenever you want to add an entry to your journal, just launch Drafts and start typing. When you’re done, fire that Dropbox action and let your Mac take care of the rest. Assuming your Mac is running when you fire the action, your entry will be added to DayOne immediately.


  1. This post details my method for quickly writing an entry on iOS; I’ll write up my Mac workflow(s) in a future post.  ↩

Advertisements
Tagged , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: