-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert a text file exported by vym to a standard indented text format. #101
base: release
Are you sure you want to change the base?
Conversation
It is not as pleasant to read, but much better for data interchange, for example to copy and paste into Freeplane or another mind map program.
Thanks for the script! Though for data interchange - why use non-standard text format? XML, JSON, YAML are way better formats than just indented text. I could also think of improved Markdown (just received another patch there), where there is already number of tools to generate and also process Markdown? What is the advantage of the text your script produces? |
Thank you for viewing my pull request. To answer your question: because it actually works--currently not just potentially--and it is the only way that actually works--currently, not just potentially--that I know of to move a mind map from VYM to Freeplane. XML, JSON, YAML, might well be better choices for moving a mind map from VYM to another mind map program theoretically. As far as I know, they are not currently available as export options from VYM. Please correct me if I'm wrong. Edit: To be clear, I know of course that VYM can export to XML. But as far as I understand, that XML cannot be imported into Freeplane. And I realize that there is a potential to transform that XML into a format the Free plane can load or import. I might even think about writing such a program. But for now, plain text export from VYM plus my awk script is the only way I know that currently works. I would be glad to learn that there is a way that I do not know about. |
By the way, I don't understand why you've called tab-indented text a "non-standard text format". Tab-indented text to represent an outline or tree structure seems about as universal and standard as possible to represent an outline or tree structure. Of course it has the drawback of being plain and simple, but that also makes it very easy to manipulate with standard tools like text editors and utilities like sed and awk. A format like XML or JSON or YAML can do a much better job of representing the richness of a mind map, but I didn't write such a utility, I wrote a text utility because I am currently capable of doing so, and it works and solves my problem. I do not know of a standard format for mind maps, other than tab-indented text, which admittedly loses a lot of the richness of a mind map. I know that a bunch of different mind map programs use a bunch of different and incompatible formats. XML itself is not a standard format for mind maps as much as it is a family of standards for mind maps. Same thing goes for JSON and YAML. The awk script is an optional tool. It does not hinder other ways of moving data around. I am thinking of (but no promises) writing a program that transforms the XML that VYM exports to a different schema of XML. Maybe to a Freemind XML format. What do you think of that? Do you want to give me any input before I start? |
Thanks for sharing your thoughts. I see several options:
All above is possibe, personally I'd vote for the vym script, which basically is Javascript: An example for iteration in release branch could be this :
In the current develop branch this already would look a bit different, as I am currently moving many of the commands from VymModelWrapper to BranchWrapper. So it probably would be approx. something like this:
What do you think? Analog to text export one could also build a string with Freeplane XML of course. I could also maybe build a file dialog, which could be opened by the script to select a destination |
Thank you for your very thoughtful response, insilmaril. Regarding an indented text export... I did it in awk because it got the job done and easily. I wrote it to work with the export format that VYM (I use version 2.6.11 from Debian Stable) calls "Text (ASCII)". I think that having the indented text export format available is generally very useful. I could fairly easily edit the C++ code of VYM to to export to indented text format, then no extra script would be needed. The code would be very similar to the code already written for "Text (ASCII)" and OrgMode. I might be willing to do this work and submit a pull request, but only if you want it. The awk script works fine for me currently, and I don't want to do the work unless it will get accepted. |
Regarding VYM exporting to Freemind/Freeplane mind map format (.mm) . . . Do you have an XSD for VYM XML format? Any other concise documentation? I have been (to some extent) reverse engineering the formats. What is complicated about XSLT method? And why would it create a platform-dependency? I see that VYM already uses an XSLT for Task Juggler export. Does that have limited platform availability? I have been using the xalan command to do my transformations, FYI. |
Thanks for all the thoughts you put into this. For XSLT: The question is how to execute to parser to transform the XML. I'd have to find out how to do this on Mac and Windows, on Linux it also would a dependency to a 3rd party software, which would need to be taken care of by packagers for the various distributions. So personally I'd prefer a vym script (easy to modify and no need to recompile vym) or C++, both easily portable. I'd help with both approaches. Unfortunatly I didn't bother to come up with a XSD so far, also the XML is changing (slightly) while I am working on 3.0. The versions in develop branch are able to read the pre-2.9.500 versions, but not vice versa. Another idea could be to create an export specifically for Freeplane, again maybe a vym script might be interesting for same reasons as above. What do you think? I just don't have the time to learn about Freeplane myself... -Uwe |
It is not as pleasant to read, but much better for data interchange, for example to copy and paste into Freeplane or another mind map program.