Import nactionr xml files into ResultsManager format

Mike P. inquired off-line about the possibility of importing data from nactionr into MindManager for use with ResultsManager and provided a sample nactionr xml file. nactionr is a pocketPC-based GTD tool.

I don’t have experience parsing xml, and wasn’t going to even attempt it, but then remembered that MindManager can open XML files and render them as maps:

nactionr xml file as a mindmap

Even with this familiar map format to program around, I was still hesitant to dive in, but one next action led to another and in less than an hour a draft script to make the import was born. The nactionr_import.mmbas file can be downloaded from the Macro Library. It only took a few paragraphs of code to get the file’s data organized into the ResultsManager framework:

nactionr in resultsmanager format.

I don’t use the pocketPC or nactionr itself, so I don’t know if the script will be able to handle more complex data files. If you are a nactionr user/mindmanager user, feel free to test it out and let us know how it works. The macro expect your nactionr.xml file to be in your “My Maps” directory and will create a naction.mmap file with its output.

6 Comments »

  1. Jonathan Ballinger said,

    August 17, 2007 @ 2:56 am

    Hi, I’m the developer of nActionr and happened across this on a google search. You’ve done a nice job it seems, and I’d like to offer to send you a full breakdown of the nActionr file format (and to keep you updated whenever it changes) if it will help you with this macro.

  2. ActivityOwner said,

    August 17, 2007 @ 5:56 am

    Thanks Jonathan — I’m not a pocketPC user, so any further work on this will need to be triggered by readers. Your file format seems well designed. The only thing I wasn’t clear on was if/how it captures sequencing and hierarchy of projects and tasks.

  3. Jonathan Ballinger said,

    August 17, 2007 @ 12:22 pm

    There’s a few changes I’ll be doing for the next version (1.2) that will make using it a bit easier. For example right now the id is only unique at that point in time, but this is obviously not useful for external applications so I added code in that removes that factor.

    There is no project or task hierarchy outside of a task belongs to a project right now.

    What I’ll do is create a page on my site that contains a full file format breakdown which will aid integrations like this. I’ll update here when its done but it’ll probably coincide with v1.2 which will have the changes I mentioned above.

  4. ActivityOwner said,

    August 17, 2007 @ 7:16 pm

    Having the id change over time is only an issue for ongoing two-way sycronization. This script is purely an import and avoids duplicates by comparing the actual text of the project/task to those in the existing map so things are fine as they stand for me.

    What is the “d” field in the projects? I thought that might be some type of hierarchy given that the demo had something about Auntie in several of them.

    Writing out the xml to export back to nactionr is a more involved project. Although MindManager reads and renders xml files, the file it saves is much more complex and wouldn’t be compatible. The xml for nactionr would have to be written out directly by a macro. That would be easier to do by generating new ids on the fly rather than carrying them back and forth.

  5. Jonathan Ballinger said,

    August 20, 2007 @ 2:50 pm

    The ids can be generated on the fly as long as they are unique within the file. Right now the order of ids determines the order of display.

    The d field is a description of the project. IE where you’d put your notes about it if you had any.

    Project has:

    id
    n = name
    cc = colour code (hexadecimal)
    e = due date
    s = start date
    d = description
    dn = display name (redundant)

    Context has:

    id
    n = name
    cc = colour code
    d = display name (again redundant)

    Task has:

    id
    t = text (the first newline/carriage return is taken as being the end of display portion. Anything following the newline/carriage return is not displayed in the main tasklist but is in the extended detail page — allows per task notes simply)
    c = completed (true /false)
    cc = colour code
    sm = is someday/maybe (true/false)
    pid = single long references project id
    cid = array of longs, references context id
    sd = start date
    dd = due date
    co = completed on date

    Nactionr (the root) has:
    npid = next project id, a bit of a misnomer as this should be equal to the highest project id used in the file but having it one more won’t be a problem
    ncid = next context id (as npid)
    ntid = next task id (as npid)
    f = filename
    v = file version, 0.6 is current

    That’s all the elements and attributes that are there right now. When I release the next version of the application I’ll also have a page on my site that details it but this may help for now.

  6. OmniFocus for IPad Review » ActivityOwner.Com – Getting Things Done with MindManager said,

    September 3, 2011 @ 10:34 am

    […] The first four items were somewhat concerning to me, particularly the stranding of data and potential disaster recovery issues (I don't need involuntary GTD bankruptcy at this point). After a bit of googling, I discovered that OmniFocus uses xml as its native data storage format, which liberates the data in an albeit cryptic organization. MindManager can actually open xml files, which allows the context to be processed with macros. I used this approach several years ago to develop import routines for BaseCamp and (non defunct?) nactionr. […]

RSS feed for comments on this post · TrackBack URI

Leave a Comment

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.