A tool to convert YAML files to Freeplane MM format
Project description
YAML to Freeplane Converter
A Python tool that converts YAML files into Freeplane mind maps. This allows you to generate mind maps programmatically from structured YAML data.
The YAML file can be created using Claude AI. A suitable prompt is given below.
You can read about how it got written using AI on medium. That's a friend link so you can read it even if you're not a subscriber.
Installation
First, clone this repository:
# clone the project from GitHub
git clone https://github.com/romilly/freeplane-and-yaml.git
cd freeplane-and-yaml
This project requires Python and should be run in a virtual environment:
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
# Install required packages
pip install pyyaml
Usage
The code should be run from the src directory after activating the virtual environment. Your YAML file should follow the schema defined in schema/mindmap-schema.json. Here's an example structure:
root:
title: "Your Main Topic"
note: "Optional note for the main topic"
children:
subtopic1:
title: "Subtopic 1"
note: "Optional note for subtopic 1"
children:
# ... more nested topics
subtopic2:
title: "Subtopic 2"
# ... and so on
YAML Schema Requirements
The YAML must conform to these rules:
- Must have a root node with a title and at least one child
- Each node requires a title
- Notes are optional
- Child node keys must be alphanumeric (including underscores)
- No additional properties are allowed beyond title, note, and children
For full schema details, see schema/mindmap-schema.json.
Converting Documents to Mind Maps using Claude AI
You can use Claude Sonnet to automatically convert documents (PDFs, articles, specifications, etc.) into the required YAML format. Here's the workflow:
- Share your document and the schema (from
schema/mindmap-schema.json)with Claude Sonnet. - Use this prompt:
I've uploaded a document and a schema file. I'd like you to summarise the document as a yaml file following the schema that I uploaded. - Claude will generate a YAML file that follows the schema
- Save Claude's output as a .yaml file
- Convert it to a mind map using this tool
This workflow is useful for:
- Summarizing academic papers
- Converting product requirements documents (PRDs)
- Creating structured summaries of technical documentation
- Organizing research notes
Converting YAML to Mind Map
To convert a YAML file to a Freeplane mind map:
from freeplane_and_yaml.convert_yaml_to_freeplane import convert_yaml_file
# Convert YAML to mind map
convert_yaml_file('path/to/your/input.yaml', 'output.mm')
The generated .mm file can be opened in Freeplane. When you first open the file, Freeplane will show this warning dialog because the file wasn't created by Freeplane itself:
This is normal and expected — click OK to load the mind map.
Here's an example of how the output looks:
Features
- Converts YAML structured data to Freeplane mind map format
- Supports hierarchical node structure
- Includes node titles and optional notes
- Automatically alternates between right and left positions for top-level nodes
- Generates unique IDs for each node
- Validates input against JSON schema
License
Apologiresd to readers from the USA. This README uses UK spelling.
This project is licensed under the MIT Licence — see the LICENCE file for details.
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
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 freeplane-and-yaml-0.1.1.tar.gz.
File metadata
- Download URL: freeplane-and-yaml-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.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f435671a1de5bbb23bc5536d9c106c23bae75b3df36b04e27ebc01df294decf
|
|
| MD5 |
2d5880bc4c9e8ef1d158b1225c2ebc9e
|
|
| BLAKE2b-256 |
998c1876f92b4d9c0618fc395ac378d302d8f1a0e432dfa6b62723bbe2fdda43
|
File details
Details for the file freeplane_and_yaml-0.1.1-py3-none-any.whl.
File metadata
- Download URL: freeplane_and_yaml-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfa9c2acc0010eee1fceb7955dd9029b7e4a4187a197d1e9bd500169552401c9
|
|
| MD5 |
345d1e245df9413d34f63d83eac9e2b1
|
|
| BLAKE2b-256 |
eae774d9191dc0c242078feb2040e5e8045a6f7f2457541d09123eac61717d20
|