diff options
Diffstat (limited to 'org/ocda.org')
| -rw-r--r-- | org/ocda.org | 99 |
1 files changed, 86 insertions, 13 deletions
diff --git a/org/ocda.org b/org/ocda.org index f822f8d..d5651cc 100644 --- a/org/ocda.org +++ b/org/ocda.org @@ -8,13 +8,13 @@ #+COPYRIGHT: Copyright (C) 2015 (continuously updated, current 2026) Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty -#+PROPERTY: header-args :noweb yes -#+PROPERTY: header-args+ :exports code -#+PROPERTY: header-args+ :results silent -#+PROPERTY: header-args+ :cache no -#+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :eval never-export :exports code +#+PROPERTY: header-args+ :noweb yes :padline no +#+PROPERTY: header-args+ :results silent :cache no #+PROPERTY: header-args+ :mkdirp yes #+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t +- magic single double-quote → " ← FIX changes hilighting behavior (occuring + after it) in org document. INVESTIGATE (org-mode CONFIG?) FIND & FIX - [[./doc-reform.org][doc-reform.org]] [[./][org/]] @@ -22,16 +22,89 @@ - Process markup document, create document abstraction +** library templates +*** ocda package.d + +#+HEADER: :tangle "../src/sisudoc/ocda/package.d" +#+HEADER: :noweb yes +#+BEGIN_SRC d +<<doc_header_including_copyright_and_license>> +/++ + sisudoc.ocda - canonical entry point of the document-abstraction + library. + + Pipeline position: markup -> abstraction -> output. This package is + the abstraction stage; the output stage lives in + sisudoc.outputs.io_out and consumes the values produced here. + + This file re-exports sisudoc.ocda.abstraction (the documented public + API surface) so that consumers can write + import sisudoc.ocda; + and reach the entry points (spineAbstraction!(), docAbstraction!(), + spineAbstractionTxt) without depending on spine's directory layout. + + No logic lives here. ++/ +module sisudoc.ocda; +@safe: +public import sisudoc.ocda.abstraction; +#+END_SRC + +*** ocda/abstraction package.d + +#+HEADER: :tangle "../src/sisudoc/ocda/abstraction/package.d" +#+HEADER: :noweb yes +#+BEGIN_SRC d +<<doc_header_including_copyright_and_license>> +/++ + sisudoc.ocda.abstraction - public surface of the document-abstraction + library. + + Pipeline position: markup -> abstraction -> output. + This package is the abstraction stage. The output stage lives in + sisudoc.outputs.io_out and consumes the values produced here. + + Entry points: + - spineAbstraction!() (from sisudoc.ocda.meta.metadoc) - A-layer: + builds the in-memory document object model from a manifest + (pod path, .sst path). Reads the document body, parses YAML + headers, returns a struct with .abstraction (the object + model) and .matters (the conf/meta/src wrapper). + - docAbstraction!() (from sisudoc.ocda.meta.metadoc_from_src) - + B-layer: builds the abstraction from already-loaded body + text plus a pre-built ConfComposite. Pure, no file I/O. + + The A-layer is a thin wrapper over the B-layer; consumers that + want a minimal-dependency entry should use docAbstraction!() + directly. + + Serialisation: + - sisudoc.ocda.abstraction.ssp - PEG-parsable text serialisation of + the abstraction (the .ssp format). See specs/doc-abstraction- + format/ for the format reference. + + This file is a re-export-only surface. No logic lives here; it + exists so external consumers can `import sisudoc.ocda.abstraction;` and + reach the entry points without depending on spine's directory + layout. ++/ +module sisudoc.ocda.abstraction; +@safe: +public import sisudoc.ocda.meta.metadoc; // spineAbstraction (A-layer) +public import sisudoc.ocda.meta.metadoc_from_src; // docAbstraction (B-layer) +public import sisudoc.ocda.abstraction.ssp; // spineAbstractionTxt (.ssp) +#+END_SRC + ** _module template_ :module:metadoc_from_src: -#+HEADER: :tangle "../src/sisudoc/meta/metadoc_from_src.d" +#+HEADER: :tangle "../src/sisudoc/ocda/meta/metadoc_from_src.d" #+HEADER: :noweb yes #+BEGIN_SRC d <<doc_header_including_copyright_and_license>> // document abstraction: // abstraction of sisu markup for downstream processing // metadoc_from_src.d -module sisudoc.meta.metadoc_from_src; +module sisudoc.ocda.meta.metadoc_from_src; @safe: template docAbstraction() { <<docInitialize>> @@ -59,12 +132,12 @@ import std.digest.sha; import std.file; import std.json; import std.path; -import sisudoc.meta; -import sisudoc.meta.defaults; -import sisudoc.meta.rgx; -import sisudoc.meta.metadoc_object_setter; -import sisudoc.meta.rgx; -public import sisudoc.meta.metadoc_from_src_functions; +import sisudoc.ocda.meta; +import sisudoc.ocda.meta.defaults; +import sisudoc.ocda.meta.rgx; +import sisudoc.ocda.meta.metadoc_object_setter; +import sisudoc.ocda.meta.rgx; +public import sisudoc.ocda.meta.metadoc_from_src_functions; mixin docAbstractionFunctions; #+END_SRC |
