Skip to main content

Mind Map Converter

Overview

This project provides a Python script (mindmapconverter.py) to facilitate the conversion between Freeplane/Freemind XML mind map files (.mm), PlantUML mind map definitions (.puml), and Markdown nested lists (.md). This enables users to leverage Freeplane/Freemind for visual mind map creation and then convert these maps into formats suitable for embedding in documentation, especially in environments that support PlantUML rendering (e.g., GitLab, Confluence, Markdown viewers with Kroki integration) or plain Markdown workflows.

Features

  • Convert Freeplane/Freemind (.mm) to PlantUML (.puml).
  • Convert PlantUML (.puml) to Freeplane/Freemind (.mm).
  • Convert Freeplane/Freemind (.mm) to Markdown nested lists (.md).
  • Convert Markdown nested lists (.md) to Freeplane/Freemind (.mm).
  • Supports both standard PlantUML syntax (* Node) and legacy underscore syntax (*_ Node).
  • Hyperlink support across all formats.
  • Command-line interface with proper argument parsing and auto-detection.

Installation

Prerequisites

  • Python 3.x

From PyPI

pip install mindmapconverter

From Source

  1. Clone the repository:
    git clone https://github.com/larkly/mindmapconverter.git
    cd mindmapconverter
    
  2. Install the package:
    pip install .
    
    Or for development (editable mode):
    pip install -e .
    

Usage

The script automatically detects the conversion direction based on the input file's extension. You can also use explicit flags to control the conversion.

Command Line Interface

python mindmapconverter.py input_file [-o output_file] [--to-md] [--from-md]

Converting Freeplane/Freemind to PlantUML

To convert a Freeplane/Freemind .mm file to PlantUML:

python mindmapconverter.py input_file.mm -o output_file.puml

Example:

python mindmapconverter.py my_mindmap.mm -o my_mindmap.puml

If -o is omitted, the output is printed to stdout:

python mindmapconverter.py my_mindmap.mm > my_mindmap.puml

Converting PlantUML to Freeplane/Freemind

To convert a PlantUML .puml file to Freeplane/Freemind XML:

python mindmapconverter.py input_file.puml -o output_file.mm

Example:

python mindmapconverter.py my_mindmap.puml -o my_mindmap.mm

Converting Freeplane/Freemind to Markdown

To convert a .mm file to a Markdown nested list:

python mindmapconverter.py input_file.mm --to-md -o output_file.md

Auto-detected when the output file has a .md extension:

python mindmapconverter.py my_mindmap.mm -o my_mindmap.md

Converting Markdown to Freeplane/Freemind

To convert a Markdown file to Freemind XML:

python mindmapconverter.py input_file.md -o output_file.mm

The .md extension is auto-detected, or you can use --from-md explicitly:

python mindmapconverter.py notes.md --from-md -o notes.mm

Markdown Format Specification

The Markdown mindmap format uses the following conventions:

  • Root node: The first # H1 header becomes the root of the mindmap.
  • Child nodes: Nested unordered list items (-, *, or + markers) represent child nodes.
  • Hierarchy: Indentation (2 spaces per level) determines the depth of each node.
  • Links: [text](url) Markdown links are converted to Freemind hyperlinks (hook elements).
  • Multiline text: <br> tags in list items are converted to newlines in node text.

Example Markdown:

# Project Plan
- Phase 1
  - Design
  - Prototype
- Phase 2
  - [Documentation](http://docs.example.com)
  - Testing
    - Unit Tests
    - Integration Tests

Supported Syntax

The converter supports the standard PlantUML MindMap syntax using asterisks for hierarchy:

@startmindmap
* Root
** Child 1
** Child 2
*** Grandchild
@endmindmap

It also supports the legacy syntax with underscores (*_ Node).

Testing

To run the included unit tests:

python3 test_mindmapconverter.py

Contributing

Contributions are welcome! If you have suggestions for improvements, bug reports, or want to add new features, please feel free to:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Make your changes and add tests.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature/YourFeature).
  6. Open a Pull Request.

License

This project is licensed under the MIT License.

Metadata

Release files for mindmapconverter 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mindmapconverter 0.1.3
File Size Uploaded Provenance Actions
mindmapconverter-0.1.3.tar.gz 9.0 kB Without provenance Details for mindmapconverter-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mindmapconverter 0.1.3
File Interpreter ABI Platform Actions
mindmapconverter-0.1.3-py3-none-any.whl Python 3 none any Details for mindmapconverter-0.1.3-py3-none-any.whl

Total release size: 19.0 kB

Release files / mindmapconverter-0.1.3.tar.gz

Download URL mindmapconverter-0.1.3.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2d80febd490d4facc492905255b5ab3d641c16b300fa49fa4f7472bb017ce99e
BLAKE2b-256 checksum
How to use checksums
d0371c837fee685773a269f6206acb36735c87099398549af4037de249a77c78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / mindmapconverter-0.1.3-py3-none-any.whl

Download URL mindmapconverter-0.1.3-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
510b7649f3de17d0bb42ef6f1f58fafaf2b48feac796163523fe723def323bb6
BLAKE2b-256 checksum
How to use checksums
399e07ff7e315f4d0629b5438035292e47578a8c34fffac449f721a51f0d5447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for mindmapconverter 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page