Freemind on the Mac, and converting to OPML

I wrote last year about a great open source brainstorming and mind mapping tool, Freemind 0.8.0 - Java Mind Map software, but I was concerned that the program hadn’t seen a significant update in several years. Well, it’s just been updated this year to 0.8.1, and you can download it from FreeMind. Version 0.9.0 is still an unstable beta, and not readily available As a Mac guy, I’m interested in Importing/exporting to FreeMind from my favorite outliner program, OmniOutliner. I started by downloading version 0.8.1 from 2008-01-26, as a Mac OS X .dmg file, which is the most recent version of the program available as a DMG file. Next, it’s time to run XSLT transformations on the Mac. Some XSLT resources: The Tao of Mac - Resources led me to XSLT Tools Scripting Addition. I downloaded their XSLT Tools. I also looked at AquaXSL, from Scandalous Software - Mac XML Tools by Todd Ditchendorf, which is not suitable for bulk transformations, but demonstrated that I could take a FreeMind document, convert it to OPML, and open it in OmniOutliner. I can script this using Automator: Transforming a Shell Script into an Automator Action using the xsltproc tool, or I can just do it from the command line, like this: xsltproc --verbose --output output-file.opml /Applications/FreeMind/accessories/mm2opml.xsl inputfile.xml Note that xsltproc doesn’t care what the file names or extensions are, either. Now I’m getting greedy: I’d like to use these tools to connect FreeMind to OmniFocus. Answers to the question Export to omni outliner? led me to some AppleScripts that might help: Omnifocus to Omnioutliner Pro exporter and Create an OPML version of the Omnifocus database, or Curt Clifton | Software offer some export scripts for OmniFocus. These tools are useful for anyone who uses mind mapping software that supports OPML, including NovaMind Pro Mind Mapping Software.


Neil Johnson said…
I was also able to run this in reverse, to import an OPML file from OmniOutliner into Freemind. Here's a sample command:

xsltproc --verbose --output /Applications/FreeMind/accessories/opml2mm.xsl exported.opml
Brian Fox said…
Hi, I'm a bit of a novice, but would love to be able to convert between omnioutliner and freemind. When I tried following the above example using the following command (omnioutliner->freemind):

xsltproc --verbose --output /Applications/FreeMind/accessories/opml2mm.xsl exported.opml

I got the following error:

xsltproc --verbose --output /Applications/FreeMind/accessories/opml2mm.xsl New Plan.opml
warning: failed to load external entity "/Applications/FreeMind/accessories/opml2mm.xsl"

any thoughts? Thanks!
Neil Johnson said…

A couple of solutions. First, you need to locate the "opml2mm.xsl" file on your hard drive -- I recommend the always handy Spotlight. Just update the path name in the command listed with the full path to the file on your hard drive.

Second, if you've located this file, you could also use the Export feature in Freemind itself:

File > Export > Using XSLT... to open the ExportDialog box. There, use the browse button to choose the XSL file you just located, and also provide a name and location for your export file. Finally, click [Export]. This runs the same transformation as the command line above.

As you can see, you need to know where the XSL file is with either approach. You can always download Freemind again, as these files are part of the distribution.

Hope that helps!
Brian Fox said…
Neil, Thanks so much for your help. I've made some progress finding the opml2mm.xsl file and using the export function you described. However, the omnioutliner file that gets created is consistently empty. I have a feeling something is not right with how I've installed XSLT tools. I followed instructions:

Please follow these steps to install the XSLT Tools scripting addition on Mac OS X systems:

1. Create a folder named ScriptingAdditions in your user account's Library folder (known as ~/Library) if one does not already exist.
2. Copy the XSLT Tools.osax into the ~/Library/ScriptingAdditions folder.

Is this the right place for the installation?:
/Users/brianfox/Library/ScriptingAdditions/XSLT Tools.osax

Once again thanks for your help. Is there any other reason you can think why I could be having this problem. When I try using the command line I get the following error message:

warning: failed to load external entity "/Applications/FreeMind/accessories/mm2opml.xsl"
cannot parse /Applications/FreeMind/accessories/mm2opml.xsl

I appreciate your help. -Brian
Neil Johnson said…

First, it looks like you put the XSLT Tools.osax file in the right place. Second, it looks like the mm2opml.xsl file on your computer is damaged or corrupt. I'd suggest downloading the latest Freemind and grabbing a fresh copy of mm2opml.xsl from the Freemind download.

Hope that helps!
Brian Fox said…
HAHAHA! It all works! About three stupid mistakes on my part that I figured out at a rate of 1/hr. Like I said I'm a bit of a novice. But, thanks again for your help! I hope I grew some neurons in the process. -b
Great work. Have you created an applescript or automator action for the mm2opml conversion that I can leech from you? That would be awesome. BTW, do you still do this much? I am thinking of FreeMind for brainstorming/planning, OO for structuring and streamlining projects, and then OF when the project is at ground level.
Neil Johnson said…

I am more of a bash script guy when it comes to this task. Are you interested in moving files from Freemind to OmniOutliner or vice versa? I could bang out a script that converts all the .opml files in a directory to .mm, or again, vice versa.

For single files, I just refer to this blog post and copy and paste the commands into the Terminal, changing the file names as required.
The way I currently envision my projects evolving (and thus converting) is:


But you know what: In Freemind, the XSLT export option auto-fills the last XSL file I used, so doing the Freemind to Omnioutliner conversion is actually a snap if I ever want to do it in the future (I didn't know it auto-filled when I did my previous comment). I guess I don't really need a script! Thanks for the very helpful info on this post.
Neil Johnson said…
Freemind really does fine exporting to OPML a file at a time, using the built-in filters and the Export dialog box, as you've discovered. I use the command line to import OPML into Freemind, and for handling several files at once, but otherwise the approach you describe works just as well, and you don't have to mess around with Terminal.
Deb said…
Hi there

I've read this thread a few times because although I have no trouble exporting from Freemind and opening the opml file in OmniOutliner Pro I haven't work out how to do it the other way around.

I have a file that I exported from OOP and now I want it in Freemind.

If you have time can you be specific about the steps?

I know where the files are in the Accessories folder, I can open a terminal and type a command. But I think I am confused about moving things into the script folder - what to move and where do I get it?

Thanks so much if you can help!

Deb said…
Hi again ... Spoke too soon - I persevered and now can successfully import from opml that is exported from oop to freemind by using the terminal.

If there is an easier way to get it into the terminal window, that would be a buzz but thanks to your instructions I can do it via terminal anyway.

So thanks!

Dan said…
Hi Neil

I'm trying to import omni outliner opml files in to freemind .mm. I've read your blog post several times and all the comments but when I run the command line I get the following error:

warning: failed to load external entity "/Applications/FreeMind/Contents/Resources/Java/accessories/opml2mm.xsl"
cannot parse /Applications/FreeMind/Contents/Resources/Java/accessories/opml2mm.xsl

Have you any advice you can offer to help me resolve?

Neil Johnson said…

You're having problems with the file


Take a look in the Finder to see if the file exists at that location. Try reinstalling Freemind, since the file might be corrupted, too, and again check to make sure the reinstallation put the file where it should go. Finally, run Software Update to ensure you have the latest Java distribution.

Post a note here and let us know if you were able to fix the problem.

Popular Posts