diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-08 16:09:44 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-09 18:28:25 -0400 |
| commit | c16ada7749d842fa868b7b8b25a1ff17ffdf7b40 (patch) | |
| tree | 8a4d4460d4572af5590302d5c927e8ed66b689ae /org/out_metadata.org | |
| parent | ocda loader: one way in whatever the source (diff) | |
output: the abstraction artefacts live with the pod
pod/ holds all document source representations:
pod/<doc>/ source tree
pod/<doc>/media/abstraction/<uid>.ssp abstraction, as text
pod/<doc>.zip tree, zipped, .ssp included
pod/<doc>.digests.txt sha256s of what is in them
pod/<uid>.ocda.db abstraction, as sqlite db
<lang>/abstraction/ is gone.
pod/<doc>/media/abstraction/<uid>.ssp preferred as having the
images (found within the pod tree) which .ssp needs to reproduce a
document but does not carry on its own.
The .ocda.db sits carries the images as well and (like the
pod.zip) can be used to reproduce a document directly.
digests.txt now covers the database as well as the zip, the source
and the .ssp; (as does the metadata html page).
Two ordering issues addressed:
- the pod builder clean-slates pod/<doc>/ before regenerating it,
and the .ssp is now written before that runs. The clean slate
now leaves media/abstraction/ alone, and the .ssp writer clears
that directory itself on the first language of a run, so a .ssp
for a language the document no longer is removed and cannot be
bundled.
- for a multi-language document the .ssp files accumulate one
language at a time and are bundled on the last, which is why the
directory cannot simply be emptied by whichever (language) gets
there first.
(assisted by Claude-Code)
Diffstat (limited to 'org/out_metadata.org')
| -rw-r--r-- | org/out_metadata.org | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/org/out_metadata.org b/org/out_metadata.org index 8606c69..71bfe9f 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -195,6 +195,23 @@ if (doc_matters.opt.action.html_link_markup_source) { writeln("WARNING, source doc_matters.src.filename_base not found: ", doc_matters.src.filename_base, ".zip\n ", fn_pod); } } + if (doc_matters.opt.action.show_abstraction_db) { + try { // sha digest and size for the abstraction database, beside the pod + string _db_fn = pths_pod.pod_dir_() ~ "/" + ~ doc_matters.src.doc_uid_out ~ ".ocda.db"; + if (_db_fn.exists) { + auto data = (cast(byte[]) (_db_fn).read); + metadata_ ~= "<p class=\"lev2\">"; + metadata_ ~= "<tt>" ~ data.sha256Of.toHexString ~ "::" + ~ data.length.to!string ~ "</tt> - " + ~ doc_matters.src.doc_uid_out ~ ".ocda.db"; + metadata_ ~= "</p>"; + } + } catch (Exception ex) { + writeln("WARNING, abstraction db not read for metadata page: ", + doc_matters.src.doc_uid_out, ".ocda.db"); + } + } } if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) { metadata_ ~= "<hr /><p class=\"lev0\">Topics:</p>"; |
