freeplane-and-yaml 0.1.1__tar.gz → 0.1.3__tar.gz

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