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

ofexport - export to text, taskpaper, html, opml Thread Tools Search this Thread Display Modes
This is a command line tool that directly reads your OmniFocus database and writes text files in a variety of formats.

Instructions here.

Let me know if you have any trouble or ideas.

When I edit the script in Xcode I get command not available. ANy ideas what the problem might be?
Originally Posted by nickwild View Post

When I edit the script in Xcode I get command not available. ANy ideas what the problem might be?
I'd hazard a guess that you might have missed a step of the installation instructions here or perhaps got the path wrong.

Have you:

1. Modified ofexport so the path to is correct?
2. Set execute permission on ofexport ("chmod +x ofexport")?
3. Modified your $PATH variable so your installation folder is on your path?

If you're running terminal and in your installation directory, type "bash ofexport" on the command line. If it prints out it's options then (1) is OK.

If you type "./ofexport" and it prints it's options then (2) is OK.

Otherwise I'd suspect (3).
Just made V2.0.0 available.

This version has fancy expression filters e.g:

ofexport -E -a done=any -I -t "flagged or (due='to tomorrow')" -o /tmp/ex8-due-or-flagged.taskpaper
creates a taskpaper document with all uncompleted tasks that are flagged or due in the next 2 days.

Usage examples here.

Full documentation here.

I've been using this version for about a week so most of the screamingly obvious bugs are gone but the expression parsing is pretty new so bear that in mind...
Is it possible to filter by a perspective?

I have one called current focus that is the 5-10 projects I'm focusing on right now. I find it helpful view that perspective in context view ungrouped, sorted by due date, with availability set to next action, as it tends to give me a list of the 5-10 actions I need to be focusing on.

It would be great if I could put that on my desktop with geektool and hazel.
Originally Posted by kingsinger View Post
Is it possible to filter by a perspective?
Not yet - that would be nice though!

The nearest you can get is to use the filtering to include/exclude the same (or a similar set) of tasks that you see in your perspective.

Something like:

ofexport -p 'text="Proj1|Proj2"' -E -a done=any --open -o ~/Desktop/x.taskpaper
Would do the trick, but you'd have to keep it up to date with what projects are current. I have a bunch of little fragments like this that I put in dedicated bash scripts.

Alternatively, a lower maintenance scheme is to "tag" the projects you want to appear in your report by adding something to the notes in your current projects in OmniFocus.

For example by adding "#current" to the notes of a few of your projects you could then use:

ofexport -p 'note="#current"' -E -a done=any --open -o ~/Desktop/x.taskpaper
I use this trick for exporting certain items to my calendar.

The problem with ofexport directly using perspectives is that I think the each perspective is stored as a rule that has to be executed in order to derive what's visible in it - and there are several aspects of the visibility of items in the omnifocus database that I've yet to understand (such as if a project/context is paused, or what the next action is). Until I've decoded those I can't really replicate a perspective faithfully.

Detecting the paused/on-hold status is next on my list of things to decipher.
Great. That all makes sense. Right now, I'm just trying to get ofexport to run on my machine. I think I installed it correctly (put it in my home directory, etc.). I'm running 10.6.8. Don' t know if that's an issue.

When I issue the "ofexport -?" command in the terminal, this is what I get back:

Traceback (most recent call last):
  File "/Users/Redacted/ofexport/src/main/python/", line 25, in <module>
    from of_to_tp import PrintTaskpaperVisitor
  File "/Users/Redacted/ofexport/src/main/python/", line 17, in <module>
    from fmt_template import Formatter
  File "/Users/Redacted/ofexport/src/main/python/", line 40
    self.nodes = {k:Template(v) for (k,v) in data['Nodes'].items()}
SyntaxError: invalid syntax
I get something the same message when I run "ofexport -o report.txt".
Originally Posted by kingsinger View Post
I'm running 10.6.8. Don' t know if that's an issue
It probably is, or more specifically it might be your python version.

I'm running OSX 10.8.3 and if I run "python -V" I get 2.7.2.

It looks like your python interpreter is barfing on a "dictionary comprehension", a quick google showed up exactly your problem here. I'd guess you have a pre 2.7 version of python.

Sorry about that, I'd better add some pre-requisites to the release notes :-(

I think it's possible to go fetch a newer version of python and install it without overwriting your system copy - but you're in uncharted waters there.


It looks like the first OSX version to get python >= 2.7 was Lion with 2.7.1.
So it definitely won't work for anything older than that without installing a newer python. Hopefully it does at least work on Lion!

Anyone tried it on Lion?

Last edited by psidnell; 2013-05-09 at 02:29 PM..
Yup, I've got 2.6.1.

Oh well.

Originally Posted by kingsinger View Post
Yup, I've got 2.6.1.

Oh well.

I've added a pre-requisites section indicating that it won't work with the version of python that ships with Snow Leopard.

It can be upgraded: but I don't know what issues are associated with doing that.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch Export OO to OPML or Text adgirard OmniOutliner 3 for Mac 0 2012-10-04 12:53 PM
.html extension on dynamic html export pairustwo OmniOutliner 3 for Mac 3 2011-09-10 02:53 PM
Bug - Export as TXT (TaskPaper) Vlad Ghitulescu OmniFocus 1 for Mac 2 2011-04-29 04:36 AM
Pasting Taskpaper-format text into OmniOutliner RobTrew OmniOutliner 3 for Mac 1 2011-01-11 06:00 AM
Export Properties:Notes as HTML Roll Over Text? jeffreykennedy OmniGraffle General 6 2009-10-26 08:40 AM

All times are GMT -8. The time now is 08:38 PM.

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