Importing from opml/mindmap

I have a problem which is acute on Windows and irritating n the Mac version of Scrivener.

I make notes for long magazine articles in a mindmap because this allows the right balance between flexibility and structure. When I import the results into Scrivener, via OPML, all of the text fields end up as synopses rather than texts, which makes them impossible either to read or to work with, since the texts runs as one long unwrapped string out of the right-hand edge of the control.

On the mac, there is a workaround – in outline view the text wraps round in usable form, though this is only true in outline view. I still can’t work with the imported text in any other view. On Windows I can’t even do that. On Windows the outliner works differently. The synopsis appears as one uneditably unwrapped cell in a spreadsheet-like grid.

I don’t suppose there’s a solution to this inside Scrivener, but it’s probably something I could fix by fiddling either with the OPML file or the mindmap so that the nodes now imported as synopsis were recognised as text. To do this, I need to know what Scrivener recognises as the meat of an entry – the body of an index card, the text of an outline node, or just the text that might become part of a scrivening. Is there a particular label in the OPML file that will be recognised as such? Maybe “Notes”?

The synopsis should be wrapping everywhere you see it, so I’m not sure what’s going on there. On Windows the synopsis is a separate column in the outliner, whereas on Mac it’s combined with the title, but resizing the column should just expand the row height to show the full synopsis. If you try that, or double-click into one of the synopses to edit it and then click away, does the row height readjust to show the full synopsis?

Synopsis wrapping aside, you can address the real issue by going into Tools > Options and in the Import/Export tab, choosing to import the OPML notes into “Main Text (with Synopsis)”. On Mac this is under Scrivener > Preferences.

Sorry. On closer examination the problem is that the text comes in as titles not synopses, and it is these that don’t wrap on Windows. I can’t get my head round the distinction between “title” and “synopsis” easily because it’s just one layer of management more than I need, if I can put it like that.

What I can’t seem able to do is to get the lowest level of the mindmap tree – the text into Scrivener as text. If I convert it all to what the mindmap calls “notes” it still comes in as synopsis, mostly, though sometimes in scrivenings view I can see some apparently random fragments of text.

So what do I have to do to get Scrivener to recognise particular mindmap nodes as text? and not as the titles for non-existent fragments?

It’s so frustrating because Scriv seems designed for people who think entirely top-down, from the masterplan out through to the details, and my mind works in the opposite direction. I just want to have a huge soup of text fragments that I can tag and shape into larger structures until they all fit together.

I’m sorry, but this simply does not work on Windows.

I have converted all the leaf nodes into notes in freeplane, then exported them to opml. Nothing shows up as text when this is imported to scrivener. The same if I try to import the .mm file directly.

I think you will need a work-around to do what you really want.

I also think you probably can’t get what you want from OPML export, because of built-in limitations to the specifications for OPML. For example, quote marks in your node or note text will just break the OPML format on output.

I use mindmaps a lot and so have approached your same issue. What is wanted is a way to import a mindmap structure so that i) some of the mindmap nodes turn into binder structure with their node text becoming document/folder titles, and ii) some of the nodes become instead document body text.

Here is how I handle this:

Short version: I take simple tab-indented output from the mindmap, convert it to multimarkdown format using a small custom script, and then import that using Scrivener’s Multimarkdown import function. (I don’t know if Scriv Win has multimarkdown import, though.) The script is basically just replacing tab characters with hash marks, but there is one additional thing it is doing that warrants using a script for the job.

Longer version:

  1. First, in my case, it is not just the outermost nodes I want as body text. I want to be able to control how much of the structure of my tree turns into Binder structure (node text as title text) and how much ends up as body text (node text as document body text). For this purpose, I have settled on a simple mark (’§’) to tag certain nodes. Everything below such a tagged node will become body text.

Now to the business:

  1. I work with simple tab-indented output from my mindmap. A simple Copy operation of a tree or part of one accomplishes this for me.

  2. Then I run a small custom script on that to transform the tab-indented text structure into Multimarkdown format. The script turns indented node text into Multimarkdown heading text of appropriate levels (lines begin with #'s), but watches for the ‘§’ marks, so as to format stuff under that just as body text – this is the only source of complexity in the script.

  3. The resulting text then gets imported into Scrivener using its Multimarkdown import option.

The result is an imported binder structure that shares as much of the same structure as your mindmap as you wanted and whose most-nested documents contain the reaming portions of your mindmap as body text.* [EDIT: That should read ‘remaining portions.’ If there are reaming portions of your mindmap, well, that’s your private business. :blush: ]

I hope a future version of Scrivener will support directly our kind of usage scenario, but in the meantime, I hope this helps in some way.

–Greg

  • If a given document body text is built from more than one node of your mindmap (i.e. a whole sub-tree), it retains the structure of that sub-tree – it will present in a tab-indented outline form, just as you would expect.

Scrivener uses the “text” of an OPML outline element as the document title and imports the “_note” as the synopsis, text, or document notes depending on your settings. Freeplane doesn’t appear to use the “_note” attribute, so everything in the note is placed as “text”.

Since importing the .mm file directly doesn’t seem to be doing what you need either, you might try finagling the OPML file after exporting it from Freeplane and replacing “text” with “_note” to see if that imports.

Thanks, Jennifer. That may be the answer I am hoping for.

I might combine it with the answer above – since I have already got a script which identifies all of the “leaf” nodes in Freeplane and copies their text into a note, which doesn’t work – so that it put on some markup the Scrivener will recognise in multimarkdown. Thought and fiddling required here. Thanks to both of you again. I will report back on my efforts.

OK. Here is a crude but broadly effective workaround, tested at least on my mac (Windows machine not on the road with me)

To get Freeplane maps to work in Scrivener you need two things – a groovy script within Freeplane, and a text editor.

Here’s the groovy script

leaves=c.find{ it.isLeaf()==true}
leaves.each{
 oldwords=htmlUtils.htmlToPlain(it.text)
 it.text="{LEAF}"+oldwords
}
  • Run that script inside freeplane and then save out the map as opml
  • Open the opml file in a text editor and replace all instances of text="{LEAF}
    with _note="
  • Import the result into Scriv. All the leaf nodes will now be called “Untitled document”, which is a pain, but the text will be there.

There are occasional rough edges, but I just imported ~12,000 words like this into something usable and that’s good enough to be getting on with.

Greg, since you use markdown, have you seen this freeplane addon to export mindmaps to markdown directly? https://github.com/py/mm2markdown

Thanks. Freeplane is not actually the mindmap software that I use, though.

Does this help? [url]https://forum.literatureandlatte.com/t/free-form-corkboard-vs-scapple-godzilla-vs-mothra/23447/1]

this thread is a couple years old. wondering if there has been any improvement in Scriv. one or both of 2 functions would be the solution:

  1. OPML import has option to assign the outline text in OPML file to Title (if a non-leaf node) or the document text (if its a leaf node); OR
  2. Scriv edit function to “absorb” child nodes into a parent, by appending the title of all the child nodes inot the document text of the parent.

are either of these feasible?

having experimented with manual editing in Windows v 1.9.7.0, I’d say that importing a word doc directly into Scriv and then splitting the text using “split using selected as title” is going to be quicker than manually copy/paste the titles of leaf nodes into their parent text and then deleting.