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

Python OmniFocus library for generating reports Thread Tools Search this Thread Display Modes
I've wanted a reasonably flexible way of generating mardown/taskpaper/html reports of completed tasks from OmniFocus - but never quite found any love for AppleScript.

So I've developed a python library that directly reads the OF database and builds a complete model of the task/project/context hierarchy that can then be used to generate whatever you wish.

It's early days at the moment (there's no help at all yet) but there are example report generating scripts (for my purposes) that should get you going if you know python and sample AppleScript wrappers so you can add buttons that drive the scripts from the OF toolbar.

I've been using this for a few months now with no issues, but bear in mind that the problem of this approach (i.e. scraping the database) is that Omni make no guarantees about compatibility or support going forward. And nor do I :-)

Comments welcome.

The freshly minted GitHub repo is here.

Now if only I could run this in Python on the iPad :-)

Any particular version of Python required?
Originally Posted by whpalmer4 View Post
Now if only I could run this in Python on the iPad :-)
Give it a try, tell me how it goes :-)

Originally Posted by whpalmer4 View Post
Any particular version of Python required
I'm using 2.7.3 I think (on my ipad right now), but I'm not doing anything clever so the built in version should do.

One odd problem I have at the moment seems to relate to wide character support, but only if launched from AppleScript, it's fine when started from the console - haven't got to the bottom of that one yet...
I like the elegance of the hierarchy handling thank you !
Thankyou! It's actually my first Python program, it probably smells of Java :-)
I'm a Python novice, maybe I'm doing something wrong, but I get nothing when I try any of the reports. I did fix the obvious problem with my home directory being something other than /Users/psidnell, but if I try to run I get
bash-3.2$ python 
  File "", line 6
    def __init__ (self, out, types = {'Folder', 'Project', 'Task'}, indent=4):
SyntaxError: invalid syntax
and the most I can get out of any of the other scripts is
# Weekly Progress Report

## Bill Palmer Sat Feb 09 2013

I'm running Python 2.6.1 on 10.6.8. Any suggestions on my next troubleshooting step?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
OmniFocus 2 reports? danlandrum OmniFocus 1 for Mac 1 2013-02-01 09:37 PM
GTD: OmniFocus as Reference Library vvlevchenko Applying OmniFocus 14 2012-04-24 06:12 PM
A blind patch in OmniFocus Applescript library RobTrew OmniFocus Extras 0 2010-06-09 01:09 PM
OmniFocus -> PagePacker Script [Python] erik_westra OmniFocus Extras 15 2008-04-10 07:57 PM

All times are GMT -8. The time now is 07:28 PM.

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