This Week's Sponsor:

Kolide

Ensure that if a device isn’t secure it can’t access your apps.  It’s Device Trust for Okta.


Fantastically Good Event Parser for Drafts 5

Peter Davison-Reiber created something pretty amazing in Drafts 5 – a natural language parser to create events in the system calendar natively, without launching other apps:

The way apps like Fantastical actually integrate with the system calendar in iOS is via an API which allows direct manipulation of calendar events. You may have seen the Allow app to access the Calendar? prompt when first launching apps which use this. Drafts integrates this API into its scripting capabilities, and so it occurred to me recently that perhaps I could build a similar functionality within Drafts using JavaScript. This would allow me to use the system calendar app, which I prefer aesthetically over Fantastical, while retaining the ability to enter events in natural language.

What I’ve ended up creating has almost all of the same functionality as Fantastical, but since it does not rely on launching an external URL scheme, is considerably faster. You can enter multiple events, each on a different line, and have them all instantly added to your calendar without even launching another app.

He used chrono.js, which is a natural language date parser written in JavaScript that he adapted to Drafts 5. This allows you to write something like “Monday at 2 PM” and the Drafts action will correctly interpret it as a date and time. This is not the first time Davison-Reiber created a Drafts 5 action based on chrono.js either – you should check out his natural language Things parser too, which takes my original idea and makes it even better and easier to use in Drafts.