Skip to main content

A tool to convert between Freemind/Freeplane and PlantUML mindmaps.

Project description

Mind Map Converter

Overview

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

Features

  • Convert Freeplane/Freemind (.mm) to PlantUML (.puml).
  • Convert PlantUML (.puml) to Freeplane/Freemind (.mm).
  • Supports both standard PlantUML syntax (* Node) and legacy underscore syntax (*_ Node).
  • Command-line interface with proper argument parsing.

Installation

Prerequisites

  • Python 3.x

From PyPI

pip install mindmapconverter

From Source

  1. Clone the repository:
    git clone https://github.com/your-username/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.

Command Line Interface

python mindmapconverter.py input_file [-o output_file]

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mindmapconverter-0.1.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mindmapconverter-0.1.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file mindmapconverter-0.1.1.tar.gz.

File metadata

  • Download URL: mindmapconverter-0.1.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mindmapconverter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 97527d467832f9c263f4a90f280ff27c0140fdc1fa64cc7cfb60e104100f9294
MD5 508a054095550d7cc9e730b4e160edf3
BLAKE2b-256 d07b3d3c2c46d5ecec88802590669a19958fed5a617c48d35707bb182b7983fd

See more details on using hashes here.

File details

Details for the file mindmapconverter-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mindmapconverter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d93cd2a7e83f6bfe727f5b6d435b627d67ecfe29aae310c3126ddfc6d7be596d
MD5 ab6e79fad942273f22f7199ecb2484a3
BLAKE2b-256 5e421cfabd5ea86f28e2f9adf9550c31813a42c4d4c2b65a0d68ee2ee5a61727

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page