freeplane-and-yaml 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {freeplane_and_yaml-0.1.1.dist-info → freeplane_and_yaml-0.1.3.dist-info}/METADATA +98 -28
- freeplane_and_yaml-0.1.3.dist-info/RECORD +9 -0
- freeplane_and_yaml-0.1.1.dist-info/RECORD +0 -9
- {freeplane_and_yaml-0.1.1.dist-info → freeplane_and_yaml-0.1.3.dist-info}/LICENSE +0 -0
- {freeplane_and_yaml-0.1.1.dist-info → freeplane_and_yaml-0.1.3.dist-info}/WHEEL +0 -0
- {freeplane_and_yaml-0.1.1.dist-info → freeplane_and_yaml-0.1.3.dist-info}/entry_points.txt +0 -0
- {freeplane_and_yaml-0.1.1.dist-info → freeplane_and_yaml-0.1.3.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: freeplane-and-yaml
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
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
|
@@ -26,28 +26,98 @@ That's a friend link so you can read it even if you're not a subscriber.
|
|
26
26
|
|
27
27
|
## Installation
|
28
28
|
|
29
|
-
First, clone this repository:
|
30
|
-
|
31
|
-
```bash
|
32
|
-
# clone the project from GitHub
|
33
|
-
git clone https://github.com/romilly/freeplane-and-yaml.git
|
34
|
-
cd freeplane-and-yaml
|
35
|
-
```
|
36
|
-
|
37
29
|
This project requires Python and should be run in a virtual environment:
|
38
30
|
|
39
31
|
```bash
|
40
|
-
# Create and activate virtual environment
|
32
|
+
# Create and activate virtual environment in the direcoty of your choice
|
41
33
|
python -m venv venv
|
42
34
|
source venv/bin/activate # On Windows use: venv\Scripts\activate
|
43
|
-
|
44
|
-
# Install required packages
|
45
|
-
pip install pyyaml
|
35
|
+
pip install freeplane-and-yaml
|
46
36
|
```
|
47
37
|
|
38
|
+
|
48
39
|
## Usage
|
49
40
|
|
50
|
-
|
41
|
+
Your YAML file should follow this schema:
|
42
|
+
|
43
|
+
```json
|
44
|
+
{
|
45
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
46
|
+
"title": "Mind Map Schema",
|
47
|
+
"description": "Schema for Freeplane-compatible mind map YAML format",
|
48
|
+
|
49
|
+
"definitions": {
|
50
|
+
"node": {
|
51
|
+
"type": "object",
|
52
|
+
"required": ["title"],
|
53
|
+
"properties": {
|
54
|
+
"title": {
|
55
|
+
"type": "string",
|
56
|
+
"description": "The display text for the node"
|
57
|
+
},
|
58
|
+
"note": {
|
59
|
+
"type": "string",
|
60
|
+
"description": "Rich text note attached to the node"
|
61
|
+
},
|
62
|
+
"children": {
|
63
|
+
"type": "object",
|
64
|
+
"description": "Child nodes of this node",
|
65
|
+
"patternProperties": {
|
66
|
+
"^[a-zA-Z0-9_]+$": {
|
67
|
+
"$ref": "#/definitions/node"
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"additionalProperties": false
|
71
|
+
}
|
72
|
+
},
|
73
|
+
"additionalProperties": false
|
74
|
+
}
|
75
|
+
},
|
76
|
+
|
77
|
+
"type": "object",
|
78
|
+
"required": ["root"],
|
79
|
+
"properties": {
|
80
|
+
"root": {
|
81
|
+
"allOf": [
|
82
|
+
{ "$ref": "#/definitions/node" },
|
83
|
+
{
|
84
|
+
"required": ["children"],
|
85
|
+
"description": "The root node must have at least one child"
|
86
|
+
}
|
87
|
+
]
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"additionalProperties": false,
|
91
|
+
|
92
|
+
"examples": [
|
93
|
+
{
|
94
|
+
"root": {
|
95
|
+
"title": "Example Mind Map",
|
96
|
+
"note": "This is the root node",
|
97
|
+
"children": {
|
98
|
+
"topic1": {
|
99
|
+
"title": "First Topic",
|
100
|
+
"note": "Note for first topic",
|
101
|
+
"children": {
|
102
|
+
"subtopic1": {
|
103
|
+
"title": "Subtopic 1",
|
104
|
+
"note": "Note for subtopic"
|
105
|
+
}
|
106
|
+
}
|
107
|
+
},
|
108
|
+
"topic2": {
|
109
|
+
"title": "Second Topic",
|
110
|
+
"note": "Note for second topic"
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
]
|
116
|
+
}
|
117
|
+
|
118
|
+
```
|
119
|
+
|
120
|
+
Here's an example structure:
|
51
121
|
|
52
122
|
```yaml
|
53
123
|
root:
|
@@ -64,6 +134,16 @@ root:
|
|
64
134
|
# ... and so on
|
65
135
|
```
|
66
136
|
|
137
|
+
### Converting YAML to Mind Map
|
138
|
+
|
139
|
+
To convert a YAML file to a Freeplane mind map:
|
140
|
+
|
141
|
+
```bash
|
142
|
+
|
143
|
+
# Convert YAML and store mind map in temp
|
144
|
+
convert data/marr.yaml temp
|
145
|
+
```
|
146
|
+
|
67
147
|
### YAML Schema Requirements
|
68
148
|
|
69
149
|
The YAML must conform to these rules:
|
@@ -73,13 +153,13 @@ The YAML must conform to these rules:
|
|
73
153
|
- Child node keys must be alphanumeric (including underscores)
|
74
154
|
- No additional properties are allowed beyond title, note, and children
|
75
155
|
|
76
|
-
For full schema details, see
|
156
|
+
For full schema details, see above.
|
77
157
|
|
78
|
-
### Converting Documents to
|
158
|
+
### Converting Documents to YAML using Claude AI
|
79
159
|
|
80
160
|
You can use Claude Sonnet to automatically convert documents (PDFs, articles, specifications, etc.) into the required YAML format. Here's the workflow:
|
81
161
|
|
82
|
-
1. Share your document and the schema (
|
162
|
+
1. Share your document and the schema (above) with Claude Sonnet.
|
83
163
|
2. Use this prompt:
|
84
164
|
```
|
85
165
|
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.
|
@@ -94,16 +174,6 @@ This workflow is useful for:
|
|
94
174
|
- Creating structured summaries of technical documentation
|
95
175
|
- Organizing research notes
|
96
176
|
|
97
|
-
### Converting YAML to Mind Map
|
98
|
-
|
99
|
-
To convert a YAML file to a Freeplane mind map:
|
100
|
-
|
101
|
-
```python
|
102
|
-
from freeplane_and_yaml.convert_yaml_to_freeplane import convert_yaml_file
|
103
|
-
|
104
|
-
# Convert YAML to mind map
|
105
|
-
convert_yaml_file('path/to/your/input.yaml', 'output.mm')
|
106
|
-
```
|
107
177
|
|
108
178
|
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:
|
109
179
|
|
@@ -126,7 +196,7 @@ Here's an example of how the output looks:
|
|
126
196
|
|
127
197
|
## License
|
128
198
|
|
129
|
-
|
199
|
+
_Apologies to readers from the USA. This README uses UK spelling._
|
130
200
|
|
131
201
|
This project is licensed under the MIT Licence — see the [LICENCE](LICENSE) file for details.
|
132
202
|
|
@@ -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.3.dist-info/LICENSE,sha256=gCmvBRHqGZibjt4wyMG81SeYWMKuhoGFVQh_Kn1wZ98,1072
|
5
|
+
freeplane_and_yaml-0.1.3.dist-info/METADATA,sha256=MCf8NWb6YiHUf6K22xJy_sGOOoSI9TNiyXdw5Mb_rEc,5751
|
6
|
+
freeplane_and_yaml-0.1.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
7
|
+
freeplane_and_yaml-0.1.3.dist-info/entry_points.txt,sha256=kWuCk_RZlzcO9h7yk7uJ4dtJiccQxBocEuQPVt6qzxo,57
|
8
|
+
freeplane_and_yaml-0.1.3.dist-info/top_level.txt,sha256=UY6T4vy985r4DAfWpM1D_n6t0cEis5SxtfkPPd-xDhQ,19
|
9
|
+
freeplane_and_yaml-0.1.3.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.1.dist-info/LICENSE,sha256=gCmvBRHqGZibjt4wyMG81SeYWMKuhoGFVQh_Kn1wZ98,1072
|
5
|
-
freeplane_and_yaml-0.1.1.dist-info/METADATA,sha256=rK9H4NH6Z7rx89SzQs8c-ZtccsPrztOl6ukMyJ0CO78,4420
|
6
|
-
freeplane_and_yaml-0.1.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
7
|
-
freeplane_and_yaml-0.1.1.dist-info/entry_points.txt,sha256=kWuCk_RZlzcO9h7yk7uJ4dtJiccQxBocEuQPVt6qzxo,57
|
8
|
-
freeplane_and_yaml-0.1.1.dist-info/top_level.txt,sha256=UY6T4vy985r4DAfWpM1D_n6t0cEis5SxtfkPPd-xDhQ,19
|
9
|
-
freeplane_and_yaml-0.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|