Skip to content

Instantly share code, notes, and snippets.

@derickfay derickfay/tp2fantastical
Last active Aug 20, 2016

What would you like to do?
Sends the input text to Fantastical, converting TaskPaper @Due(YYYY-MM-DD) tags to plain text for Fantastical to parse as a Reminder. Designed for use with Drafts and Pythonista.
# tp2fantastical
# by Derick Fay, 2014-04-06
# an adaptation of the Selection to Fantastical Editorial workflow
# ( )
# for use with Drafts and Pythonista (both required)
# works on iPhone and iPad
# I have also written an equivalent script for TaskPaper for the Mac
# available at
# installation:
# 1) copy this script into Pythonista and name it tp2fantastical
# 2) create a Drafts URL Action with the following URL:
# pythonista://tp2fantastical?action=run&argv=[[draft]]
import sys
import webbrowser
import urllib
i = sys.argv[1]
#i = "Test item @due(2014-05-14)"
if '@due(' in i:
i = theStart + " due " + theDate + theEnd"fantastical2://parse?sentence=" + urllib.quote(i))

This comment has been minimized.

Copy link
Owner Author

commented Apr 21, 2014

2014-04-21: corrected Drafts action


This comment has been minimized.

Copy link
Owner Author

commented May 5, 2014

added link to Mac version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.