Fantastically Good Reminder Parser for Drafts 5
Following my recent blog post about my Fantastically Good Event Parser, which to my great delight was featured on MacStories, I received quite a few requests to create something similar for Reminders. Fantastical, which inspired the event parser, also allows you to create reminders in the system Reminders app using natural language. The interface within the app that allows you to enter calendar events also allows you to create reminders by including words like
todo in the text entered.
I thought about replicating this functionality within my previous action, but this didn’t feel quite right in Drafts. Adding calendar events and setting a reminder are conceptually quite different kinds of action, so I decided to build a separate action just for reminders. Being separate, I also decided that requiring a keyword like
todo didn’t make much sense for this use case, so I’m diverging slightly from the traditional Fantastical functionality here.
Otherwise, it works very similarly to Fantastical. Reminders can be entered in the form
Thing Tuesday 5pm !!! /p to add a reminder called Thing with a due date of Tuesday, with a reminder at 5pm that day, with high priority, and stored in my Personal reminders list. Here are some details on how the parsing works:
- The name of the reminder is whatever is left when the date, time, priority, and list name are removed. 1
- The date and time can be entered in pretty much any normal format. Again, I’m using chrono.js behind the scenes here. Dates without times will default to having an alert at noon.2
- Priority is optional and can be set as
- The reminder list is set using a forward slash followed by one or more letters from the beginning of the name of the list. If a matching list is not found, or if no list is specified, the reminder will go into the system default reminders list.
I’m grateful to Greg Pierce, the developer of Drafts for recently adding some functionality to the app’s scripting engine in version 5.3 in response to my request. Without these changes, I wouldn’t have been able to make this action as fully functional as I wanted it to be. Being on the the beta channel in Slack, and now in the Drafts forum, I can honestly say that Greg is one of the most responsive developers I have come across. Even when he doesn’t plan to implement a feature request immediately (or at all), he explains his reasons clearly in a way that us non-developers can understand. Thanks again, Greg.
Note that I’ve decided not to automatically remove words like
by, so if you include these they will be added to the name of the reminder. I’d suggest omitting them. ↩
The default alarm time can be changed by tweaking the script. If there’s anyone who would like the parser to interpret dates given in the standard British format of dd/mm/yyyy, you can also change the
USat the beginning of the third script step to