Export OmniFocus2 database to iThoughts - Rob Trew Script


I really like the Rob Trew python script to export my whole OmniFocus database to a mindmap. I used it a lot in OmniFocus 1 and tried again with OmniFocus 2, but It didn’t work at the beginning.

I had to adapt a little bit, so I think it was a good idea to post it here in case of someone faces the same problem.

You can have a look at the original discussion in the old OmniFocus forums about this script is here : http://forums.omnigroup.com/showthread.php?t=25965

The python script repository is here : https://github.com/RobTrew/tree-tools/blob/master/OmniFocus%20scripts/Export%20to%20Mindmaps%20etc/OF2MindMap-023.scptd/Contents/Resources/ofoc_to_mindmap_023.py

And here is a great article about automating the process with Hazel : http://www.macstories.net/tutorials/visualize-omnifocus-as-ithoughts-map-opml-or-plain-text/

So what has changed since OF1 ?

  1. OmniFocus database is not stored at the same place : path is now ~/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Caches/com.omnigroup.OmniFocus2 (Omnistore version, I think it’s different if you bought OF from the Apple AppStore, but I’m not sure)

  2. The script and template file must be saved in a different folder. The correct path is : ~/Library/Application\ Scripts/com.omnigroup.OmniFocus2

  3. I had to change a line in the python script that locates the database to match the new location. Line number is 737. Change this :

    ofoc = os.path.expanduser(’~/Library/Caches/com.omnigroup.OmniFocus’)

to this :

    ofoc = os.path.expanduser('~/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Caches/com.omnigroup.OmniFocus2')

Here you have a screenshot of my Hazel window with the new config :

It’s now working like a charm !

Hope it can be useful for someone !


Hi there,

do you know if anyone has made this script available to copy. I am not very competent in applescript and would appreciate the support. NB i am also a person who purchases from the AppleStore if that makes a difference

Look forward to hearing from you

Sorry, I should also note that I am running Yosemite

Sorry Iain,

I don’t know this available as a single script.

To adapt this for the AppleStore version, you should change line number 737 to this :

    ofoc = os.path.expanduser('~/Library/Containers/com.omnigroup.OmniFocus2. MacAppStore/Data/Library/Caches/com.omnigroup.OmniFocus2.MacAppStore')