Skip to content

Instantly share code, notes, and snippets.

@Zettt
Created November 23, 2012 17:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zettt/4136666 to your computer and use it in GitHub Desktop.
Save Zettt/4136666 to your computer and use it in GitHub Desktop.
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