xmindmark
v0.3.2
Published
A mind mapping markup language, compatible with markdown, convertable to/from xmind.
Downloads
869
Readme
XMindMark - Lightweight markup language for mind mapping
XMindMark is a lightweight markup language for mind mapping inspired by markdown. It is designed to describe structures and elements of a mind map easily.
Just like everyone can use mind mapping software to organize ideas and improve efficiency, everyone can benefit from XMindMark.
XMindMark files are written in plain text, which means that you can describe a mind map faster using any text editor at any time anywhere, like:
Seasons
- Spring
- Summer
- Autumn
- Winter
For more infomation about XMindMark syntax, please visit XMindMark specification.
The recommended way to save a XMindMark file is to use .xmindmark
as its extension name, though you can use any other names as you like. If you are developing an application that distributes or generates XMindMark files, you're encouraged to use application/vnd.xmind.xmindmark
as the mime type, or org.xmind.openformat.xmindmark
as the UTI.
From XMindMark to Mind Map
We provide xmindmark to helps you convert XMindMark files into various forms of mind maps easily.
For an XMindMark file with the following content,
Seasons
- Spring
- Summer
- Autumn
- Winter
you can easily convert it to a graphical mind map using xmindmark:
See also:
Use xmindmark as a CLI program
Install
Make sure Node.js and npm is available on your computer, and run the command below in your command line program:
npm install -g xmindmark
Convert xmindmark file to XMind file
> xmindmark <your-xmindmark-file>
A .xmind
file will be generated in your working directory, which can then be opened and further edited using XMind.
You can also pass your XMindMark file through standard input:
> cat <your-xmindmark-file> | xmindmark
This command has the same effect as the previous one.
Convert XMindMark file to SVG file
> xmindmark -f svg <your-xmindmark-file>
# or
> xmindmark --format svg <your-xmindmark-file>
You can use -f
or --format
flag to specify the target format of the output file. So far xmindmark supports these target formats:
xmind
svg
If no target format is specified, xmindmark will use xmind
by default.
In the case above, a .svg
file will be generated in your working directory.
Specify the output directory
> xmindmark -o ./out <your-xmindmark-file>
# or
> xmindmark --outputDir ./out <your-xmindmark-file>
You can use -o
or --outputDir
flag to specify the output directory where the generated file will be placed. Both relative and absolute path are supported.
Get more information
> xmindmark -h
# or
> xmindmark --help
Use xmindmark as a Javascript library
Install
> npm install xmindmark -S
Usage
import { parseXMindMarkToXMindFile } from 'xmindmark'
const xmindMarkFileContent = `
Central Topic
- Main Topic 1
- Main Topic 2
`
const xmindArrayBuffer = await parseXMindMarkToXMindFile(xmindMarkFileContent)
Currently, xmindmark only supports converting string
content to ArrayBuffer
of .xmind
file. You can then save it to the local disk or upload it to an online storage.
Roadmap
- Default theme. Generate files with pretty color theme.
- Syntax parser API. Improve and expose the parser API to allow developers to obtain more detailed syntax and semantic information.
- Editor language support. Allow users to interact with XMindMark files easily and gracefully in text editors like Visual Studio Code.
Troubleshooting
Getting stuck during conversion process
Converting XMindMark files to .svg
files relies on a graphical environment, so when xmindmark converts an XMindMark file to a .svg
file for the every first time, it must complete the following preparations:
- Download a bundled version (specified here) of Chromium by puppeteer-core.
- Download the mind map rendering engine from XMind official website: https://assets.xmind.net.
These downloads will be cached in the local disk. The next time, xmindmark will just start converting if the cache is still valid.
If there is a problem during the preparation, please check whether your network is available. If the problem still exists, please create an issue.
"Output file exists"
If the file to be exported already exists, xmindmark will report a warning message and quit without doing anything else.
Other issues not mentioned here
You can try to find existing related issues, otherwise please create an issue and report to us.