This tutorial used MindManager for Mac (demo) v9.5.416, Tinderbox v5.11.2 on OS 10.6.8.
Save your MindManager doc and export
First, ensure your MindManager document is saved - you can't call the export process until the document is saved. Then…
In MindManager, use File menu, Export…
Select the export type
From the drop-down pane, select the Text/Outline icon, and then the OPML radio button. Click the Next button.
Choose the OPML filename and location
Use the standard chooser controls to name the file and set where it is to be created. Click Save.
Your OPML file is now exported and you can close MindManager.
Drag the OPML file to Tinderbox
Drag the OPML file from Finder onto your Tinderbox document (here, a new unsaved document). If dragging in a very big data set or if the document already contains other data, you might want to save the document at this point.
For this and the rest of the export process you will want to use the (default) Outline view.
Non-standard OPML source brings unwanted data
Unfortunately, MindManager includes non-OPML-standard data in the file, seemingly both at the end of every branch of the mind map and as last sibling at interim levels. The source is valid XML but Tinderbox can't fully understand it and the extra tags generate a blank note with no $Name or $Text. Plus they generate unwanted user attributes. At worst, these blank notes can make up half the notes created from the import! So, your next task is to clean out the 'bad' notes. Luckily, as they have neither title nor text, they're easy to spot.
Cleaning out the empty notes - add a container for the rubbish and an agent
Whilst Tinderbox doesn't allow automated removal of notes, an agent can still collect them all in one place for manual deletion.
In the next part there are several steps where extra info is shown to help explain the process. In normal import you likely won't want or need this more than once, if at all. As part of this 'extra' info, here column view has been turned on (View menu, Columns) as by happy chance it shows $ChildCount which will help illustrate the process. Note: displaying the child count is completely optional and has no effect on actual the import/cleaning process as such.
Now, add a note to the end of the document at root level, called "bin". Then, add a new agent - you can leave the default name as it's only temporary. The next step shows the settings for the agent.
Cleaning out the empty notes - configure the agent query
Open the agent's Rename dialog (Note menu, Rename… or use the shortcut: Enter key) and add the query. The agent's Rename dialog's query box doesn't quite show all the code, which is:
descendedFrom("OPML demo.opml") & $Name=="" and $Text==""
The red text is the name of your OPML import file and also the name of the container note holding all the imported notes, so at this point replace the example here with your own actual OPML filename. The query you've added finds, in order:
- all notes descended from container 'OPML demo.opml' (or the name of your input file)
- within those all notes with no title
- within those all notes with no body text
It is perhaps overkill to check the text as well, but it might help avoid a false positive and deletion of a note that's actually wanted.
Your nest task will be to add the action code, but before you do the next stepp shows what you'd see if you clicked OK at this point - i.e. the saved the agent with just query code.
Before the code runs
With just a query set, you can see there are 10 'bad' notes (and 10 real notes).
Cleaning out the empty notes - configure the agent action
Open the agent's Rename dialog (Note menu, Rename… or use the shortcut: Enter key). Enter the code above into the Action box.
A little explanation. As an agent collects aliases and you need to move the originals, so you must set $Container(original) to target the original note. Without the '(original)' suffix for $Container you would simply move the alias out of the agent and the next cycle would create a new one, and so on.
Also note that the new container for the bad notes is "bin", but being root-level the name must be cited with a / prefix as we're actually setting a path within the TBX document.
Click OK on the agent's Rename dialog.
After the agent runs
The 'bin' now holds 10 items and the agent none. This is why it was important the query only looked at descendants of the OPML import container, so we can tell there are no bad notes left.
Throw out the trash
Now, select the 'bin' and delete it and all its contents. Select the 'agent' and delete that too.
Save the TBX document.
One more cleanup item
It remains to clear up one more side-effect of the import. The OPML source emitted by MindManager also results in two unwanted custom attributes, $id and $version, also settings them as the default key attributes for the whole document. Note though that any existing notes already with a hard-set $KeyAttributes are unaffected.
So, you now need to reset the key attributes' default setting and then remove the extra custom attributes.
Resetting the $KeyAttributes default for the document
Open the Attributes palette (Window menu, Attributes or click shortcut [Cmd]+) and click on the System tab, if not already selected. Scroll the attribute list to the show the TextFormat group and click on KeyAttributes so its value loads in the Default value box.
Select and delete the value, so the box is empty. Click Change to save that edit.
Accept the warning
Click OK on the warning dialog that will be shown.
Deleting unwanted attributes
Now on the same palette, switch to the User tab. NB: If you added your OPML data to an existing TBX file that already had user attributes you may see more attributes listed than are shown above.
Select the 'id' item. Click Delete. Then select the 'version' item. Click Delete. The list should now be empty (unless you had other pre-existing attributes).
A last check key attributes have been reset
Re-open one of your imported notes, there should now be no key attributes.
Finished. You're ready to start work on your OPML data. This tutorial has been written in some detail, if you have to re-do this task you will find it's actually very quick and simple.
Extra credit import method #1: using a text editor
If you have a very big import, and you are happy using a full-featured text editor like BBEdit, it may make sense to 'clean' the OPML before import. This avoids both the empty notes and the unwanted attributes.
The technique here needs a text/code editor capable of regular-expression search and replace (e.g. TextEdit can't do this). This section uses Barebones' BBEdit (v10.1.2) but its free sibling TextWrangler should work just as well using the same settings. Adjust instructions accordingly for other vendors' text editors of your choice.
Open the OPML
Open the OPML file in the text editor. Above is just the first part of the file as used in the main part of the tutorial. Line #12, highlighted, showing the first of the extra non-standard tags.
Set up search and replace
Open Find ([Cmd]+[F]). Tick the Grep box unter the Find input. Now select the first line of 'bad' code in main window, including the line return at the end and paste it into the Find box. Now edit the pasted-in 'id' attribute value so it reads as in the picture:
… which in regular expression terms is: 'a 22 character string of any character(s), followed by two equals signs'.
If you omit the line return the the end of the Find code it shouldn't matter as blank lines are ignored on import. Leave the Replace box empty and click Replace All.
Inspect the resulting code. If it looks correct, then save and close, otherwise hit Undo ([Cmd+[Z]) and look for your mistake!
Import - all done!
Just drag import. No cleaning to do!
Extra credit import method #2: using OmniOutliner
This technique is even easier but does require you to have a copy (or demo) of OmniOutliner - either normal or Pro version. It's very simple:
- Open the OPML file in OmniOutliner.
- Save it (Cmd+s). This re-saves the OPML omitting the unwanted custom mindManager inclusions.
- Drag import the file to Tinderbox.