Compare commits

...

2 commits

Author SHA1 Message Date
3f0da44d2d added frontmatter 2026-05-07 20:32:06 +02:00
e81d2c938b Added headers 2026-05-07 20:18:49 +02:00
57 changed files with 950 additions and 58 deletions

View file

@ -25,13 +25,15 @@ created: 2026-04-21
---
```
This includes:
Obsidian calls these metadata variables 'Properties'. These include:
- Keyvalue pairs
- Lists (arrays)
- Booleans, numbers, strings, dates
- Nested objects
### Obsidian-specific limitations & quirks
Although its YAML, Obsidian does **not support the full YAML spec equally everywhere**:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,7 @@
- All notes in this Obsidian vault need metadata.
- These metadata need to follow the [Obsidian Front Matter Syntax](Obsidian%20Front%20Matter%20Syntax.md).
- Obsidian calls metadata key-value pairs 'Properties'
- Obsidian calls metadata variables 'Properties'
- In this Corpus we use General properties (every note should have them) and Specific properties (depending on the kind of note, can be inferred from other properties)
## General metadata
@ -21,9 +21,13 @@ Note:
- Notes in iso27DIY-gis/reference and subfolders are typically of the `explanation` or `application` type.
### Language
For the language property we use the language code as defined in ISO 639-1.
For the `language` property we use the language code as defined in ISO 639-1.
### Status
As of yet, the only value defined for the `status` property is `active`.
## Isotags
The property `isotags`, of type list, allows any note to be linked to clauses and controls of the ISO 27001 / ISO 27002 standard, by the `id` property of the Original Standard Texts, found in `Corpus/Standards/ISO27x/OST/27001/EN` and `/Corpus/Standards/ISO27x/OST/27002/EN`, respectively.
For example, a note that needs to be linked to ISO 27001 clause 5.2 Policy, will get a value of C.5.2 added to its `isotags` list. Likewise, a note that needs to be linked to ISO 27002 control 5.15 Access control, will get a value of A.5.15 added to its `isotags` list.
## Metadata for ISO 27001 and 27002 Original Standard Texts
- The original texts of the ISO 27001 and ISO 27002 standards can be found in the OST folder and subfolders.
- These notes are tagged with “sourcetext”.
@ -31,57 +35,3 @@ For the language property we use the language code as defined in ISO 639-1.
- Specific properties for ISO 27002 OST notes are deduced from chapter 4 of the standard ("Themes and Attributes"). They are: `theme`, `control_type`, `information_security_properties`, `cybersecurity_concepts`, `operational_capabilities`, and `security_domains`.
- For the possible values of these properties, see [ISO 27002 Themes and Attributes](ISO%2027002%20Themes%20and%20Attributes.md).
## Phases for ISMS implementation
# Enrichment Prompt Examples
## Adding front matter to original ISO clauses and controls
- We are going to add front matter to the files in folder iso27diy-corp/Corpus/Standards/ISO27x/OST/27002/EN.
- To do this, you will need access to this folder and its contents. Check that you have access, and if not, stop the process immediately and get into contact with the user to fix the problem.
- You also need to be able to read the [Original Standard Text](../iso27diy-corp/Corpus/Standards/ISO27x/OST/27002/EN/ISO%2027002_2022_EN.docx). If you cannot access or read this document, stop the process immediately and get into contact with the user to fix the problem.
- See [_Corpus-metadata](../iso27diy-corp/Corpus/_Corpus-metadata.md) for instructions on adding metadata.
- Each note in this folder (with a few exceptions) represents an ISO 27002 Control.
- Additionally to what is described in the Corpus Metadata note, each control will get metadata fields according to [ISO 27002 Themes and Attributes](ISO%2027002%20Themes%20and%20Attributes.md) - note can be found in the Content Factory folder.
Additionally, you will add the following metadata key-value pairs:
```YAML
notetype: sourcetext
standard: ISO 27002
version: 2022
language: EN
type: control
id: A.<x.yy>
title: <control title>
```
- The `<x.yy>` part of the `id` and the `<control title>` can often be found in the content of the markdown note as a level 2 header.
- THIS IS MOST IMPORTANT: Do not make up or infer any of these themes, attributes and values. If you cannot extract them from the note itself, refer to the Original Standard Text.
- When you cannot extract the information from the note itself, or from the Original Standard Text, mark the note with the tag REVIEW.
## Adding more front matter
We are now going to work on files in iso27diy-corp/Corpus/Standards/ISO27x/OST/27001/NL/
Write a simple program or script to add properly formatted YAML front matter (for Obsidian) to the markdown files in the iso27diy-corp/Corpus/Standards/ISO27x/OST/27001/NL/ directory.
Here is an example for c-6.3-Planning-van-wijzigingen.md:
```
notetype: reference
standard: ISO 27001
version: 2023
language: NL
type: clause
id: "C.6.3"
title: "Planning van wijzigingen"
tags:
- iso27001/2023/EN
- sourcetext
status: active
```
`id` and `title` are specific to the file, the other kv-pairs are the same for all files.
Do a test run to see if your program has the intended effect. Check back with the user if you encounter exceptions.

33
process_md_files.py Normal file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env python3
import os
import glob
# Directory containing the .md files
directory = 'Corpus/Standards/ISO27x/PECB-Lead-Auditor-Training/transcriptions'
# Find all .md files in the directory
md_files = glob.glob(os.path.join(directory, '*.md'))
for file_path in md_files:
# Get the filename without extension
filename = os.path.basename(file_path)
name_without_ext = os.path.splitext(filename)[0]
# Replace dashes with spaces
header_text = name_without_ext.replace('-', ' ')
# Create the header block
header = f'# {header_text}\n\n## Abstract\n\n## Transcription\n\n'
# Read the existing content
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
# Prepend the header
new_content = header + content
# Write back to the file
with open(file_path, 'w', encoding='utf-8') as f:
f.write(new_content)
print("Processed all .md files.")