From c16ada7749d842fa868b7b8b25a1ff17ffdf7b40 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 8 Sep 2026 16:09:44 -0400 Subject: output: the abstraction artefacts live with the pod pod/ holds all document source representations: pod// source tree pod//media/abstraction/.ssp abstraction, as text pod/.zip tree, zipped, .ssp included pod/.digests.txt sha256s of what is in them pod/.ocda.db abstraction, as sqlite db /abstraction/ is gone. pod//media/abstraction/.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// 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) --- org/out_metadata.org | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'org/out_metadata.org') 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_ ~= "

"; + metadata_ ~= "" ~ data.sha256Of.toHexString ~ "::" + ~ data.length.to!string ~ " - " + ~ doc_matters.src.doc_uid_out ~ ".ocda.db"; + metadata_ ~= "

"; + } + } 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_ ~= "

Topics:

"; -- cgit v1.2.3