jarrodwhaley.com

I make films. I'm also a nerd.

nvremind Reminders via Drafts and Alfred 2

Brett Terpstra’s nvremind is an incredibly useful Ruby script which scans a given folder of plain text files looking for @remind(YYYY-mm-dd HH:MM) tags. When the script runs (it’s designed to be run on a regular basis–every half-hour, by default–via launchd), it sends the user a notification via a variety of methods, and edits the found tag to @reminded(YYYY-mm-dd HH:MM). It’s a really versatile and handy way to turn your existing plain-text notes into a giant, always-nagging monstrosity, and I love it.

The script is designed to scan an entire folder, and I have been using those @remind(YYYY-mm-dd HH:MM) tags throughout all of my notes. However, I’ve also found it useful to dump all of my new reminders into a single “To-Do” file, which I process later on as necessary. This practice gives one the option of setting up quick, automated ways of entering new reminders on both iOS and OS X; for these purposes I’m using Drafts and Alfred 2.[1]

A Note on the Reminder Tags

One can, of course, simply type out those @remind(YYYY-mm-dd HH:MM) tags by hand. It’s far easier, however, to set up a TextExpander snippet containing date / time math. My snippet is @remind(%Y-%m-%d %H:%M) (which dynamically inserts the current date / time, though you could alter that to use any date / time combination you like). I insert it into my text and edit the time / date as necessary. There are probably even cooler ways to handle this using Fill-In snippets, but I haven’t directed my nerdery down that particular rabbit-hole as of yet.

Drafts Usage

Setting reminders with Drafts is a simple matter of firing a Dropbox action that sends your text to a file in the folder being watched by nvremind. I wrote my action with * [[draft]] in the template, so that new entries will be Markdown-formatted unordered-list items. Example: my action prepends reminders to my central “To-Do” file. Type a quick note, insert the reminder tag, and fire the Drafts action. That’s it. You’ll get a reminder (in the form you specified when you set up Brett’s script) later on.

Alfred 2 Usage

When you’re sitting at your Mac, you can always just open up your notes and insert the reminder tag somewhere. If you’re like me, though, you probably want to be able to quickly fire off a reminder from your launcher of choice. I use Alfred 2, but the little script I’m using could easily be plugged right into Launchbar or Quicksilver.

Once again, I’m prepending my reminders to my main “To-Do” file. The workflow (link below, if you don’t want to build your own) runs the following Bash script:

cat ~/Path/To/File | pbcopy && echo "* {query}" > ~/Path/To/File && pbpaste >> ~/Path/To/File

I pop up an Alfred prompt, enter my keyword (“todo”) followed by my reminder text and a TextExpander-inserted tag, and hit enter. Bingo, I’ll get a reminder later.

Be aware that if you install the Workflow below, you’ll need to edit the script so that the file paths point to the file that you want to use.

GitHub Link:

Easy

Once all of this is set up, it’s dead-easy to set new reminders for yourself which are versatile, ubiquitous, and powerful. I’m finding a lot of usefulness in this setup, and I think you will, too.


  1. Please note that none of what follows will work unless the Mac on which you’ve set up nvremind is running; nor will the Drafts action work unless your notes are synced with Dropbox.  ↩