Ofpy :: Send tasks to OmniFocus from Linux / CLI


Just wanted to post a script I’ve been working on for a little while. It’s still rough (I’m a total amateur), but overall seems to be serving its purpose for me.

I love my Mac, but I do a fair amount of work on a few Linux systems as well, so I wanted a quick way to add a task from the command line. I made a Python script that either sends its arguments to OmniFocus by way of MailDrop. If invoked without arguments, it brings up a text editor (defaults to vim) which creates a text file in a directory to be synced to a Mac (e.g. by Dropbox) and monitored for tasks (e.g. with Hazel) and imported to OmniFocus with the provided AppleScript.

It also tests for an internet connection, and if none is present defaults to the second method – which should sync as soon as a connection becomes available.

Hope somebody out there finds it useful! Please submit bugs / issues via GitHub.