freeplane-and-yaml 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: freeplane-and-yaml
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: A tool to convert YAML files to Freeplane MM format
5
5
  Home-page: https://github.com/romilly/freeplane-and-yaml
6
6
  Author: Romilly Cocking
@@ -19,10 +19,11 @@ Requires-Dist: PyYAML
19
19
 
20
20
  A Python tool that converts YAML files into Freeplane mind maps. This allows you to generate mind maps programmatically from structured YAML data.
21
21
 
22
- The YAML file can be created using [Claude AI](https://claude.ai/chat/). A suitable prompt is given [below](#converting-documents-to-mind-maps-using-claude-ai).
22
+ The YAML file can be created using [Claude AI](https://claude.ai/chat/).
23
+ A suitable prompt is given [below](https://github.com/romilly/freeplane-and-yaml?tab=readme-ov-file#converting-documents-to-yaml-using-claude-ai).
23
24
 
24
25
  You can read about how it got written using AI on [medium](https://medium.com/@romillyc/build-your-own-mind-map-tools-with-ai-b193564f2464?sk=b353aa7d16d6412e4aae8f3eab0ec554).
25
- That's a friend link so you can read it even if you're not a subscriber.
26
+ That's a _friend link_ so you can read it even if you're not a subscriber.
26
27
 
27
28
  ## Installation
28
29
 
@@ -38,21 +39,83 @@ pip install freeplane-and-yaml
38
39
 
39
40
  ## Usage
40
41
 
41
- Your YAML file should follow [this schema](src/schema/mindmap-schema.json). Here's an example structure:
42
-
43
- ```yaml
44
- root:
45
- title: "Your Main Topic"
46
- note: "Optional note for the main topic"
47
- children:
48
- subtopic1:
49
- title: "Subtopic 1"
50
- note: "Optional note for subtopic 1"
51
- children:
52
- # ... more nested topics
53
- subtopic2:
54
- title: "Subtopic 2"
55
- # ... and so on
42
+ Your YAML file should follow this [schema](https://raw.githubusercontent.com/romilly/freeplane-and-yaml/refs/heads/main/src/schema/mindmap-schema.json). It includes an example.
43
+
44
+ ```json
45
+ {
46
+ "$schema": "http://json-schema.org/draft-07/schema#",
47
+ "title": "Mind Map Schema",
48
+ "description": "Schema for Freeplane-compatible mind map YAML format",
49
+
50
+ "definitions": {
51
+ "node": {
52
+ "type": "object",
53
+ "required": ["title"],
54
+ "properties": {
55
+ "title": {
56
+ "type": "string",
57
+ "description": "The display text for the node"
58
+ },
59
+ "note": {
60
+ "type": "string",
61
+ "description": "Rich text note attached to the node"
62
+ },
63
+ "children": {
64
+ "type": "object",
65
+ "description": "Child nodes of this node",
66
+ "patternProperties": {
67
+ "^[a-zA-Z0-9_]+$": {
68
+ "$ref": "#/definitions/node"
69
+ }
70
+ },
71
+ "additionalProperties": false
72
+ }
73
+ },
74
+ "additionalProperties": false
75
+ }
76
+ },
77
+
78
+ "type": "object",
79
+ "required": ["root"],
80
+ "properties": {
81
+ "root": {
82
+ "allOf": [
83
+ { "$ref": "#/definitions/node" },
84
+ {
85
+ "required": ["children"],
86
+ "description": "The root node must have at least one child"
87
+ }
88
+ ]
89
+ }
90
+ },
91
+ "additionalProperties": false,
92
+
93
+ "examples": [
94
+ {
95
+ "root": {
96
+ "title": "Example Mind Map",
97
+ "note": "This is the root node",
98
+ "children": {
99
+ "topic1": {
100
+ "title": "First Topic",
101
+ "note": "Note for first topic",
102
+ "children": {
103
+ "subtopic1": {
104
+ "title": "Subtopic 1",
105
+ "note": "Note for subtopic"
106
+ }
107
+ }
108
+ },
109
+ "topic2": {
110
+ "title": "Second Topic",
111
+ "note": "Note for second topic"
112
+ }
113
+ }
114
+ }
115
+ }
116
+ ]
117
+ }
118
+
56
119
  ```
57
120
 
58
121
  ### Converting YAML to Mind Map
@@ -65,22 +128,22 @@ To convert a YAML file to a Freeplane mind map:
65
128
  convert data/marr.yaml temp
66
129
  ```
67
130
 
68
- ### YAML Schema Requirements
131
+ ### YAML Schema requirements explained
69
132
 
70
- The YAML must conform to these rules:
133
+ As the schema specifies, The YAML must conform to these rules:
71
134
  - Must have a root node with a title and at least one child
72
135
  - Each node requires a title
73
136
  - Notes are optional
74
137
  - Child node keys must be alphanumeric (including underscores)
75
138
  - No additional properties are allowed beyond title, note, and children
76
139
 
77
- For full schema details, see [schema](src/schema/mindmap-schema.json).
140
+ For full schema details, see above.
78
141
 
79
142
  ### Converting Documents to YAML using Claude AI
80
143
 
81
144
  You can use Claude Sonnet to automatically convert documents (PDFs, articles, specifications, etc.) into the required YAML format. Here's the workflow:
82
145
 
83
- 1. Share your document and the [schema](src/schema/mindmap-schema.json) with Claude Sonnet.
146
+ 1. Share your document and the schema (above) with Claude Sonnet.
84
147
  2. Use this prompt:
85
148
  ```
86
149
  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.
@@ -0,0 +1,9 @@
1
+ freeplane_and_yaml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ freeplane_and_yaml/cli.py,sha256=qeUJXw2MqCf6Kv7c-K63-srGj339beL4JTrAXi5_-3c,1213
3
+ freeplane_and_yaml/convert.py,sha256=dyQLt2FlmCgsQOnutnp1DyLXzqk-guazL8TZwTH0vHI,3440
4
+ freeplane_and_yaml-0.1.4.dist-info/LICENSE,sha256=gCmvBRHqGZibjt4wyMG81SeYWMKuhoGFVQh_Kn1wZ98,1072
5
+ freeplane_and_yaml-0.1.4.dist-info/METADATA,sha256=BVBe-V68MU9x5nvP1OZQD5cZHcjZqXgOtpZrOG7_7l4,5656
6
+ freeplane_and_yaml-0.1.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
7
+ freeplane_and_yaml-0.1.4.dist-info/entry_points.txt,sha256=kWuCk_RZlzcO9h7yk7uJ4dtJiccQxBocEuQPVt6qzxo,57
8
+ freeplane_and_yaml-0.1.4.dist-info/top_level.txt,sha256=UY6T4vy985r4DAfWpM1D_n6t0cEis5SxtfkPPd-xDhQ,19
9
+ freeplane_and_yaml-0.1.4.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- freeplane_and_yaml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- freeplane_and_yaml/cli.py,sha256=qeUJXw2MqCf6Kv7c-K63-srGj339beL4JTrAXi5_-3c,1213
3
- freeplane_and_yaml/convert.py,sha256=dyQLt2FlmCgsQOnutnp1DyLXzqk-guazL8TZwTH0vHI,3440
4
- freeplane_and_yaml-0.1.2.dist-info/LICENSE,sha256=gCmvBRHqGZibjt4wyMG81SeYWMKuhoGFVQh_Kn1wZ98,1072
5
- freeplane_and_yaml-0.1.2.dist-info/METADATA,sha256=kTtNNw4SJFhFIfUbpOrMunKQnElit7T7zq08zrzuUzI,4097
6
- freeplane_and_yaml-0.1.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
7
- freeplane_and_yaml-0.1.2.dist-info/entry_points.txt,sha256=kWuCk_RZlzcO9h7yk7uJ4dtJiccQxBocEuQPVt6qzxo,57
8
- freeplane_and_yaml-0.1.2.dist-info/top_level.txt,sha256=UY6T4vy985r4DAfWpM1D_n6t0cEis5SxtfkPPd-xDhQ,19
9
- freeplane_and_yaml-0.1.2.dist-info/RECORD,,