Skip to content

Instantly share code, notes, and snippets.

@wtfaremyinitials
Created August 9, 2015 02:09
Show Gist options
  • Save wtfaremyinitials/a683853a952a62b8abc9 to your computer and use it in GitHub Desktop.
Save wtfaremyinitials/a683853a952a62b8abc9 to your computer and use it in GitHub Desktop.
Quickly add a task to OmniFocus from the CLI
#!/usr/bin/env osascript -l JavaScript
function run(argv) {
if(argv.length == 0) {
console.log('Usage: of [ transport text ]')
} else {
Application('OmniFocus').parseTasksInto(Application('OmniFocus').documents[0], { asSingleTask: true, withTransportText: argv.join(' ') })
ObjC.import("stdlib")
$.exit(0)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment