The Omni Group Forums

The Omni Group Forums (
-   OmniFocus 1 for Mac (
-   -   Omnifocus Backup File Format (

iluvembra 2010-06-19 04:43 AM

Omnifocus Backup File Format
Hi, I am trying to write a simple script (in Perl, most likely) which will pick up an Omnifocus Backup, read the XML and parse it, and then write a "dot" file that Graphviz can display for me.

Actually, I only want to display the Folder/Project tree structure down to individual tasks, though I might include a separate graph that shows contexts and links these in with edges to the nodes of the Folder/Project tree. (Thus some of the information in the backup files will be ignored.)

I felt that this would give a really nice added "perspective" (provided the tree didn't get too big of course, though one can always break this up).

I've already taken a look at the xml that is in the "contents.xml" files that get created when you unzip any given backup file - but have noted that even in a given day there can be several files in the backup and they appear to be incremental (for example if you delete something that action is stored as an additional xml node, which of course makes sense or you would not be able to undo later).

With this background, my questions are twofold:

(a) Does anyone know of a script or a tool which already maps out (as a graph/tree) your Omnifocus tasks?

(b) If not, is there someplace I can get definitive information on the format of the Omnifocus Backups (other than that they are in XML of course!) so that it might be a bit easier/quicker for me to write the script I'm hoping to develop.

Cheers for any help. This is my first post, so thanks to Omni for providing this forum.

curt.clifton 2010-06-19 05:43 AM

You might want to check out the OmniFocus Extras forum, where most how-to discussion of scripting OF takes place. [URL=""]This thread[/URL] seems to be a good starting point for your question.

iluvembra 2010-06-19 08:04 AM

Thanks, Curt - I will check out the link that you mentioned - since posting myself I was sitting in a pub (!) and figured out a game-plan for myself in the worst case scenario that no one else had done/felt this was useful.


meerestier 2012-04-16 05:30 AM

Any news on this?
Hi there,

I have been thinking about this as well...Actually using the d3.js framework

Did you get it to work?

I would appreciate any help on this...



iluvembra 2012-04-19 04:47 PM

Half Reply, Sorry for Delay
Firstly, my post was a LONG while ago and have not been actively reading this group forum and so even had to struggle to remember password to get back on (excuse for delay in responding).

I did get a hacked solution to my problem working but then realised I was trying to put too much structure into my Projects' file and never wound up using it. By contrast (following a good ScreenCast by David Sparks of MacSparky) I tend to add more structure to contexts.

Whatever be the case, I do still have that code lying around somewhere. It was not that difficult to back out the XML structure and I think I used the Perl Module XML :: Simple to read in the backup file.

A much harder problem I have been trying to work on in bits is to go from a MindNodePro file (with images and/or multimedia) and then automate that to a sensible KeyNote file - iWorks documentation of Keynote is minimal and they do not even pretty print when they save which is really sick. But also I realised soon that the structure of a Keynote Presentation is not clearly defined by a MindNode (or OmniOutliner) tree. So I am contenting myself to work on a general bag of tricks graph program in my beloved Lisp which I will soon start using for more fun stuff, but that's another story.

If you would be keen for me to dig out my Omnifocus backup parsing code in Perl I would be happy to do so - but please in that case email me at iluvembra AT gmail DOT com and I will hunt down on one of my messy external drives and send to you. Sorry but flat is in current chaos a bit and also home network due to central heating being replaced some months ago - not all back in place so please bear with me.

I don't often check in on this forum hence my request to communicate by email for this - will get swifter results.



iluvembra 2012-04-19 05:36 PM

Quick Note to my last post
I have found the code I wrote - the Perl code is incomplete - just reads in the file format from XML and does nothing more with it as I found that working with Lisp was easier for me being more familiar with that language and having found a simple XML parser as well.

The lisp code I wrote was very minimal and just reads in the XML and then grabs those nodes in the XML tree that are either tasks or folders or contexts and pushes them on one of two stacks which are then bound to global variables for me to play about with and display if I want to as the structure is in there through "children" links.

You are welcome to all of it as is and I would add the last step of writing a Dot input file for Graphviz as it is fairly trivial - but since you want to use JavaScript or aught I felt the most useful thing I could give you would be the structured output from the XML backup file (which I did pretty print in lisp so you should get a good feel for the structure of the XML backup file from Omnifocus).

But chances are you have already solved the problem so just email me if you want any more than this.



All times are GMT -8. The time now is 09:43 PM.

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