nide 2026.7.3__tar.gz

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.
Files changed (37) hide show
  1. nide-2026.7.3/COUNTRY-OF-ORIGIN +1 -0
  2. nide-2026.7.3/EXPORT-CONTROL-CLASSIFICATION-NUMBER +1 -0
  3. nide-2026.7.3/LICENSE +21 -0
  4. nide-2026.7.3/MANIFEST.in +5 -0
  5. nide-2026.7.3/PKG-INFO +277 -0
  6. nide-2026.7.3/README.md +250 -0
  7. nide-2026.7.3/nide/__init__.py +55 -0
  8. nide-2026.7.3/nide/__main__.py +4 -0
  9. nide-2026.7.3/nide/_assemble.py +822 -0
  10. nide-2026.7.3/nide/_cli.py +45 -0
  11. nide-2026.7.3/nide/_config.py +97 -0
  12. nide-2026.7.3/nide/_example.py +115 -0
  13. nide-2026.7.3/nide/_harvest.py +107 -0
  14. nide-2026.7.3/nide/_jsonpath.py +52 -0
  15. nide-2026.7.3/nide/_refs.py +91 -0
  16. nide-2026.7.3/nide/_scan.py +11 -0
  17. nide-2026.7.3/nide/_section.py +216 -0
  18. nide-2026.7.3/nide/_toc.py +156 -0
  19. nide-2026.7.3/nide.egg-info/PKG-INFO +277 -0
  20. nide-2026.7.3/nide.egg-info/SOURCES.txt +35 -0
  21. nide-2026.7.3/nide.egg-info/dependency_links.txt +1 -0
  22. nide-2026.7.3/nide.egg-info/entry_points.txt +2 -0
  23. nide-2026.7.3/nide.egg-info/requires.txt +8 -0
  24. nide-2026.7.3/nide.egg-info/top_level.txt +1 -0
  25. nide-2026.7.3/pyproject.toml +89 -0
  26. nide-2026.7.3/setup.cfg +4 -0
  27. nide-2026.7.3/test/test_assemble.py +1405 -0
  28. nide-2026.7.3/test/test_cli.py +138 -0
  29. nide-2026.7.3/test/test_config.py +79 -0
  30. nide-2026.7.3/test/test_example.py +71 -0
  31. nide-2026.7.3/test/test_harvest.py +184 -0
  32. nide-2026.7.3/test/test_jsonpath.py +146 -0
  33. nide-2026.7.3/test/test_refs.py +114 -0
  34. nide-2026.7.3/test/test_scan.py +51 -0
  35. nide-2026.7.3/test/test_section.py +221 -0
  36. nide-2026.7.3/test/test_toc.py +312 -0
  37. nide-2026.7.3/test/test_tutorial.py +379 -0
