Convert .mapz file to usable text

36 views
Skip to first unread message

Bob Newell

unread,
Dec 9, 2016, 6:01:37 PM12/9/16
to Labyrinth Discussion
Has this already been done? I'm working on a Perl script to parse the .mapz export file, but I don't want to reinvent the wheel if it's already out there (though I haven't seen it).

I'm heading toward a simple text output structure:

Title
"Thoughts" with identity #
List of iinks (child and parent identity numbers)

and that's it. I would like to make it hierarchical (e.g. suitable for Emacs org-mode, etc.) but there is the issue of circular linking being allowed.

Doing this isn't at all hard, just a little tedious. I'll post here when it's done.

Thomas Kluyver

unread,
Dec 9, 2016, 6:06:29 PM12/9/16
to labyrin...@googlegroups.com
I have a vague memory of someone before trying to make a hierarchy from it and running into the fact that Labyrinth maps are not hierarchical. But I have no recollection of who or in what context. I'd suggest you have a quick scan through the archives of this list (it's very low traffic), and if you don't spot anything relevant, assume that your wheel has yet to be invented. ;-)

Thomas

--
You received this message because you are subscribed to the Google Groups "Labyrinth Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labyrinth-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bob Newell

unread,
Dec 10, 2016, 11:00:00 PM12/10/16
to Labyrinth Discussion
I couldn't find much with a quick look. But yes, I have (re)invented this wheel and it seems to work.

There can be as much or little structure as desired and I can output an outline-like file provided that I ignore circular links. I do this by saying that a parent can have any number of children, but a child can only have one parent, and if I encounter a link that is a second parent for  a given node, I simply ignore that link.

Of course, all nodes don't have to be linked to other nodes or to the origin. There can be any amount of standalone structure.

I'll spruce things up a bit and post here in a few days. It's relatively crude but it works.

I could have stayed with VYM, which already outputs org-mode and many others, but I do like Labyrinth's ease of use and particularly speed of use, in addition to the completely free-form placement of nodes. I'm finding it to be a terrific tool for developing ideas for fiction.

Thomas Kluyver

unread,
Dec 11, 2016, 4:41:28 AM12/11/16
to labyrin...@googlegroups.com
Thanks Bob. Development on Labyrinth has kind of stopped, but I'm glad it's still useful. :-)

Bob Newell

unread,
Dec 11, 2016, 4:26:43 PM12/11/16
to Labyrinth Discussion
Okay --- I've put a working prototype here (as it's too long to put in a reasonable message);

http://www.bobnewell.net/filez/laby2org

Again, it's a Perl script to convert an exported .mapz file to a simple org-mode outline. I don't think I'll be doing a lot more with it, as it works "well enough" for my use.

I might try to fix a few Labyrinth bugs if I can, but time is always an issue. The biggest problem seems to be that at least for me save-on-close is not reliable and thus I lose stuff. Better to wait 60 seconds for an autosave, or do an immediate export prior to quitting.
Reply all
Reply to author
Forward
0 new messages