OliverCi / freeplane2md

Convert Freeplane mind maps into Markdown format
GNU Lesser General Public License v2.1
18 stars 3 forks source link
converter freeplane markdown python

freeplane2md

freeplane2md converts mind maps in Freeplane format into Markdown.

Freeplane is a widely used mind mapping application used for notetaking, brainstorming, planning and similar tasks. Its file format (usual ending .mm) is a dialect of the Freemind XML format. Often though, one might want to continue to use your mind map as Markdown document, e.g. to

Furthermore, Freeplane can this way be used as a more visual tool to create Markdown in the first place, e.g. when brainstorming with many people.

There are already different scripts and plugins exporting or converting towards Markdown. However, these are so far very limited, as they mainly export all nodes as headers and also do not handle many Freeplane features, such as links and icons (e.g. https://github.com/memoryblade/mm2md/blob/master/mm2md.py, https://github.com/gelso/freeplane2markdown)

Features

Usage

freeplane2md.py [options] <mindmap>

or depending on your python installation

python freeplane2md.py [options] <mindmap>

Arguments

Options

-h --help                   Show help.
-V --version                Show version.
-v --verbose                Output additional information to stderr.
-o --output=<markdownfile>  Specify Markdown-file to be written to.
                            "-o -" writes to stdout.
-n --no-clobber             Do not overwrite target file, if it already
                            exists. (Overwritten by -f) 
-f --force                  Force overwriting target file.         
--no-timestamp              Omit HTML comment with timestamp, which is
                            otherwise used to prevent eroneous overwrites.  
-l --headerlevel=<level>    Number of levels to be converted to
                            headers [default: 1] 
-t --todo                   Treat as to-do list. Translate non header
                            nodes without icons to tasks with checkboxes
                            (- [ ]) and nodes with checkmark icons to
                            done tasks (- [x]).

See also freeplane2md.py -h

Examples

Several examples can be found in the folder test/. E.g. the mind map test.mm shows most supported features and is converted to test.md, if no options are set.

Installation

The script requires Python 3 and the following packages need to be installed:

The above packages can be installed with pip individually or all at once with:

pip install -r requirements.txt

Usage as library

freeplane2md can as well be used from other scripts by importing as a module and calling the function convert_file.

Planned improvements