aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/io_in/paths_source.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-04-22 13:57:17 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-04-22 20:42:31 -0400
commit8df299dc69ade4484b1167a8fa293c291fbb8a4a (patch)
tree50a4140e4d0bf18ae49a22bd6c8c65f5323e98a4 /src/sisudoc/io_in/paths_source.d
parentdocument abstraction as per document sqlite db (diff)
include .ssp document abstraction in source pod
- When --source/--pod is used, automatically generate the .ssp document abstraction and bundle it into the pod at media/abstraction/{doc_uid}.{lang}.ssp - This makes show_abstraction implicitly true when source_or_pod is active, so the .ssp file is generated before the pod assembler runs (abstraction runs before outputHub, and source_or_pod is the first task in outputHub). - Changes: paths_source.d: Add abstraction_root() path helper to _PodPaths struct, following the same pattern as image_root(). Produces paths like pod/media/abstraction/ for both zpod (inside zip) and filesystem_open_zpod (open directory). source_pod.d: - Create media/abstraction/ directory in podArchive_directory_tree - Bundle .ssp file in pod_zipMakeReady: reads from the abstraction output directory, copies to open pod directory, adds to zip archive, computes SHA-256 digest - Write .ssp digest in zipArchiveDigest alongside sstm and ssi digests spine.d: Make show_abstraction() return true when source_or_pod is active (previously only returned true for explicit --show-abstraction flag). - The .ssp is always included when building pods - no exclusion flag for this experimental feature to keep things simple. Not generated for non-pod outputs (--text, --html, etc.) unless --show-abstraction is explicitly passed. - Tested against all 35 sample documents - zero failures. Co-Authored-By: Anthropic Claude Opus 4.6 (1M context)
Diffstat (limited to 'src/sisudoc/io_in/paths_source.d')
-rw-r--r--src/sisudoc/io_in/paths_source.d14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sisudoc/io_in/paths_source.d b/src/sisudoc/io_in/paths_source.d
index 9f8ae63..41353ed 100644
--- a/src/sisudoc/io_in/paths_source.d
+++ b/src/sisudoc/io_in/paths_source.d
@@ -821,6 +821,20 @@ template spinePathsPods() {
}
return _pods();
}
+ auto abstraction_root(string fn_src) {
+ auto pod_root_ = pod_root(fn_src);
+ auto pth_1_ = ((media_root(fn_src).zpod.chainPath("abstraction")).asNormalizedPath).array;
+ auto pth_2_ = ((media_root(fn_src).filesystem_open_zpod.chainPath("abstraction")).asNormalizedPath).array;
+ struct _pods {
+ auto zpod() {
+ return pth_1_;
+ }
+ auto filesystem_open_zpod() {
+ return pth_2_;
+ }
+ }
+ return _pods();
+ }
auto image_root(string fn_src) {
auto pod_root_ = pod_root(fn_src);
auto pth_1_ = ((media_root(fn_src).zpod.chainPath("image")).asNormalizedPath).array;