Explore mind maps as Python trees
Project description
mindmap-toolkit
Explore mind maps as Python trees.
mindmap-toolkit is a lightweight Python library for reading, navigating and analysing mind maps.
Instead of exposing the underlying file format, the library provides a clean and consistent tree API based on MindMap and Node objects.
The goal is to make mind maps easy to manipulate from Python, regardless of the original file format.
Currently, XMind is supported. Additional formats will be added in future releases through compatible parsers.
Features
- 🌳 Parse mind maps into a tree of
Nodeobjects - 📍 Navigate directly to any node using its path
- 🏷️ Explore labels
- 🚩 Explore markers
- 🔗 Read hyperlinks
- 📝 Read notes
- 🧭 Build breadcrumbs
- 🌲 Work on complete maps or subtrees
Installation
pip install mindmap-toolkit
Quick start
Load a mind map:
from mindmap_toolkit import MindMap
mm = MindMap.load("roadmap.xmind")
Navigate to a node:
backend = mm.at("1-0")
print(backend.title)
theme01
Every node is identified by its path.
example
├── domain01 (1)
│ ├── theme01 (1-0)
│ └── theme02 (1-1)
└── domain02 (2)
Working on a subtree
A Node is itself the entry point to a subtree.
backend = mm.at("1")
backend.get_labels()
backend.get_markers()
This allows the same API to be used on the whole mind map or on a specific branch.
Labels
List every label present in the map.
labels = mm.get_labels()
Result:
{
"important": [
(1, 0),
(2, 1, 3),
]
}
The same operation is available from any node.
backend.get_labels()
Markers
List every marker used in the map.
markers = mm.get_markers()
or
backend.get_markers()
Breadcrumbs
Retrieve the titles leading to a node.
mm.breadcrumb("2-0-1")
returns
[
{"title": "domain02", "path": (2,)},
{"title": "themeOne", "path": (2, 0)},
{"title": "subject_b", "path": (2, 0, 1)},
]
Philosophy
mindmap-toolkit is designed around three principles.
- Simple – a small and easy-to-learn API.
- Lightweight – minimal dependencies.
- Extensible – every parser exposes the same tree API.
The parser should be transparent to the user.
mm = MindMap.load("roadmap.xmind")
Tomorrow, the same API should work with other mind map formats without changing user code.
Roadmap
Current version:
- ✅ XMind parser
- ✅ Tree navigation
- ✅ Labels
- ✅ Markers
- ✅ Notes
- ✅ Links
- ✅ Breadcrumbs
Future versions:
- Search nodes
- Compare mind maps
- Export
- FreeMind support
- OPML support
- Markdown outline support
Documentation
The complete documentation is available in the docs/ directory.
Examples are available in the examples/ directory.
Contributing
Contributions, bug reports and feature requests are welcome.
Please open an issue before proposing significant changes.
License
MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mindmap_toolkit-0.1.1.tar.gz.
File metadata
- Download URL: mindmap_toolkit-0.1.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c43b501995f74a56bc6b16950a324e7670d9b076faa8e9ce6ade2d474492150
|
|
| MD5 |
3c5d021fd0e28984a0841e010f090094
|
|
| BLAKE2b-256 |
1f832cdd9447c2b095214033f87c0617ad74a965963487feaecabc79ef5465e0
|
File details
Details for the file mindmap_toolkit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mindmap_toolkit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0635ef834d66d86f98006b8de76899bc1eff635b7a7733870585427a413119ef
|
|
| MD5 |
1b5f435479ccae0219bfdd4ab06e89bd
|
|
| BLAKE2b-256 |
246e11312f9090c0bbc6793e22f8c45aca25d66ce3d14b3b99dfc4d90da1e23f
|