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_src_abstraction_sqlite_db.org | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'org/out_src_abstraction_sqlite_db.org') diff --git a/org/out_src_abstraction_sqlite_db.org b/org/out_src_abstraction_sqlite_db.org index 9e425bf..9144fdd 100644 --- a/org/out_src_abstraction_sqlite_db.org +++ b/org/out_src_abstraction_sqlite_db.org @@ -42,6 +42,7 @@ template spineAbstractionDb() { import std.array; import d2sqlite3; import sisudoc.outputs.io_out.paths_output; + import sisudoc.ocda.io_in.paths_source; /+ ↓ the abstraction is passed in rather than taken from doc, because the caller hands over one that has been through the .ssp: written as text and read back. so the database is a function of the .ssp and cannot @@ -49,11 +50,16 @@ template spineAbstractionDb() { +/ void spineAbstractionDb(D,A)(D doc, A doc_abstraction) { auto doc_matters = doc.matters; - - /+ ↓ determine output path +/ - auto out_pth = spineOutPaths!()(doc_matters.output_path, doc_matters.src.language); - string base_dir = "abstraction"; - string base_pth = ((out_pth.output_base.chainPath(base_dir)).asNormalizedPath).array; + /+ ↓ output path: beside the pod's zip and digests, not under + /abstraction/. the database carries its own images, so it is a + distributable artefact in its own right and belongs with the others: + pod// the source tree + pod/.zip the same, zipped + pod/.digests.txt what is in them + pod/.ocda.db the abstraction, one per language + +/ + auto pths_pod = spinePathsPods!()(doc_matters); + string base_pth = pths_pod.pod_dir_(); try { if (!exists(base_pth)) { base_pth.mkdirRecurse; -- cgit v1.2.3