Drafts to Dropbox: appending to different files

A few days ago I wrote about taking notes on meetings and so on. In the interim I decided to try Drafts, an iOS app which allows you to quickly take text notes and then easily pass it off in a number of different directions: clipboard, Dropbox, email, etc. I’d previously tried something called Scratch, which was similar, but I found just a little too hard to use, and so I dropped it. Drafts is much better, in my opinion.

Drafts has a function that allows you to send the text to a Dropbox file. I immediately saw that this would be ideal for my “running document” method of taking notes, which I covered previously. However, any file sent to Dropbox goes into the Drafts folder. Bummer. I searched around to see if anyone had tried the same thing before I tried to work it out myself, and Gabe at Macdrifter had a post about roughly the same thing. This uses Hazel and a bit of shell script. I got this working quickly (with a few hitches, as usual) and I was happily appending to a file in no time.

image unavailable on rss

This was great, but I realized it would be a lot better if I could append to more than just one running file, based what meeting the notes were from. A bit more Hazel action and a few duplicated rules later, I had a system in place that will streamline my note taking no end.[^1a]

Here’s the shell script I used1

echo “\n\n\> ”`date +'%Y-%m-%d_%H%M%S'`“ ” \>\> runningfilename.txt

cat “$1” \>\> runningfilename.txt

I keep my running files in the Drafts directory, but I have a Hazel rule set up that syncs them with duplicates in my main notes directory.

Here’s an example of the Hazel rule for notes about a meeting with MICA:

  1. Similar to Gabe’s, but with a few changes to suit my system, and quotes round the $1 in case I ever need to use it to deal with a file with spaces in the name. 

blog comments powered by Disqus