pyegeria 5.3.5.3__py3-none-any.whl → 5.3.6.2__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.
@@ -30,6 +30,7 @@ commands = ["Create Glossary", "Update Glossary",
30
30
  ERROR = "ERROR-> "
31
31
  INFO = "INFO- "
32
32
  WARNING = "WARNING-> "
33
+ pre_command = "\n---\n==> Processing command:"
33
34
 
34
35
  def is_valid_iso_date(date_text) -> bool:
35
36
  """Checks if the given string is a valid ISO date."""
@@ -65,22 +66,30 @@ def extract_attribute (text: str, label: str) -> str | None:
65
66
  """
66
67
  pattern = r"## " + re.escape(label) + r"\n(.*?)(?:##|$)" # Construct pattern
67
68
  match = re.search(pattern, text, re.DOTALL)
68
- if match:
69
- return match.group(1).strip()
69
+ if match and not match.group(1).isspace():
70
+ txt =match.group(1).strip()
71
+ return txt
70
72
  return None
71
73
 
72
74
  def update_a_command(txt: str, command: str, obj_type: str, q_name: str, u_guid: str)->str:
73
75
  u_guid = u_guid if u_guid else " "
74
- txt = txt.replace(f"{command}", f'**Update {obj_type}**\n') # update the command
76
+ verb = command.split(' ')[0].strip()
77
+ action = "Update" if (verb == "Create" and u_guid is not None) else "Create"
78
+ txt = txt.replace(f"{command}", f'**{action} {obj_type}**\n') # update the command
75
79
  txt = txt.replace('<GUID>', f'**GUID**\n{u_guid}') # update with GUID
76
80
  txt = txt.replace('<Qualified Name>', f"**Qualified Name**\n{q_name}")
81
+ if "Qualified Name" not in txt:
82
+ txt += f"\n## **Qualified Name**\n{q_name}\n"
83
+ if "GUID" not in txt:
84
+ txt += f"\n## **GUID**\n{u_guid}\n"
77
85
  # if command == "Update Term":
78
86
  # txt = txt.replace('Update Description', f"**Update Description**\n")
79
87
  return txt
80
88
 
81
89
 
82
90
 
83
- def process_glossary_upsert_command(egeria_client: EgeriaTech, txt: str, directive: str = "display" ) -> str | None:
91
+ def process_glossary_upsert_command(egeria_client: EgeriaTech, element_dictionary: dict, txt: str,
92
+ directive: str = "display" ) -> str | None:
84
93
  """
85
94
  Processes a glossary create or update command by extracting key attributes such as
86
95
  glossary name, language, description, and usage from the given cell.
@@ -95,15 +104,17 @@ def process_glossary_upsert_command(egeria_client: EgeriaTech, txt: str, directi
95
104
  object_action = command.split(' ')[0].strip()
96
105
 
97
106
  glossary_name = extract_attribute(txt, 'Glossary Name')
98
- print(f"\n==> Processing command: {command} for glossary: {glossary_name} with directive: {directive} ")
107
+ print(Markdown(f"{pre_command} `{command}` for glossary: `{glossary_name}` with directive: `{directive}` "))
99
108
  language = extract_attribute(txt, 'Language')
100
109
  description = extract_attribute(txt, 'Description')
101
110
  usage = extract_attribute(txt, 'Usage')
102
111
  glossary_display = (f"\n* Command: {command}\n\t* Glossary: {glossary_name}\n\t"
103
- f"* Language: {language}\n\t* Description: {description}\n\t"
104
- f"* Usage: {usage}")
112
+ f"* Language: {language}\n\t* Description:\n{description}\n"
113
+ f"* Usage: {usage}\n"
114
+ f"* Qualified Name: <Qualified Name>\n"
115
+ f"* GUID: <GUID>\n\n")
105
116
 
106
- def validate_glossary(obj_action: str) -> tuple[bool, bool, str]:
117
+ def validate_glossary(obj_action: str) -> tuple[bool, bool, str | None, str | None]:
107
118
  valid = True
108
119
  msg = ""
109
120
  known_glossary_guid = None
@@ -124,18 +135,25 @@ def process_glossary_upsert_command(egeria_client: EgeriaTech, txt: str, directi
124
135
  if description is None:
125
136
  msg += f"* {INFO}Description is missing\n"
126
137
 
138
+ if len(glossary_details) > 1 and glossary_exists:
139
+ msg += f"* {ERROR}More than one glossary with name {glossary_name} found\n"
140
+ valid = False
141
+ if len(glossary_details) == 1:
142
+ known_glossary_guid = glossary_details[0]['elementHeader'].get('guid', None)
143
+ known_q_name = glossary_details[0]['glossaryProperties'].get('qualifiedName', None)
144
+
127
145
  if obj_action == "Update":
128
146
  q_name = extract_attribute(txt, 'Qualified Name')
129
147
 
130
148
  if not glossary_exists:
131
149
  msg += f"* {ERROR}Glossary {glossary_name} does not exist\n"
132
150
  valid = False
133
- if len(glossary_details) > 1 and glossary_exists:
134
- msg += f"* {ERROR}More than one glossary with name {glossary_name} found\n"
135
- valid = False
136
- if len(glossary_details) == 1:
137
- known_glossary_guid = glossary_details[0]['elementHeader'].get('guid', None)
138
- known_q_name = glossary_details[0]['glossaryProperties'].get('qualifiedName',None)
151
+ # if len(glossary_details) > 1 and glossary_exists:
152
+ # msg += f"* {ERROR}More than one glossary with name {glossary_name} found\n"
153
+ # valid = False
154
+ # if len(glossary_details) == 1:
155
+ # known_glossary_guid = glossary_details[0]['elementHeader'].get('guid', None)
156
+ # known_q_name = glossary_details[0]['glossaryProperties'].get('qualifiedName',None)
139
157
  if q_name is None:
140
158
  msg += f"* {INFO}Qualified Name is missing => can use known qualified name of {known_q_name}\n"
141
159
  valid = True
@@ -147,16 +165,18 @@ def process_glossary_upsert_command(egeria_client: EgeriaTech, txt: str, directi
147
165
  msg += f"* -->Glossary {glossary_name} exists and can be updated\n"
148
166
  else:
149
167
  msg += f"* --> validation failed\n"
150
- msg+='---'
168
+
151
169
  print(Markdown(msg))
152
170
  return valid, glossary_exists, known_glossary_guid, known_q_name
153
171
 
154
172
  elif obj_action == "Create":
155
173
  if glossary_exists:
156
- msg += f"{ERROR}Glossary {glossary_name} already exists"
157
- valid = False
158
- else:
174
+ msg += f"{ERROR}Glossary {glossary_name} already exists\n"
175
+
176
+ elif valid:
159
177
  msg += f"-->It is valid to create Glossary \'{glossary_name}\' with:\n"
178
+ msg += glossary_display
179
+
160
180
  print(Markdown(msg))
161
181
  return valid, glossary_exists, known_glossary_guid, known_q_name
162
182
 
@@ -175,8 +195,9 @@ def process_glossary_upsert_command(egeria_client: EgeriaTech, txt: str, directi
175
195
  return None
176
196
  if object_action == "Update":
177
197
  if not exists:
178
- print(f"\n-->Glossary {glossary_name} does not exist")
179
- return None
198
+ print(f"\n{ERROR}Glossary {glossary_name} does not exist! Updating result document with Create command\n")
199
+ return update_a_command(txt, command, object_type, known_q_name, known_guid)
200
+
180
201
  body = {
181
202
  "class": "ReferenceableRequestBody",
182
203
  "elementProperties":
@@ -190,26 +211,32 @@ def process_glossary_upsert_command(egeria_client: EgeriaTech, txt: str, directi
190
211
  }
191
212
  egeria_client.update_glossary(known_guid, body)
192
213
  print(f"\n-->Updated Glossary {glossary_name} with GUID {known_guid}")
214
+ element_dictionary[f"glossary.{glossary_name}"] = {'guid' : known_guid,
215
+ 'q_name' : known_q_name
216
+ }
193
217
  return update_a_command(txt, command, object_type, known_q_name, known_guid)
194
218
  elif object_action == "Create" :
195
219
  guid = None
196
- q_name = f"Glossary:{glossary_name}:{get_current_datetime_string()}"
197
220
 
198
221
  if exists:
199
- print(f"Glossary {glossary_name} already exists")
222
+ print(f"\nGlossary {glossary_name} already exists and result document updated\n")
200
223
  return update_a_command(txt, command, object_type, known_q_name, known_guid)
201
224
  else:
202
225
  guid = egeria_client.create_glossary(glossary_name, description,
203
226
  language, usage)
204
227
  glossary = egeria_client.get_glossary_by_guid(guid)
205
228
  if glossary == NO_GLOSSARIES_FOUND:
206
- print(f"Just created with GUID {guid} but Glossary not found")
229
+ print(f"{ERROR}Just created with GUID {guid} but Glossary not found\n")
207
230
  return None
208
- q_name = glossary['glossaryProperties']["qualifiedName"]
209
- return update_a_command(txt, command, object_type, q_name, guid)
231
+ qualified_name = glossary['glossaryProperties']["qualifiedName"]
232
+ element_dictionary[f"glossary.{glossary_name}"] = {
233
+ 'guid': guid,
234
+ 'q_name': qualified_name
235
+ }
236
+ return update_a_command(txt, command, object_type, qualified_name, guid)
210
237
 
211
238
 
212
- def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive: str = "display" ) -> str | None:
239
+ def process_term_upsert_command(egeria_client: EgeriaTech, element_dictionary: dict, txt: str, directive: str = "display" ) -> str | None:
213
240
  """
214
241
  Processes a term create or update command by extracting key attributes such as
215
242
  term name, summary, description, abbreviation, examples, usage, version, and status from the given cell.
@@ -234,9 +261,10 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
234
261
  status = extract_attribute(txt, 'Status')
235
262
  glossary_name = extract_attribute(txt, 'Glossary Name')
236
263
 
237
- print(f"\n==> Processing command: {command} for Term {term_name} with directive: {directive}")
264
+ print(Markdown(f"{pre_command} `{command}` for term: `{term_name}` with directive: `{directive}`"))
238
265
 
239
- def validate_term(obj_action: str) -> tuple[bool, bool, str]:
266
+ def validate_term(obj_action: str) -> tuple[bool, bool, str | None, str | None]:
267
+ nonlocal version
240
268
  valid = True
241
269
  msg = ""
242
270
  known_term_guid = None
@@ -256,8 +284,25 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
256
284
  valid = False
257
285
  if status is None:
258
286
  msg += f"* {INFO}Term status is missing - will default to DRAFT"
259
- if obj_action == "Update": # check to see if provided information exists and is consistent with existing info
260
287
 
288
+ if summary is None:
289
+ msg += f"* {INFO}Term summary is missing\n"
290
+
291
+ if description is None:
292
+ msg += f"* {INFO}Term description is missing\n"
293
+
294
+ if abbreviation is None:
295
+ msg += f"* {INFO}Term abbreviation is missing\n"
296
+ if examples is None:
297
+ msg += f"* {INFO}Term examples is missing\n"
298
+ if usage is None:
299
+ msg += f"* {INFO}Term usage is missing\n"
300
+ if version is None:
301
+ msg += f"* {INFO}Term version is missing - will default to 0.0.1\n"
302
+ version = "0.0.1"
303
+
304
+
305
+ if obj_action == "Update": # check to see if provided information exists and is consistent with existing info
261
306
  if not term_exists:
262
307
  msg += f"* {ERROR}Term {term_name} does not exist\n"
263
308
  valid = False
@@ -274,19 +319,20 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
274
319
  else:
275
320
  msg += f"--> * Term {term_name} exists and can be updated\n"
276
321
  msg += term_display
277
- msg += '\n---\n'
322
+
278
323
  print(Markdown(msg))
279
- return valid, term_exists, known_term_guid
324
+ return valid, term_exists, known_term_guid, known_q_name
280
325
 
281
326
  elif obj_action == 'Create': # if the command is create, check that it doesn't already exist
282
327
  if term_exists:
283
- msg += f"{WARNING}Term \'{term_name}\' already exists\n"
284
-
328
+ msg += f"\n{WARNING}Term \'{term_name}\' already exists, response document updated.\n"
329
+ elif not valid:
330
+ msg += f"\n-->Validation checks failed in creating Term \'{term_name}\' with: {term_display}\n"
285
331
  else:
286
- msg += f"-->It is valid to create Term \'{term_name}\' with: {term_display}\n"
287
- msg += '\n---\n'
332
+ msg += f"\n-->It is valid to create Term \'{term_name}\' with: {term_display}\n"
333
+
288
334
  print(Markdown(msg))
289
- return valid, term_exists, known_term_guid
335
+ return valid, term_exists, known_term_guid, known_q_name
290
336
 
291
337
  if object_action == "Update":
292
338
  term_guid = extract_attribute(txt, 'GUID')
@@ -311,11 +357,11 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
311
357
  print(Markdown(term_display))
312
358
  return None
313
359
  elif directive == "validate":
314
- is_valid, exists, known_guid = validate_term(object_action)
360
+ is_valid, exists, known_guid, known_q_name = validate_term(object_action)
315
361
  valid = is_valid if is_valid else None
316
362
  return valid
317
363
  elif directive == "process":
318
- is_valid, exists, known_guid = validate_term(object_action)
364
+ is_valid, exists, known_guid, known_q_name = validate_term(object_action)
319
365
  if not is_valid: # First validate the term before we process it
320
366
  return None
321
367
 
@@ -328,7 +374,7 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
328
374
  "elementProperties":
329
375
  {
330
376
  "class": "GlossaryTermProperties",
331
- "qualifiedName": q_name,
377
+ "qualifiedName": known_q_name,
332
378
  "summary": summary,
333
379
  "description": description,
334
380
  "abbreviation": abbreviation,
@@ -341,20 +387,28 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
341
387
  }
342
388
  egeria_client.update_term(known_guid, body)
343
389
  print(f"\n-->Updated Term {term_name} with GUID {known_guid}")
344
- return update_a_command(txt, command, object_type, q_name, known_guid)
390
+ return update_a_command(txt, command, object_type, known_q_name, known_guid)
345
391
 
346
392
  elif object_action == "Create" :
347
393
  guid = None
348
394
  q_name = f"GlossaryTerm:{term_name}:{get_current_datetime_string()}"
349
395
  if exists:
350
- print(f"\n-->Term {term_name} exists and document updated")
351
- return update_a_command(txt, command, object_type, q_name, guid)
396
+ print(f"\n{ERROR}Term {term_name} exists and result document updated")
397
+ return update_a_command(txt, command, object_type, q_name, known_guid)
352
398
  else:
353
- ## get the guid for the glossary from the name
354
- glossary_guid = egeria_client.__get_guid__(property_name="displayName", display_name=glossary_name)
355
- if glossary_guid == NO_ELEMENTS_FOUND:
356
- print(f"Glossary {glossary_name} not found")
357
- return None
399
+ ## get the guid for the glossary from the name - first look locally
400
+ glossary = element_dictionary.get(f"glossary.{glossary_name}",None)
401
+
402
+ if glossary is not None:
403
+ glossary_guid = glossary.get('guid', None)
404
+ if glossary_guid is None:
405
+ print(f"{ERROR}Glossary reference {glossary_name} not found")
406
+ return None
407
+ else:
408
+ glossary_guid = egeria_client.__get_guid__(property_name="displayName", display_name=glossary_name)
409
+ if glossary_guid == NO_ELEMENTS_FOUND:
410
+ print(f"{ERROR}Glossary {glossary_name} not found")
411
+ return None
358
412
  term_body = {
359
413
  "class": "ReferenceableRequestBody",
360
414
  "elementProperties":
@@ -377,10 +431,15 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
377
431
  "initialStatus": status
378
432
  }
379
433
  term_guid = egeria_client.create_controlled_glossary_term(glossary_guid, term_body)
434
+ if term_guid == NO_ELEMENTS_FOUND:
435
+ print(f"{ERROR}Term {term_name} not created")
436
+ return None
380
437
  print(f"\n-->Created Term {term_name} with GUID {term_guid}")
438
+ element_dictionary[f"term.{term_name}"] = {'guid': term_guid, 'q_name': q_name}
381
439
  return update_a_command(txt, command, object_type, q_name, term_guid)
382
440
 
383
- def process_per_proj_upsert_command(egeria_client: EgeriaTech, txt: str, directive: str = "display" ) -> str | None:
441
+
442
+ def process_per_proj_upsert_command(egeria_client: EgeriaTech, element_dictionary: dict, txt: str, directive: str = "display" ) -> str | None:
384
443
  """
385
444
  Processes a personal project create or update command by extracting key attributes such as
386
445
  glossary name, language, description, and usage from the given cell.
@@ -403,7 +462,7 @@ def process_per_proj_upsert_command(egeria_client: EgeriaTech, txt: str, directi
403
462
  project_health = extract_attribute(txt, 'Project Health')
404
463
  start_date = extract_attribute(txt, 'Start Date')
405
464
  planned_end_date = extract_attribute(txt, 'Planned End Date')
406
- print(f"\n==> Processing command: {command} for project: {project_name} with directive: {directive} ")
465
+ print(Markdown(f"{pre_command} `{command}` for project: `{project_name}` with directive: `{directive}` "))
407
466
 
408
467
  project_display = (f"\n* Command: {command}\n\t* Project: {project_name}\n\t"
409
468
  f"* Status: {project_status}\n\t* Description: {description}\n\t"
@@ -459,7 +518,7 @@ def process_per_proj_upsert_command(egeria_client: EgeriaTech, txt: str, directi
459
518
  msg += f"* {ERROR}Project {project_name} does not exist\n"
460
519
  valid = False
461
520
  if len(project_details) > 1 and project_exists:
462
- msg += f"* {ERROR}More than one projecty with name {project_name} found\n"
521
+ msg += f"* {ERROR}More than one project with name {project_name} found\n"
463
522
  valid = False
464
523
  if len(project_details) == 1:
465
524
  known_guid = project_details[0]['elementHeader'].get('guid', None)
@@ -512,9 +571,8 @@ def process_per_proj_upsert_command(egeria_client: EgeriaTech, txt: str, directi
512
571
  return update_a_command(txt, command, object_type, known_q_name, known_guid)
513
572
  elif object_action == "Create" :
514
573
  guid = None
515
-
516
574
  if exists:
517
- print(f"Project {project_name} already exists and")
575
+ print(f"Project {project_name} already exists and update document created")
518
576
  return update_a_command(txt, command, object_type, known_q_name, known_guid)
519
577
  else:
520
578
  guid = egeria_client.create_project(None,None, None, False,
@@ -526,5 +584,7 @@ def process_per_proj_upsert_command(egeria_client: EgeriaTech, txt: str, directi
526
584
  if project_g == NO_GLOSSARIES_FOUND:
527
585
  print(f"Just created with GUID {guid} but Project not found")
528
586
  return None
529
- q_name = project_g['prjectProperties']["qualifiedName"]
587
+
588
+ q_name = project_g['projectProperties']["qualifiedName"]
589
+ element_dictionary[f"project.{project_name}"] = {'guid': guid, 'q_name': q_name}
530
590
  return update_a_command(txt, command, object_type, q_name, guid)
@@ -0,0 +1,221 @@
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!