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/tests_for_document_abstraction_shell_scripts.org | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'org/tests_for_document_abstraction_shell_scripts.org') diff --git a/org/tests_for_document_abstraction_shell_scripts.org b/org/tests_for_document_abstraction_shell_scripts.org index ec8bbc9..4266e8c 100644 --- a/org/tests_for_document_abstraction_shell_scripts.org +++ b/org/tests_for_document_abstraction_shell_scripts.org @@ -427,10 +427,12 @@ lev4_subtoc|object_subtoc report() { echo " MISMATCH $1: .ssp $2, db $3"; } -for ssp in "$OUT_DIR"/*/abstraction/*.ssp; do +# the .ssp is written into the pod tree (pod//media/abstraction/), the +# database beside it (pod/.ocda.db) +for ssp in $(find "$OUT_DIR/pod" -name "*.ssp" 2>/dev/null | sort); do [ -f "$ssp" ] || continue - db="${ssp%.ssp}.ocda.db" base=$(basename "$ssp" .ssp) + db="$OUT_DIR/pod/$base.ocda.db" if [ ! -f "$db" ]; then echo "MISSING db for $base" FAILURES=$((FAILURES + 1)) @@ -695,10 +697,12 @@ $SPINE_BIN --show-abstraction --show-abstraction-db --skip-output \ COUNT=0 FAILURES=0 -for db in "$OUT_DIR"/*/abstraction/*.ocda.db; do +# the database sits beside the pod (pod/.ocda.db), the .ssp inside it +# (pod//media/abstraction/.ssp) +for db in "$OUT_DIR"/pod/*.ocda.db; do [ -f "$db" ] || continue - ssp="${db%.ocda.db}.ssp" - base=$(basename "$ssp") + base=$(basename "$db" .ocda.db) + ssp=$(find "$OUT_DIR/pod" -name "$base.ssp" 2>/dev/null | head -1) COUNT=$((COUNT + 1)) if [ ! -f "$ssp" ]; then echo "MISSING .ssp for $base" -- cgit v1.2.3