pyegeria 5.3.6.2.5__py3-none-any.whl → 5.3.6.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyegeria/__init__.py +3 -0
- pyegeria/_client.py +10 -0
- pyegeria/commands/cat/{freddie_jupyter.py → dr_egeria_jupyter.py} +8 -16
- pyegeria/commands/cat/{freddie_md.py → dr_egeria_md.py} +39 -33
- pyegeria/commands/cat/glossary_actions.py +59 -1
- pyegeria/commands/cat/list_categories.py +185 -0
- pyegeria/commands/cat/list_glossaries.py +26 -33
- pyegeria/commands/cat/list_terms.py +47 -47
- pyegeria/commands/cli/egeria.py +51 -29
- pyegeria/commands/cli/egeria_cat.py +53 -31
- pyegeria/create_tech_guid_lists.py +2 -5
- pyegeria/glossary_browser_omvs.py +283 -113
- pyegeria/glossary_manager_omvs.py +150 -1594
- pyegeria/md_processing_utils.py +853 -0
- {pyegeria-5.3.6.2.5.dist-info → pyegeria-5.3.6.4.dist-info}/METADATA +1 -1
- {pyegeria-5.3.6.2.5.dist-info → pyegeria-5.3.6.4.dist-info}/RECORD +21 -31
- {pyegeria-5.3.6.2.5.dist-info → pyegeria-5.3.6.4.dist-info}/entry_points.txt +5 -0
- pyegeria/commands/cat/freddie_jup.py +0 -124
- pyegeria/commands/cat/freddie_utils.py +0 -590
- pyegeria/commands/cat/freddies-inbox/freddie_intro.md +0 -221
- pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-13-19-29-Report.md +0 -69
- pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-13-20-30-Update-Form.md +0 -78
- pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-19-39-25-Update-Form.md +0 -78
- pyegeria/commands/cat/glossary_creation_experiment.ipynb +0 -235
- pyegeria/test_j.html +0 -0
- pyegeria/test_m.html +0 -213
- pyegeria/test_m1.html +0 -273
- pyegeria/test_mer.ipynb +0 -596
- pyegeria/test_w.html +0 -213
- /pyegeria/commands/cat/{freddies-inbox → dr_egeria_inbox}/glossary_creation_experiment.ipynb +0 -0
- /pyegeria/commands/cat/{freddies-inbox → dr_egeria_inbox}/glossary_exp.md +0 -0
- {pyegeria-5.3.6.2.5.dist-info → pyegeria-5.3.6.4.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.6.2.5.dist-info → pyegeria-5.3.6.4.dist-info}/WHEEL +0 -0
@@ -1,221 +0,0 @@
|
|
1
|
-
# Introduction to Freddie - an Egeria Markdown Processor
|
2
|
-
|
3
|
-
A constant challenge in managing information is gathering enough metadata about the information to
|
4
|
-
allow us to manage it. A common approach is to build fancy graphical user interfaces hoping that they
|
5
|
-
will be attractive enough and easy enough to use that people will do so.
|
6
|
-
|
7
|
-
Unfortunately, however, this ignores the fundamental fact that to use one of these nice GUI
|
8
|
-
applications, you have to step away from the tools and processes that you were in the midst of performing.
|
9
|
-
You have to leave your world and join someone elses.
|
10
|
-
|
11
|
-
Freddie, is an experiment in turning this around. Its not that fancy graphical user
|
12
|
-
interfaces don't have a role - but rather, to look at what we can do to support the
|
13
|
-
tools and approaches people already use. And maybe even make their day job a little
|
14
|
-
easier.
|
15
|
-
|
16
|
-
So this is what we are exploring with Freddie. An Egeria Markdown language that allows
|
17
|
-
users to intermix requests to Egeria with other text through the use of standard Markdown.
|
18
|
-
|
19
|
-
This file is an example. You will see that we intersperse normal narrative text (such as this)
|
20
|
-
with Commands to Egeria. We introduce a specific vocabulary to make Egeria requests.
|
21
|
-
|
22
|
-
In the example below we will create a new Egeria glossary to hold definitions related to Freddie:
|
23
|
-
---
|
24
|
-
|
25
|
-
# Create Glossary
|
26
|
-
|
27
|
-
## Glossary Name
|
28
|
-
|
29
|
-
Egeria-Markdown
|
30
|
-
|
31
|
-
## Language
|
32
|
-
|
33
|
-
English
|
34
|
-
|
35
|
-
## Description
|
36
|
-
|
37
|
-
Glossary to describe the vocabulary of Freddie - an Egeria Markdown language to support the exchange of metadata in a
|
38
|
-
Markdown form.
|
39
|
-
Freddie allows users to input metadata using any text entry system that supports the entry of standard Markdown
|
40
|
-
characters and through post-processing
|
41
|
-
commands, validates the Egeria content and allows the requests to be sent to Egeria. This is an update
|
42
|
-
|
43
|
-
## Usage
|
44
|
-
|
45
|
-
1. (optional) load an example or template for the type of object from Egeria.
|
46
|
-
2. Create a new document (perhaps from the template) and edit it, adding in the content with the Freddie controlled
|
47
|
-
Markdown language.
|
48
|
-
3. Process the document to validate and display it before you submit it, Validation may annotate your document with
|
49
|
-
recommendations and potential issues.
|
50
|
-
4. Submit the document to Egeria using the Freddie_sings command.
|
51
|
-
|
52
|
-
## <Qualified Name>
|
53
|
-
|
54
|
-
## <GUID>
|
55
|
-
|
56
|
-
---
|
57
|
-
|
58
|
-
# First Walk-Through
|
59
|
-
The block of markdown above is a request to create a new Egeria Glossary called `Egeria-Markdown`. Let's briefly walk
|
60
|
-
through. The command starts when we see `# Create Glossary`. This is a known phrase in Freddie. When we see this
|
61
|
-
phrase we recognize that this is an egeria markdown request block. The request block ends if we encounter another `#` or
|
62
|
-
`---`, or run out of text. Within this request block we note some **attributes** that begin with a `## `. The first that
|
63
|
-
we encounter is `## Glossary Name`. Not all attributes need to be filled in. Later, we'll process this file and demonstrate
|
64
|
-
how to tell - but first, lets look at the attributes shown:
|
65
|
-
|
66
|
-
* `## Glossary Name` - this is the display name of the glossary. In this case the name is `Egeria-Markdown` As you can
|
67
|
-
see, the value of the attribute is the plain text that follows it.
|
68
|
-
* `## Language` - what language will the terms of the glossary be in (yes there are ways to have mixed language but
|
69
|
-
Freddie strives to be as simple as possible).
|
70
|
-
* `## Description` - a description of the glossary and its purpose.
|
71
|
-
* `## Usage` - how the glossary is meant to be used and by whom.
|
72
|
-
* `## <Qualified Name>` - every element in Egeria must have a unique qualified name that we use to distinguish
|
73
|
-
it from all other elements. The qualified name is meant to be understandable by humans, although it may follow
|
74
|
-
formatting conventions. This attributes is in angle brackets because at this point we can't fill it in - we are just
|
75
|
-
in the midst of creating the glossary. A qualified name will be created for us as part of the glossary creation. We'll
|
76
|
-
see a little later how we get that.
|
77
|
-
* `## <GUID>` - same story as qualified name except that this is meant for automation and not people.
|
78
|
-
|
79
|
-
And that's it. That's all we need to do to specify the creation of a new glossary (well - mostly - we'll reveal a few
|
80
|
-
more details a bit later).
|
81
|
-
|
82
|
-
## Great! That was easy!
|
83
|
-
|
84
|
-
We now have a nice, clean, new...and empty...glossary - guess we better start filling it. Lets create a couple of terms.
|
85
|
-
|
86
|
-
---
|
87
|
-
|
88
|
-
# Create Term
|
89
|
-
|
90
|
-
## Glossary Name
|
91
|
-
|
92
|
-
Egeria-Markdown
|
93
|
-
|
94
|
-
## Term Name
|
95
|
-
|
96
|
-
Command
|
97
|
-
|
98
|
-
## Summary
|
99
|
-
|
100
|
-
Commands are how a user of the Freddie markdown language requests an action.
|
101
|
-
|
102
|
-
## Description
|
103
|
-
|
104
|
-
Commands are how a user can request Egeria to take an action such as Create or Update an Egeria element. Freddie
|
105
|
-
provides
|
106
|
-
a limited (but growing) set of commands. Freddie commands align with the pyegeria 'hey-egeria' command line interface.
|
107
|
-
|
108
|
-
## Abbreviation
|
109
|
-
|
110
|
-
## Examples
|
111
|
-
|
112
|
-
Create Glossary or
|
113
|
-
Update Glossary or
|
114
|
-
Create Term or
|
115
|
-
Update Term
|
116
|
-
|
117
|
-
## Usage
|
118
|
-
|
119
|
-
Commands are used in the Freddie Egeria markdown language.
|
120
|
-
|
121
|
-
## Version
|
122
|
-
|
123
|
-
0.2
|
124
|
-
|
125
|
-
## Status
|
126
|
-
|
127
|
-
DRAFT
|
128
|
-
|
129
|
-
## Qualified Name
|
130
|
-
|
131
|
-
---
|
132
|
-
|
133
|
-
# Create Term
|
134
|
-
|
135
|
-
## Glossary Name
|
136
|
-
|
137
|
-
Egeria-Markdown
|
138
|
-
|
139
|
-
## Term Name
|
140
|
-
|
141
|
-
Source
|
142
|
-
|
143
|
-
## Summary
|
144
|
-
|
145
|
-
Source of the markdown content.
|
146
|
-
|
147
|
-
## Description
|
148
|
-
|
149
|
-
Source of the markdown content - could be jupter or plain markdown file.
|
150
|
-
|
151
|
-
## Abbreviation
|
152
|
-
|
153
|
-
## Examples
|
154
|
-
|
155
|
-
## Usage
|
156
|
-
|
157
|
-
## Version
|
158
|
-
|
159
|
-
0.1
|
160
|
-
|
161
|
-
## Status
|
162
|
-
|
163
|
-
DRAFT
|
164
|
-
|
165
|
-
## Update Description
|
166
|
-
|
167
|
-
---
|
168
|
-
|
169
|
-
# Create Term
|
170
|
-
|
171
|
-
## Glossary Name
|
172
|
-
|
173
|
-
Egeria-Markdown
|
174
|
-
|
175
|
-
## Term Name
|
176
|
-
|
177
|
-
Directive
|
178
|
-
|
179
|
-
## Summary
|
180
|
-
|
181
|
-
A directive defines how the command is to be processed.
|
182
|
-
|
183
|
-
## Description
|
184
|
-
|
185
|
-
Directives are one of:
|
186
|
-
|
187
|
-
* display - just display what we've found
|
188
|
-
* validate - check the validity of the requested action
|
189
|
-
* process - process the requested action
|
190
|
-
|
191
|
-
## Abbreviation
|
192
|
-
|
193
|
-
## Examples
|
194
|
-
|
195
|
-
## Usage
|
196
|
-
|
197
|
-
## Version
|
198
|
-
|
199
|
-
0.1
|
200
|
-
|
201
|
-
## Status
|
202
|
-
|
203
|
-
DRAFT
|
204
|
-
|
205
|
-
---
|
206
|
-
|
207
|
-
# Some terms specified - Now what?
|
208
|
-
|
209
|
-
Ok - we've now created a glossary and three terms to go into the glossary. Here is what we'll do next.
|
210
|
-
|
211
|
-
>Note: This is changing - so will be somewhat abstrct
|
212
|
-
|
213
|
-
We will run a small program called freddie_md.py to operate on this markdown file. When we run this program we
|
214
|
-
tell it not just the name of the file to process but also provide a directive on what to do. Currently we have the
|
215
|
-
choice of:
|
216
|
-
|
217
|
-
1. Display - just parse the file, breaking it down into request blocks, and display what we find
|
218
|
-
2. Validate - parse the file and validate if the commands can be processed - showing information about what we observe.
|
219
|
-
3. Process - parse the request blocks and execute the commands - and produce a new output file to simplify further processing.
|
220
|
-
|
221
|
-
# Great --> let's give it a try!
|
@@ -1,69 +0,0 @@
|
|
1
|
-
# Glossaries Report - created at 2025-03-06 13:19
|
2
|
-
Glossaries found from the search string: `All Glossaries`
|
3
|
-
|
4
|
-
# Glossary Name: Egeria-Markdown
|
5
|
-
|
6
|
-
## Description
|
7
|
-
Glossary to describe the vocabulary of Freddie - an Egeria Markdown language to support the exchange of metadata in a Markdown form.
|
8
|
-
Freddie allows users to input metadata using any text entry system that supports the entry of standard Markdown characters and through post-processing
|
9
|
-
commands, validates the Egeria content and allows the requests to be sent to Egeria. This is an update
|
10
|
-
|
11
|
-
## Language
|
12
|
-
English
|
13
|
-
|
14
|
-
## Usage
|
15
|
-
1) (optional) load an example or template for the type of object from Egeria.
|
16
|
-
2) Create a new document (perhaps from the template) and edit it, adding in the content with the Freddie controlled Markdown language.
|
17
|
-
3) Process the document to validate and display it before you submit it, Validation may annotate your document with recommendations and potential issues.
|
18
|
-
4) Submit the document to Egeria using the Freddie_sings command.
|
19
|
-
5) anything?
|
20
|
-
|
21
|
-
## Qualified Name
|
22
|
-
Glossary:Egeria-Markdown
|
23
|
-
|
24
|
-
## GUID
|
25
|
-
5d45b499-d0d5-4fad-bc23-763bc4073296
|
26
|
-
|
27
|
-
|
28
|
-
---
|
29
|
-
|
30
|
-
# Glossary Name: Teddy Bear Drop Foot Terminology
|
31
|
-
|
32
|
-
## Description
|
33
|
-
This glossary describes terminology invented for the fictitious study into Teddy Bear Drop Foot that is being used to demonstrate aspects of open governance without risk to real patient data.
|
34
|
-
|
35
|
-
## Language
|
36
|
-
English
|
37
|
-
|
38
|
-
## Usage
|
39
|
-
Used with the Teddy Bear Drop Foot Demonstration Study.
|
40
|
-
|
41
|
-
## Qualified Name
|
42
|
-
Glossary:TeddyBearDropFootTerminology
|
43
|
-
|
44
|
-
## GUID
|
45
|
-
c103d0c9-7581-47e1-a684-6bbe0ecd596f
|
46
|
-
|
47
|
-
|
48
|
-
---
|
49
|
-
|
50
|
-
# Glossary Name: Sustainability Glossary
|
51
|
-
|
52
|
-
## Description
|
53
|
-
Terminology associated with Coco Pharmaceutical's sustainability initiative.
|
54
|
-
|
55
|
-
## Language
|
56
|
-
English
|
57
|
-
|
58
|
-
## Usage
|
59
|
-
For all Coco Pharmaceutical employees wishing to understand more about sustainability and the organization's efforts to improve its operations.
|
60
|
-
|
61
|
-
## Qualified Name
|
62
|
-
Glossary:Sustainability
|
63
|
-
|
64
|
-
## GUID
|
65
|
-
30bfe79e-adf2-4fda-b9c5-9c86ad6b0d6c
|
66
|
-
|
67
|
-
|
68
|
-
---
|
69
|
-
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# Update Glossaries Form - created at 2025-03-06 13:20
|
2
|
-
Glossaries found from the search string: `All Glossaries`
|
3
|
-
|
4
|
-
# Update Glossary
|
5
|
-
|
6
|
-
## Glossary Name
|
7
|
-
Egeria-Markdown
|
8
|
-
|
9
|
-
## Description
|
10
|
-
Glossary to describe the vocabulary of Freddie - an Egeria Markdown language to support the exchange of metadata in a Markdown form.
|
11
|
-
Freddie allows users to input metadata using any text entry system that supports the entry of standard Markdown characters and through post-processing
|
12
|
-
commands, validates the Egeria content and allows the requests to be sent to Egeria. This is an update
|
13
|
-
|
14
|
-
## Language
|
15
|
-
English
|
16
|
-
|
17
|
-
## Usage
|
18
|
-
1) (optional) load an example or template for the type of object from Egeria.
|
19
|
-
2) Create a new document (perhaps from the template) and edit it, adding in the content with the Freddie controlled Markdown language.
|
20
|
-
3) Process the document to validate and display it before you submit it, Validation may annotate your document with recommendations and potential issues.
|
21
|
-
4) Submit the document to Egeria using the Freddie_sings command.
|
22
|
-
5) anything?
|
23
|
-
|
24
|
-
## Qualified Name
|
25
|
-
Glossary:Egeria-Markdown
|
26
|
-
|
27
|
-
## GUID
|
28
|
-
5d45b499-d0d5-4fad-bc23-763bc4073296
|
29
|
-
|
30
|
-
|
31
|
-
---
|
32
|
-
|
33
|
-
# Update Glossary
|
34
|
-
|
35
|
-
## Glossary Name
|
36
|
-
Teddy Bear Drop Foot Terminology
|
37
|
-
|
38
|
-
## Description
|
39
|
-
This glossary describes terminology invented for the fictitious study into Teddy Bear Drop Foot that is being used to demonstrate aspects of open governance without risk to real patient data.
|
40
|
-
|
41
|
-
## Language
|
42
|
-
English
|
43
|
-
|
44
|
-
## Usage
|
45
|
-
Used with the Teddy Bear Drop Foot Demonstration Study.
|
46
|
-
|
47
|
-
## Qualified Name
|
48
|
-
Glossary:TeddyBearDropFootTerminology
|
49
|
-
|
50
|
-
## GUID
|
51
|
-
c103d0c9-7581-47e1-a684-6bbe0ecd596f
|
52
|
-
|
53
|
-
|
54
|
-
---
|
55
|
-
|
56
|
-
# Update Glossary
|
57
|
-
|
58
|
-
## Glossary Name
|
59
|
-
Sustainability Glossary
|
60
|
-
|
61
|
-
## Description
|
62
|
-
Terminology associated with Coco Pharmaceutical's sustainability initiative.
|
63
|
-
|
64
|
-
## Language
|
65
|
-
English
|
66
|
-
|
67
|
-
## Usage
|
68
|
-
For all Coco Pharmaceutical employees wishing to understand more about sustainability and the organization's efforts to improve its operations.
|
69
|
-
|
70
|
-
## Qualified Name
|
71
|
-
Glossary:Sustainability
|
72
|
-
|
73
|
-
## GUID
|
74
|
-
30bfe79e-adf2-4fda-b9c5-9c86ad6b0d6c
|
75
|
-
|
76
|
-
|
77
|
-
---
|
78
|
-
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# Update Glossaries Form - created at 2025-03-06 19:39
|
2
|
-
Glossaries found from the search string: `All Glossaries`
|
3
|
-
|
4
|
-
# Update Glossary
|
5
|
-
|
6
|
-
## Glossary Name
|
7
|
-
Egeria-Markdown
|
8
|
-
|
9
|
-
## Description
|
10
|
-
Glossary to describe the vocabulary of Freddie - an Egeria Markdown language to support the exchange of metadata in a Markdown form.
|
11
|
-
Freddie allows users to input metadata using any text entry system that supports the entry of standard Markdown characters and through post-processing
|
12
|
-
commands, validates the Egeria content and allows the requests to be sent to Egeria. This is an update
|
13
|
-
|
14
|
-
## Language
|
15
|
-
English
|
16
|
-
|
17
|
-
## Usage
|
18
|
-
1) (optional) load an example or template for the type of object from Egeria.
|
19
|
-
2) Create a new document (perhaps from the template) and edit it, adding in the content with the Freddie controlled Markdown language.
|
20
|
-
3) Process the document to validate and display it before you submit it, Validation may annotate your document with recommendations and potential issues.
|
21
|
-
4) Submit the document to Egeria using the Freddie_sings command.
|
22
|
-
5) anything?
|
23
|
-
|
24
|
-
## Qualified Name
|
25
|
-
Glossary:Egeria-Markdown
|
26
|
-
|
27
|
-
## GUID
|
28
|
-
5d45b499-d0d5-4fad-bc23-763bc4073296
|
29
|
-
|
30
|
-
|
31
|
-
---
|
32
|
-
|
33
|
-
# Update Glossary
|
34
|
-
|
35
|
-
## Glossary Name
|
36
|
-
Teddy Bear Drop Foot Terminology
|
37
|
-
|
38
|
-
## Description
|
39
|
-
This glossary describes terminology invented for the fictitious study into Teddy Bear Drop Foot that is being used to demonstrate aspects of open governance without risk to real patient data.
|
40
|
-
|
41
|
-
## Language
|
42
|
-
English
|
43
|
-
|
44
|
-
## Usage
|
45
|
-
Used with the Teddy Bear Drop Foot Demonstration Study.
|
46
|
-
|
47
|
-
## Qualified Name
|
48
|
-
Glossary:TeddyBearDropFootTerminology
|
49
|
-
|
50
|
-
## GUID
|
51
|
-
c103d0c9-7581-47e1-a684-6bbe0ecd596f
|
52
|
-
|
53
|
-
|
54
|
-
---
|
55
|
-
|
56
|
-
# Update Glossary
|
57
|
-
|
58
|
-
## Glossary Name
|
59
|
-
Sustainability Glossary
|
60
|
-
|
61
|
-
## Description
|
62
|
-
Terminology associated with Coco Pharmaceutical's sustainability initiative.
|
63
|
-
|
64
|
-
## Language
|
65
|
-
English
|
66
|
-
|
67
|
-
## Usage
|
68
|
-
For all Coco Pharmaceutical employees wishing to understand more about sustainability and the organization's efforts to improve its operations.
|
69
|
-
|
70
|
-
## Qualified Name
|
71
|
-
Glossary:Sustainability
|
72
|
-
|
73
|
-
## GUID
|
74
|
-
30bfe79e-adf2-4fda-b9c5-9c86ad6b0d6c
|
75
|
-
|
76
|
-
|
77
|
-
---
|
78
|
-
|
@@ -1,235 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"cells": [
|
3
|
-
{
|
4
|
-
"cell_type": "markdown",
|
5
|
-
"id": "f211c1736f87555",
|
6
|
-
"metadata": {},
|
7
|
-
"source": [
|
8
|
-
"# This notebook contains experimental Freddie commands\n",
|
9
|
-
"## Lets see if this is parsed\n",
|
10
|
-
"meow"
|
11
|
-
]
|
12
|
-
},
|
13
|
-
{
|
14
|
-
"cell_type": "markdown",
|
15
|
-
"id": "3b321563-4977-496a-963b-9b9dd75de968",
|
16
|
-
"metadata": {},
|
17
|
-
"source": [
|
18
|
-
"# Create Glossary\n",
|
19
|
-
"## Glossary Name\n",
|
20
|
-
"\n",
|
21
|
-
"Egeria-Markdown\n",
|
22
|
-
"\n",
|
23
|
-
"## Language\n",
|
24
|
-
"English\n",
|
25
|
-
"\n",
|
26
|
-
"## Description\n",
|
27
|
-
"\n",
|
28
|
-
"Glossary to describe the vocabulary of Freddie - an Egeria Markdown language to support the exchange of metadata in a Markdown form.\n",
|
29
|
-
"Freddie allows users to input metadata using any text entry system that supports the entry of standard Markdown characters and through post-processing\n",
|
30
|
-
"commands, validates the Egeria content and allows the requests to be sent to Egeria.\n",
|
31
|
-
"\n",
|
32
|
-
"\n",
|
33
|
-
"## Usage\n",
|
34
|
-
"1) (optional) load an example or template for the type of object from Egeria.\n",
|
35
|
-
"2) Create a new document (perhaps from the template) and edit it, adding in the content with the Freddie controlled Markdown language.\n",
|
36
|
-
"3) Process the document to validate and display it before you submit it, Validation may annotate your document with recommendations and potential issues.\n",
|
37
|
-
"4) Submit the document to Egeria using the Freddie_sings command.\n",
|
38
|
-
"\n",
|
39
|
-
"## <Qualified Name>\n",
|
40
|
-
"\n",
|
41
|
-
"## <GUID>\n",
|
42
|
-
"\n"
|
43
|
-
]
|
44
|
-
},
|
45
|
-
{
|
46
|
-
"cell_type": "code",
|
47
|
-
"execution_count": null,
|
48
|
-
"id": "a7295df2-5afb-46ba-889a-94881d883678",
|
49
|
-
"metadata": {
|
50
|
-
"execution": {
|
51
|
-
"iopub.execute_input": "2025-02-27T15:23:58.820592Z",
|
52
|
-
"iopub.status.busy": "2025-02-27T15:23:58.820416Z",
|
53
|
-
"iopub.status.idle": "2025-02-27T15:24:00.802861Z",
|
54
|
-
"shell.execute_reply": "2025-02-27T15:24:00.802425Z",
|
55
|
-
"shell.execute_reply.started": "2025-02-27T15:23:58.820583Z"
|
56
|
-
}
|
57
|
-
},
|
58
|
-
"outputs": [],
|
59
|
-
"source": [
|
60
|
-
"%pip install jupyter-notebook-parser\n",
|
61
|
-
"%pip install marko"
|
62
|
-
]
|
63
|
-
},
|
64
|
-
{
|
65
|
-
"cell_type": "code",
|
66
|
-
"execution_count": null,
|
67
|
-
"id": "d02383df-f617-48f7-be54-e930b6275a7e",
|
68
|
-
"metadata": {
|
69
|
-
"execution": {
|
70
|
-
"iopub.execute_input": "2025-02-27T15:25:33.155175Z",
|
71
|
-
"iopub.status.busy": "2025-02-27T15:25:33.154695Z",
|
72
|
-
"iopub.status.idle": "2025-02-27T15:25:33.162801Z",
|
73
|
-
"shell.execute_reply": "2025-02-27T15:25:33.162362Z",
|
74
|
-
"shell.execute_reply.started": "2025-02-27T15:25:33.155158Z"
|
75
|
-
}
|
76
|
-
},
|
77
|
-
"outputs": [],
|
78
|
-
"source": [
|
79
|
-
"import json\n",
|
80
|
-
"import marko\n",
|
81
|
-
"from jupyter_notebook_parser import JupyterNotebookParser"
|
82
|
-
]
|
83
|
-
},
|
84
|
-
{
|
85
|
-
"cell_type": "code",
|
86
|
-
"execution_count": null,
|
87
|
-
"id": "b5560fcd-afe4-4133-8204-8f2535feb9b6",
|
88
|
-
"metadata": {
|
89
|
-
"execution": {
|
90
|
-
"iopub.execute_input": "2025-02-27T15:25:34.354443Z",
|
91
|
-
"iopub.status.busy": "2025-02-27T15:25:34.354300Z",
|
92
|
-
"iopub.status.idle": "2025-02-27T15:25:34.358702Z",
|
93
|
-
"shell.execute_reply": "2025-02-27T15:25:34.358236Z",
|
94
|
-
"shell.execute_reply.started": "2025-02-27T15:25:34.354435Z"
|
95
|
-
}
|
96
|
-
},
|
97
|
-
"outputs": [],
|
98
|
-
"source": [
|
99
|
-
"parsed = JupyterNotebookParser('glossary_creation_experiment.ipynb')\n",
|
100
|
-
"\n",
|
101
|
-
"parsed.get_all_cells() # returns List[Dict], each Dict is a notebook cell\n",
|
102
|
-
"\n",
|
103
|
-
"cells = parsed.get_markdown_cells() # returns List[Dict], each Dict is a markdown cel\n",
|
104
|
-
"indices = parsed.get_markdown_cell_indices() # returns List[int], each is a markdown cell's index\n",
|
105
|
-
"cell_sources = parsed.get_markdown_cell_sources() # returns List[str], each is a markdown cell's text\n",
|
106
|
-
"print(json.dumps(cell_sources, indent = 4))"
|
107
|
-
]
|
108
|
-
},
|
109
|
-
{
|
110
|
-
"cell_type": "code",
|
111
|
-
"execution_count": null,
|
112
|
-
"id": "79dffa96-7e2a-40e3-a0d7-ba363d87b70c",
|
113
|
-
"metadata": {
|
114
|
-
"execution": {
|
115
|
-
"iopub.execute_input": "2025-02-27T15:42:47.354237Z",
|
116
|
-
"iopub.status.busy": "2025-02-27T15:42:47.353238Z",
|
117
|
-
"iopub.status.idle": "2025-02-27T15:42:47.360634Z",
|
118
|
-
"shell.execute_reply": "2025-02-27T15:42:47.360090Z",
|
119
|
-
"shell.execute_reply.started": "2025-02-27T15:42:47.354193Z"
|
120
|
-
}
|
121
|
-
},
|
122
|
-
"outputs": [],
|
123
|
-
"source": [
|
124
|
-
"parsed_markdown = marko.parse(cell_sources[0])\n",
|
125
|
-
"print(type(parsed_markdown))"
|
126
|
-
]
|
127
|
-
},
|
128
|
-
{
|
129
|
-
"cell_type": "code",
|
130
|
-
"execution_count": null,
|
131
|
-
"id": "f3d66578-cf02-4e95-a102-f84fbe3aae95",
|
132
|
-
"metadata": {
|
133
|
-
"execution": {
|
134
|
-
"iopub.execute_input": "2025-02-27T15:44:51.000320Z",
|
135
|
-
"iopub.status.busy": "2025-02-27T15:44:51.000168Z",
|
136
|
-
"iopub.status.idle": "2025-02-27T15:44:51.007790Z",
|
137
|
-
"shell.execute_reply": "2025-02-27T15:44:51.007211Z",
|
138
|
-
"shell.execute_reply.started": "2025-02-27T15:44:51.000309Z"
|
139
|
-
}
|
140
|
-
},
|
141
|
-
"outputs": [],
|
142
|
-
"source": [
|
143
|
-
"parsed_source = marko.parse_source(cell_sources[0])"
|
144
|
-
]
|
145
|
-
},
|
146
|
-
{
|
147
|
-
"cell_type": "code",
|
148
|
-
"execution_count": null,
|
149
|
-
"id": "7cc1a99c-46b3-42c9-8b38-77fb721586a7",
|
150
|
-
"metadata": {
|
151
|
-
"execution": {
|
152
|
-
"iopub.execute_input": "2025-02-27T15:45:28.853162Z",
|
153
|
-
"iopub.status.busy": "2025-02-27T15:45:28.852948Z",
|
154
|
-
"iopub.status.idle": "2025-02-27T15:45:28.856556Z",
|
155
|
-
"shell.execute_reply": "2025-02-27T15:45:28.856159Z",
|
156
|
-
"shell.execute_reply.started": "2025-02-27T15:45:28.853153Z"
|
157
|
-
}
|
158
|
-
},
|
159
|
-
"outputs": [],
|
160
|
-
"source": [
|
161
|
-
"? marko"
|
162
|
-
]
|
163
|
-
},
|
164
|
-
{
|
165
|
-
"cell_type": "code",
|
166
|
-
"execution_count": null,
|
167
|
-
"id": "ca5f9660-1f56-4de9-8127-5e7e4a922b5f",
|
168
|
-
"metadata": {},
|
169
|
-
"outputs": [],
|
170
|
-
"source": []
|
171
|
-
},
|
172
|
-
{
|
173
|
-
"cell_type": "code",
|
174
|
-
"execution_count": null,
|
175
|
-
"id": "e967897d83588f86",
|
176
|
-
"metadata": {},
|
177
|
-
"outputs": [],
|
178
|
-
"source": []
|
179
|
-
},
|
180
|
-
{
|
181
|
-
"cell_type": "markdown",
|
182
|
-
"id": "ed29f0e5d46a7c20",
|
183
|
-
"metadata": {},
|
184
|
-
"source": [
|
185
|
-
"# Create Glossary\n",
|
186
|
-
"## Glossary Name\n",
|
187
|
-
"\n",
|
188
|
-
"Another Test\n",
|
189
|
-
"\n",
|
190
|
-
"## Language\n",
|
191
|
-
"English\n",
|
192
|
-
"\n",
|
193
|
-
"## Description\n",
|
194
|
-
"\n",
|
195
|
-
"Another quick test\n",
|
196
|
-
"\n",
|
197
|
-
"## Usage\n",
|
198
|
-
"Alternate sundays\n",
|
199
|
-
"\n",
|
200
|
-
"## <Qualified Name>\n",
|
201
|
-
"\n",
|
202
|
-
"## <GUID>"
|
203
|
-
]
|
204
|
-
},
|
205
|
-
{
|
206
|
-
"cell_type": "code",
|
207
|
-
"execution_count": null,
|
208
|
-
"id": "e36a5074b9a94c1a",
|
209
|
-
"metadata": {},
|
210
|
-
"outputs": [],
|
211
|
-
"source": []
|
212
|
-
}
|
213
|
-
],
|
214
|
-
"metadata": {
|
215
|
-
"kernelspec": {
|
216
|
-
"display_name": "Python 3 (ipykernel)",
|
217
|
-
"language": "python",
|
218
|
-
"name": "python3"
|
219
|
-
},
|
220
|
-
"language_info": {
|
221
|
-
"codemirror_mode": {
|
222
|
-
"name": "ipython",
|
223
|
-
"version": 3
|
224
|
-
},
|
225
|
-
"file_extension": ".py",
|
226
|
-
"mimetype": "text/x-python",
|
227
|
-
"name": "python",
|
228
|
-
"nbconvert_exporter": "python",
|
229
|
-
"pygments_lexer": "ipython3",
|
230
|
-
"version": "3.12.9"
|
231
|
-
}
|
232
|
-
},
|
233
|
-
"nbformat": 4,
|
234
|
-
"nbformat_minor": 5
|
235
|
-
}
|
pyegeria/test_j.html
DELETED
File without changes
|