The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Simple, highly portable python script for Command-line inbox tasks Thread Tools Search this Thread Display Modes
I've been using OmniFocus for many years now, but recently lost my primary input (broken phone), so I needed an easy way to collect tasks for processing on my iPad(s).
Since I've got a web dav running on my hostgator account, I wrote a simple script to just push things to the inbox via email.

This python script should work out of the box for any 2.6-2.7 python installation. The only extra file I use is Evan Fosmacks The advantage here is that this is very portable, and most other scripts require OmniFocus is installed. There is risk as updates or edge cases could cause issues. Use at your own risk!

Just unzip this into the directory that OmniFocus.ofocus lives and set up your exim filter or procmail filter to pipe emails into the script.

For example, hostgator uses exim, so I set up an email account at SOME_EMAIL_ADDRESS, and modified the exim filter script (located at /etc/vfilters/ to include:

 $header_to: matches "SOME_EMAIL_ADDRESS"
 pipe "python /PATH_TO_SCRIPT/"
Now when I send an email to it will read every non-empty line in the body of the email and create separate inbox tasks. Remember to delete sigs before sending the email.

Alternatively you can use this as a commandline script, just run
python "Some new task" "Another new task"
I didn't want any bells and whistles since I like to collect directly into my inbox and add contexts/etc when processing, but it is very simple to add extra stuff if you are so inclined.

Please back up your omnifocus database before running this - I have not encountered any problems but I am not responsible for anything going pear shaped.

One question for the Omni guys - what does rank do? I take the highest rank value and increment it, but it seems like multiple things can have the same rank. I wasn't sure what good that value does.
Attached Files
File Type: zip (4.3 KB, 623 views)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

All times are GMT -8. The time now is 06:19 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.