@@ -0,0 +1 @@
1
+ Switzerland
@@ -0,0 +1 @@
1
+ EAR99
nide-2026.7.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Stefan Hagen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ include COUNTRY-OF-ORIGIN
2
+ include EXPORT-CONTROL-CLASSIFICATION-NUMBER
3
+ include LICENSE
4
+ include README.md
5
+ include docs/koota.1
nide-2026.7.3/PKG-INFO ADDED
@@ -0,0 +1,277 @@
1
+ Metadata-Version: 2.4
2
+ Name: nide
3
+ Version: 2026.7.3
4
+ Summary: A bound volume (Finnish: nide) - assemble markdown text files into gfm-plus, html, and pdf channel outputs.
5
+ Author-email: Stefan Hagen <stefan@hagen.link>
6
+ Maintainer-email: Stefan Hagen <stefan@hagen.link>
7
+ License-Expression: MIT
8
+ Project-URL: Documentation, https://codes.dilettant.life/docs/nide
9
+ Keywords: developer-tools,documentation,markdown
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: jsonschema>=4.26.0
20
+ Requires-Dist: kaava>=2026.6.20
21
+ Requires-Dist: python-jsonpath>=2.0.2
22
+ Requires-Dist: PyYAML>=6.0.3
23
+ Requires-Dist: vyyhti>=2026.6.21
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest; extra == "dev"
26
+ Dynamic: license-file
27
+
28
+ # nide
29
+
30
+ A bound volume (Finnish: nide) — assemble Markdown source files into gfm-plus, html, and pdf channel outputs.
31
+
32
+ Requires Python 3.11 or later.
33
+
34
+ ## Install
35
+
36
+ ```
37
+ pip install nide
38
+ ```
39
+
40
+ ## Manual
41
+
42
+ The [man page](docs/nide.1) provides the CLI reference (`man nide` after placing the file on your `MANPATH`):
43
+
44
+ ```sh
45
+ mkdir -p ~/.local/share/man/man1
46
+ cp docs/nide.1 ~/.local/share/man/man1/
47
+ ```
48
+
49
+ ## Quickstart
50
+
51
+ Run `nide` with no arguments for a usage summary, or `nide --version` to check the installed version.
52
+ For a dedicated feature walkthrough you can follow in minutes visit [quickstart](quickstart/README.md).
53
+ A step-by-step guided build of a document pipeline is provided in the [tutorial](tutorial/README.md).
54
+
55
+ ## Pipeline
56
+
57
+ ```
58
+ nide harvest → build/section-*.json, build/example-*.json
59
+
60
+ nide assemble -t html → build/tmp.md, build/toc-mint.json
61
+ pandoc → build/tmp.html
62
+ nide inject → build/injected.html
63
+ tidy → delivery HTML
64
+
65
+ nide assemble -t pdf → build/pdf.md
66
+ liitos → delivery PDF
67
+ ```
68
+
69
+ ## Commands
70
+
71
+ `nide` has three subcommands.
72
+
73
+ **`nide assemble`** splices a list of Markdown source files into a single
74
+ assembled document, driving channel-specific transformations:
75
+
76
+ - Section headings are numbered and anchored for html and gfm-plus.
77
+ - Citation definition files are expanded into formatted inline citation entries.
78
+ - Glossary definition files are expanded into `<dl>` elements for the html channel.
79
+ - Cross-references (`[sec](#label)`, `[cite](#label)`, `[eg](#label)`) are resolved
80
+ from JSON look-up tables produced by `nide harvest`.
81
+ - A table-of-contents data file (`build/toc-mint.json`) is written alongside the html output.
82
+
83
+ **`nide inject`** post-processes the HTML file that pandoc has produced from
84
+ nide's `build/tmp.md`, applying:
85
+
86
+ - Custom HTML table of contents (built from `build/toc-mint.json`).
87
+ - `<title>` element replaced with the value of `html-title` from config.
88
+ - Base and skin CSS inlined; `<link>` tags removed.
89
+ - Remote logo URL replaced with a local data URL.
90
+ - Image `src` attributes optionally replaced with base64 data URLs.
91
+
92
+ The result is written to `build/injected.html`.
93
+
94
+ **`nide harvest`** scans the Markdown sources and writes JSON look-up table (LUT)
95
+ files for section and example cross-references. Run it before `nide assemble`
96
+ whenever source files change.
97
+
98
+ Three output channels are supported in assembly:
99
+
100
+ | Channel | Output | Intended consumer |
101
+ |:-----------|:---------------------------------------|:-------------------------|
102
+ | `html` | `build/tmp.md` + `build/toc-mint.json` | pandoc → `nide inject` |
103
+ | `gfm-plus` | `build/tmp.md` | direct delivery |
104
+ | `pdf` | `build/pdf.md` | `liitos` |
105
+
106
+ ## Configuration
107
+
108
+ All settings are read from `etc/assembly-config.yaml` (override with `-c`).
109
+ Every key is optional; the built-in defaults are listed below.
110
+
111
+ ### Assembly keys
112
+
113
+ ```yaml
114
+ binder: bind.txt
115
+ binder-ignores:
116
+ gfm-plus: []
117
+ html: []
118
+ pdf: []
119
+ build-path: build
120
+ citation-skip-prefixes:
121
+ - '#'
122
+ citation-sources: []
123
+ cite-cosmetics-template: '**\[**<span id="$label$" class="anchor"></span>**$code$\]** $text$'
124
+ delete-when:
125
+ - contains: '<mark title="Ephemeral region marking">'
126
+ delete:
127
+ - '<mark title="Ephemeral region marking">'
128
+ - '</mark>'
129
+ etc-path: etc
130
+ first-authored-section: '# Scope'
131
+ glossary-sources: []
132
+ html-title: No Title Given
133
+ logo-local-path: images/OASISLogo-v3.0.png
134
+ logo-url: https://docs.oasis-open.org/templates/OASISLogo-v3.0.png
135
+ sec-no-toc-postfix: '{.unnumbered .unlisted}'
136
+ section-display-to-label-db: section-display-to-label.json
137
+ section-display-to-text-db: section-display-to-text.json
138
+ section-label-to-display-db: section-label-to-display.json
139
+ section-reference-style: number
140
+ source-path: src
141
+ toc-template:
142
+ - '$sec_cnt_disp$ [$text$](#$label$) '
143
+ - "\t$sec_cnt_disp$ [$text$](#$label$) "
144
+ - "\t\t$sec_cnt_disp$ [$text$](#$label$) "
145
+ - "\t\t\t$sec_cnt_disp$ [$text$](#$label$) "
146
+ - "\t\t\t\t$sec_cnt_disp$ [$text$](#$label$) "
147
+ tok-sec: "<a id='$thing$'></a>"
148
+ track-examples: false
149
+ ```
150
+
151
+ The `section-*-db` files are look-up tables produced by `nide harvest` and must
152
+ be present before running `nide assemble` with cross-references.
153
+
154
+ ### Inject keys
155
+
156
+ ```yaml
157
+ html-inject-css-base: '' # path to base CSS file (empty = skip)
158
+ html-inject-css-skin: '' # path to skin CSS file
159
+ html-inject-logo-data-url: '' # path to logo data URL .txt file (empty = skip)
160
+ html-inject-logo-remote-url: '' # remote logo URL to replace
161
+ html-inject-toc-trigger: '<h1 id="table-of-contents'
162
+ html-inject-intro-trigger: '' # HTML trigger for TOC end; both triggers required
163
+ html-inject-images: false # inline image data URLs
164
+ html-inject-images-path: build/data-url
165
+ ```
166
+
167
+ Both `html-inject-toc-trigger` and `html-inject-intro-trigger` must be non-empty for
168
+ TOC replacement to occur.
169
+ The trigger values are pandoc-generated HTML id attributes and depend on the heading text.
170
+
171
+ ## Options
172
+
173
+ ### Global options
174
+
175
+ ```
176
+ nide [-V|--version]
177
+ nide version
178
+ ```
179
+
180
+ | Option | Description |
181
+ |:--------------------|:-----------------------------|
182
+ | `-V`, `--version` | Print version string and exit |
183
+ | `version` | Subcommand alias for `--version` |
184
+
185
+ ### `nide assemble`
186
+
187
+ ```
188
+ nide assemble [-d|--debug] [-c PATH|--config PATH] [-t CHANNEL|--target CHANNEL]
189
+ ```
190
+
191
+ | Option | Default | Description |
192
+ |:-------------|:---------------------------|:---------------------------------------------|
193
+ | `-t CHANNEL` | `html` | Output channel: `gfm-plus`, `html`, or `pdf` |
194
+ | `-c PATH` | `etc/assembly-config.yaml` | Path to the assembly configuration file |
195
+ | `-d` | off | Debug mode: write per-stage snapshot files |
196
+
197
+ ### `nide inject`
198
+
199
+ ```
200
+ nide inject [-c PATH|--config PATH]
201
+ ```
202
+
203
+ | Option | Default | Description |
204
+ |:----------|:---------------------------|:----------------------------------------|
205
+ | `-c PATH` | `etc/assembly-config.yaml` | Path to the assembly configuration file |
206
+
207
+ ### `nide harvest`
208
+
209
+ ```
210
+ nide harvest [-c PATH|--config PATH]
211
+ ```
212
+
213
+ | Option | Default | Description |
214
+ |:----------|:---------------------------|:----------------------------------------|
215
+ | `-c PATH` | `etc/assembly-config.yaml` | Path to the assembly configuration file |
216
+
217
+ ### Environment
218
+
219
+ | Variable | Effect |
220
+ |:---------------|:-------------------------------------------------------------|
221
+ | `NIDE_CONFIG` | Default config path when `-c` is not given (all subcommands) |
222
+ | `NIDE_DEBUG` | Enable debug output; equivalent to `-d` (assemble mode) |
223
+ | `DUMP_LUT` | Write back section LUT files to `etc-path` after assembly |
224
+
225
+ ## Dependencies
226
+
227
+ - [jsonschema](https://pypi.org/project/jsonschema/) — JSON Schema validation
228
+ - [kaava](https://pypi.org/project/kaava/) — typed configuration from YAML
229
+ - [python-jsonpath](https://pypi.org/project/python-jsonpath/) — JSONPath expression scanning
230
+ - [PyYAML](https://pypi.org/project/PyYAML/) — YAML parsing
231
+ - [vyyhti](https://pypi.org/project/vyyhti/) — Markdown embedding scanner
232
+
233
+ ## Design and requirements
234
+
235
+ | Document | Identifier | File |
236
+ |:------------------------------------|:------------|:------------------------------------------------|
237
+ | Software Requirements Specification | KOO-SRS-001 | [requirements/srs/](requirements/srs/README.md) |
238
+ | Software Design Description | KOO-SDD-001 | [design/sdd/](design/sdd/README.md) |
239
+
240
+ Both documents follow the MIL-STD-498 DID structure and are rendered into
241
+ the documentation site alongside the quickstart and tutorial.
242
+
243
+ ## Bug Tracker
244
+
245
+ Any feature requests or bug reports shall go to the [todos of nide](https://todo.sr.ht/~sthagen/nide).
246
+
247
+ ## Primary Source repository
248
+
249
+ The main source of `nide` is on a mountain in Central Switzerland under
250
+ configuration control ([fossil](https://fossil-scm.org/)).
251
+
252
+ ## Contributions
253
+
254
+ If you like to share small changes under the repositories license please kindly
255
+ do so by sending a patchset.
256
+ You can send such a patchset per email using [git send-email](https://git-send-email.io).
257
+
258
+ ## Support
259
+
260
+ Please kindly submit issues at https://todo.sr.ht/~sthagen/nide or write plain
261
+ text email to ~sthagen/nide@lists.sr.ht to support.
262
+ Thanks.
263
+
264
+ ## Changes
265
+
266
+ See `docs/changes.md` for the release history.
267
+
268
+ ## Coverage
269
+
270
+ The test suite maintains 100% branch coverage.
271
+ The HTML report (if generated) is in `site/coverage/`.
272
+
273
+ ## SBOM
274
+
275
+ Runtime dependency information is published in `docs/sbom/` in SPDX 3.0 (JSON-LD)
276
+ and CycloneDX 1.6 (JSON) formats.
277
+ See `docs/sbom/README.md` for the component inventory and validation guide.
@@ -0,0 +1,250 @@
1
+ # nide
2
+
3
+ A bound volume (Finnish: nide) — assemble Markdown source files into gfm-plus, html, and pdf channel outputs.
4
+
5
+ Requires Python 3.11 or later.
6
+
7
+ ## Install
8
+
9
+ ```
10
+ pip install nide
11
+ ```
12
+
13
+ ## Manual
14
+
15
+ The [man page](docs/nide.1) provides the CLI reference (`man nide` after placing the file on your `MANPATH`):
16
+
17
+ ```sh
18
+ mkdir -p ~/.local/share/man/man1
19
+ cp docs/nide.1 ~/.local/share/man/man1/
20
+ ```
21
+
22
+ ## Quickstart
23
+
24
+ Run `nide` with no arguments for a usage summary, or `nide --version` to check the installed version.
25
+ For a dedicated feature walkthrough you can follow in minutes visit [quickstart](quickstart/README.md).
26
+ A step-by-step guided build of a document pipeline is provided in the [tutorial](tutorial/README.md).
27
+
28
+ ## Pipeline
29
+
30
+ ```
31
+ nide harvest → build/section-*.json, build/example-*.json
32
+
33
+ nide assemble -t html → build/tmp.md, build/toc-mint.json
34
+ pandoc → build/tmp.html
35
+ nide inject → build/injected.html
36
+ tidy → delivery HTML
37
+
38
+ nide assemble -t pdf → build/pdf.md
39
+ liitos → delivery PDF
40
+ ```
41
+
42
+ ## Commands
43
+
44
+ `nide` has three subcommands.
45
+
46
+ **`nide assemble`** splices a list of Markdown source files into a single
47
+ assembled document, driving channel-specific transformations:
48
+
49
+ - Section headings are numbered and anchored for html and gfm-plus.
50
+ - Citation definition files are expanded into formatted inline citation entries.
51
+ - Glossary definition files are expanded into `<dl>` elements for the html channel.
52
+ - Cross-references (`[sec](#label)`, `[cite](#label)`, `[eg](#label)`) are resolved
53
+ from JSON look-up tables produced by `nide harvest`.
54
+ - A table-of-contents data file (`build/toc-mint.json`) is written alongside the html output.
55
+
56
+ **`nide inject`** post-processes the HTML file that pandoc has produced from
57
+ nide's `build/tmp.md`, applying:
58
+
59
+ - Custom HTML table of contents (built from `build/toc-mint.json`).
60
+ - `<title>` element replaced with the value of `html-title` from config.
61
+ - Base and skin CSS inlined; `<link>` tags removed.
62
+ - Remote logo URL replaced with a local data URL.
63
+ - Image `src` attributes optionally replaced with base64 data URLs.
64
+
65
+ The result is written to `build/injected.html`.
66
+
67
+ **`nide harvest`** scans the Markdown sources and writes JSON look-up table (LUT)
68
+ files for section and example cross-references. Run it before `nide assemble`
69
+ whenever source files change.
70
+
71
+ Three output channels are supported in assembly:
72
+
73
+ | Channel | Output | Intended consumer |
74
+ |:-----------|:---------------------------------------|:-------------------------|
75
+ | `html` | `build/tmp.md` + `build/toc-mint.json` | pandoc → `nide inject` |
76
+ | `gfm-plus` | `build/tmp.md` | direct delivery |
77
+ | `pdf` | `build/pdf.md` | `liitos` |
78
+
79
+ ## Configuration
80
+
81
+ All settings are read from `etc/assembly-config.yaml` (override with `-c`).
82
+ Every key is optional; the built-in defaults are listed below.
83
+
84
+ ### Assembly keys
85
+
86
+ ```yaml
87
+ binder: bind.txt
88
+ binder-ignores:
89
+ gfm-plus: []
90
+ html: []
91
+ pdf: []
92
+ build-path: build
93
+ citation-skip-prefixes:
94
+ - '#'
95
+ citation-sources: []
96
+ cite-cosmetics-template: '**\[**<span id="$label$" class="anchor"></span>**$code$\]** $text$'
97
+ delete-when:
98
+ - contains: '<mark title="Ephemeral region marking">'
99
+ delete:
100
+ - '<mark title="Ephemeral region marking">'
101
+ - '</mark>'
102
+ etc-path: etc
103
+ first-authored-section: '# Scope'
104
+ glossary-sources: []
105
+ html-title: No Title Given
106
+ logo-local-path: images/OASISLogo-v3.0.png
107
+ logo-url: https://docs.oasis-open.org/templates/OASISLogo-v3.0.png
108
+ sec-no-toc-postfix: '{.unnumbered .unlisted}'
109
+ section-display-to-label-db: section-display-to-label.json
110
+ section-display-to-text-db: section-display-to-text.json
111
+ section-label-to-display-db: section-label-to-display.json
112
+ section-reference-style: number
113
+ source-path: src
114
+ toc-template:
115
+ - '$sec_cnt_disp$ [$text$](#$label$) '
116
+ - "\t$sec_cnt_disp$ [$text$](#$label$) "
117
+ - "\t\t$sec_cnt_disp$ [$text$](#$label$) "
118
+ - "\t\t\t$sec_cnt_disp$ [$text$](#$label$) "
119
+ - "\t\t\t\t$sec_cnt_disp$ [$text$](#$label$) "
120
+ tok-sec: "<a id='$thing$'></a>"
121
+ track-examples: false
122
+ ```
123
+
124
+ The `section-*-db` files are look-up tables produced by `nide harvest` and must
125
+ be present before running `nide assemble` with cross-references.
126
+
127
+ ### Inject keys
128
+
129
+ ```yaml
130
+ html-inject-css-base: '' # path to base CSS file (empty = skip)
131
+ html-inject-css-skin: '' # path to skin CSS file
132
+ html-inject-logo-data-url: '' # path to logo data URL .txt file (empty = skip)
133
+ html-inject-logo-remote-url: '' # remote logo URL to replace
134
+ html-inject-toc-trigger: '<h1 id="table-of-contents'
135
+ html-inject-intro-trigger: '' # HTML trigger for TOC end; both triggers required
136
+ html-inject-images: false # inline image data URLs
137
+ html-inject-images-path: build/data-url
138
+ ```
139
+
140
+ Both `html-inject-toc-trigger` and `html-inject-intro-trigger` must be non-empty for
141
+ TOC replacement to occur.
142
+ The trigger values are pandoc-generated HTML id attributes and depend on the heading text.
143
+
144
+ ## Options
145
+
146
+ ### Global options
147
+
148
+ ```
149
+ nide [-V|--version]
150
+ nide version
151
+ ```
152
+
153
+ | Option | Description |
154
+ |:--------------------|:-----------------------------|
155
+ | `-V`, `--version` | Print version string and exit |
156
+ | `version` | Subcommand alias for `--version` |
157
+
158
+ ### `nide assemble`
159
+
160
+ ```
161
+ nide assemble [-d|--debug] [-c PATH|--config PATH] [-t CHANNEL|--target CHANNEL]
162
+ ```
163
+
164
+ | Option | Default | Description |
165
+ |:-------------|:---------------------------|:---------------------------------------------|
166
+ | `-t CHANNEL` | `html` | Output channel: `gfm-plus`, `html`, or `pdf` |
167
+ | `-c PATH` | `etc/assembly-config.yaml` | Path to the assembly configuration file |
168
+ | `-d` | off | Debug mode: write per-stage snapshot files |
169
+
170
+ ### `nide inject`
171
+
172
+ ```
173
+ nide inject [-c PATH|--config PATH]
174
+ ```
175
+
176
+ | Option | Default | Description |
177
+ |:----------|:---------------------------|:----------------------------------------|
178
+ | `-c PATH` | `etc/assembly-config.yaml` | Path to the assembly configuration file |
179
+
180
+ ### `nide harvest`
181
+
182
+ ```
183
+ nide harvest [-c PATH|--config PATH]
184
+ ```
185
+
186
+ | Option | Default | Description |
187
+ |:----------|:---------------------------|:----------------------------------------|
188
+ | `-c PATH` | `etc/assembly-config.yaml` | Path to the assembly configuration file |
189
+
190
+ ### Environment
191
+
192
+ | Variable | Effect |
193
+ |:---------------|:-------------------------------------------------------------|
194
+ | `NIDE_CONFIG` | Default config path when `-c` is not given (all subcommands) |
195
+ | `NIDE_DEBUG` | Enable debug output; equivalent to `-d` (assemble mode) |
196
+ | `DUMP_LUT` | Write back section LUT files to `etc-path` after assembly |
197
+
198
+ ## Dependencies
199
+
200
+ - [jsonschema](https://pypi.org/project/jsonschema/) — JSON Schema validation
201
+ - [kaava](https://pypi.org/project/kaava/) — typed configuration from YAML
202
+ - [python-jsonpath](https://pypi.org/project/python-jsonpath/) — JSONPath expression scanning
203
+ - [PyYAML](https://pypi.org/project/PyYAML/) — YAML parsing
204
+ - [vyyhti](https://pypi.org/project/vyyhti/) — Markdown embedding scanner
205
+
206
+ ## Design and requirements
207
+
208
+ | Document | Identifier | File |
209
+ |:------------------------------------|:------------|:------------------------------------------------|
210
+ | Software Requirements Specification | KOO-SRS-001 | [requirements/srs/](requirements/srs/README.md) |
211
+ | Software Design Description | KOO-SDD-001 | [design/sdd/](design/sdd/README.md) |
212
+
213
+ Both documents follow the MIL-STD-498 DID structure and are rendered into
214
+ the documentation site alongside the quickstart and tutorial.
215
+
216
+ ## Bug Tracker
217
+
218
+ Any feature requests or bug reports shall go to the [todos of nide](https://todo.sr.ht/~sthagen/nide).
219
+
220
+ ## Primary Source repository
221
+
222
+ The main source of `nide` is on a mountain in Central Switzerland under
223
+ configuration control ([fossil](https://fossil-scm.org/)).
224
+
225
+ ## Contributions
226
+
227
+ If you like to share small changes under the repositories license please kindly
228
+ do so by sending a patchset.
229
+ You can send such a patchset per email using [git send-email](https://git-send-email.io).
230
+
231
+ ## Support
232
+
233
+ Please kindly submit issues at https://todo.sr.ht/~sthagen/nide or write plain
234
+ text email to ~sthagen/nide@lists.sr.ht to support.
235
+ Thanks.
236
+
237
+ ## Changes
238
+
239
+ See `docs/changes.md` for the release history.
240
+
241
+ ## Coverage
242
+
243
+ The test suite maintains 100% branch coverage.
244
+ The HTML report (if generated) is in `site/coverage/`.
245
+
246
+ ## SBOM
247
+
248
+ Runtime dependency information is published in `docs/sbom/` in SPDX 3.0 (JSON-LD)
249
+ and CycloneDX 1.6 (JSON) formats.
250
+ See `docs/sbom/README.md` for the component inventory and validation guide.
@@ -0,0 +1,55 @@
1
+ import json
2
+ import pathlib
3
+ from typing import TypeAlias
4
+
5
+ # [[[fill scm_describe()]]]
6
+ __version__ = '2026.7.3+parent.26fc29220e'
7
+ # [[[end]]] (sum: tkVtZGaFPX)
8
+ __version_info__ = tuple(
9
+ e if '-' not in e else e.split('-')[0] for part in __version__.split('+') for e in part.split('.') if e != 'parent'
10
+ )
11
+ VERSION, VERSION_INFO = __version__, __version_info__
12
+
13
+ ENCODING: str = 'utf-8'
14
+ ENC_ERRS: str = 'ignore'
15
+ NL: str = '\n'
16
+ CB_END: str = '}'
17
+ COLON: str = ':'
18
+ DASH: str = '-'
19
+ DOT: str = '.'
20
+ FULL_STOP: str = '.'
21
+ HASH: str = '#'
22
+ PARA: str = '§'
23
+ RS: str = chr(30)
24
+ SEMI: str = ';'
25
+ SPACE: str = ' '
26
+ TM: str = '™'
27
+ GREMLINS: str = ' .,;?!_()[]{}<>\\/$:"\'`´'
28
+
29
+ PathLike: TypeAlias = str | pathlib.Path
30
+
31
+ DO_NOT_EDIT_MEMENTO: dict[str, str] = {
32
+ 'Please do not edit manually!': 'Cf. assembly-config.yaml and nide',
33
+ }
34
+
35
+ __all__ = [
36
+ '__version__',
37
+ 'VERSION',
38
+ 'VERSION_INFO',
39
+ ]
40
+
41
+
42
+ def dump(data: dict[str, str], path: PathLike) -> None:
43
+ with open(path, 'wt', encoding=ENCODING) as handle:
44
+ json.dump(data, handle, indent=2)
45
+ handle.write(NL)
46
+
47
+
48
+ from ._config import ( # noqa: E402
49
+ BinderIgnores as BinderIgnores,
50
+ Config as Config,
51
+ DeleteWhenRule as DeleteWhenRule,
52
+ SectionRefStyle as SectionRefStyle,
53
+ load_config as load_config,
54
+ )
55
+ from ._toc import generate_toc as generate_toc, inject as inject, load_toc as load_toc # noqa: E402
@@ -0,0 +1,4 @@
1
+ from nide._cli import main # pragma: no cover
2
+ import sys # pragma: no cover
3
+
4
+ sys.exit(main()) # pragma: no cover