Skip to main content

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

This project requires Python and should be run in a virtual environment:

# Create and activate virtual environment in the direcoty of your choice
python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate
pip install freeplane-and-yaml

Usage

Your YAML file should follow this schema. 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

Converting YAML to Mind Map

To convert a YAML file to a Freeplane mind map:

# Convert YAML and store mind map in temp
convert data/marr.yaml temp

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.

Converting Documents to YAML 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:

  1. Share your document and the schema with Claude Sonnet.
  2. 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.
    
  3. Claude will generate a YAML file that follows the schema
  4. Save Claude's output as a .yaml file
  5. 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

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:

Freeplane Warning Dialog

This is normal and expected — click OK to load the mind map.

Here's an example of how the output looks:

Example Mind Map

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

Apologies 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

freeplane-and-yaml-0.1.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

freeplane_and_yaml-0.1.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file freeplane-and-yaml-0.1.2.tar.gz.

File metadata

  • Download URL: freeplane-and-yaml-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for freeplane-and-yaml-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c8b8833e52d9154a53cbd07c1e12b752e479772ee6241e98f58dec8f861df487
MD5 cf48c5393ea539884d8d726002a3bb5f
BLAKE2b-256 d4bc2f3c868e4e364833ae7c221900a0482db8a5220db6f70af4b44c3e47dd8e

See more details on using hashes here.

File details

Details for the file freeplane_and_yaml-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for freeplane_and_yaml-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 585b06dd52e50a929f5c8f35d9bf6fc261ef8075652ec7c33b26c341a20b9f36
MD5 bf50b15877daf12a4a894b8e8e1b3ddd
BLAKE2b-256 1efa820cdda66186ff34740e1685bae21152a881da754754fc2fc4f11d5894e8

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