Created
November 23, 2012 17:59
-
-
Save Zettt/4136666 to your computer and use it in GitHub Desktop.
New OmniFocus Task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import webbrowser | |
import urllib | |
# omnifocus:///add?name=[prompt]¬e=[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