OmniFocus from the command line

So I decided to out try OmniFocus, after enough recommendations from people that seem to get a lot more done than I do. It is a truly great program, and my copy of the GTD book is on its way.

There was one tiny annoyance for me which is that I spend a fair amount of time running Linux on either my laptop or my workstation, away from OmniFocus. And now that I got hooked on dumping ideas and todos via Ctrl-Option-Space, I want something similar there. OmniFocus has an option to add an extra rule to that keeps an eye on carefully constructed emails, so I have it look for email messages from myself whose subject starts with “–omnifocus”. Python has a nice smtp library, so this all makes for a nice 5-liner I call rememberto. Here’s the (public-domain) script:

#!/usr/bin/env python
import smtplib
import sys

yourself = 'Your Name <your@email>'

msg = ("From: %sTo: %s\r\nSubject: --omnifocus %s\r\n\r\n"
% (yourself, yourself, " ".join(sys.argv[1:])))


smtplib.SMTP('localhost').sendmail(yourself, yourself, msg)

Make that script executable, throw it in your path, and run it from a shell. Even better, run it inside Emacs and M-! rememberto go grocery shopping!


3 responses to “OmniFocus from the command line

  1. wow. that is is a good idea. I should learn me some more about how to use this OmniFocus program!

    • carlosscheidegger

      Obviously, I should be getting things done instead of fiddling with OmniFocus. But I guess that’s what this productivity porn thing is all about! 🙂

  2. I also use OmniFocus for both the Mac and the iPhone. I’d be interesting in hearing what contexts people use and how they use them, as this is one area I’ve always struggled with.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s