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 ?
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)
The script and template file must be saved in a different folder. The correct path is : ~/Library/Application\ Scripts/com.omnigroup.OmniFocus2
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 !