Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
New OmniFocus Task
import webbrowser
import urllib
# omnifocus:///add?name=[prompt]&note=[prompt]
omnifocus_url = "omnifocus:///add?"
task_name_url = "name="
note_url = "note="
# input
prompt = "> "
task = raw_input("Task: \n" + prompt)
note = raw_input("Note: \n" + prompt)
# url encode
task = urllib.quote(task)
note = urllib.quote(note)
# open in omnifocus
webbrowser.open(omnifocus_url + task_name_url + task + "&" + note_url + note)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment