aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/spine.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-04-22 14:09:25 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-04-22 20:42:31 -0400
commitc02be49130e6eecce62d5117bc95d698fb386901 (patch)
tree41ea77a532dc59817f13611c065c5cdedbaf5a7a /src/sisudoc/spine.d
parent.ssp: omit empty-value array property entries (diff)
add --pod2 flag, decouple --show-abstraction from --pod
Finer-grained control over when .ssp files are produced: --show-abstraction writes .ssp to OUTPUT/lang/abstraction/ independently of any pod flag --pod builds pod without .ssp bundled --pod2 builds pod with .ssp in media/abstraction/ Changes to spine.d: - show_abstraction() now only responds to its own flag and pod2, no longer triggered by source_or_pod - Add pod2 to opts init, getopt, OptActions - pod() returns true for both --pod and --pod2 - source_or_pod() includes pod2 Changes to source_pod.d: - Remove per-document pod directory (rmdirRecurse) before regeneration, ensuring clean slate on every run. This prevents stale content from previous runs (e.g. a --pod2 run followed by --pod would otherwise leave an outdated media/abstraction/ directory) - Gate abstraction directory creation and .ssp bundling on pod2 flag specifically Tested: --pod (no .ssp), --pod2 (.ssp in pod + zip), --show-abstraction (standalone .ssp), --pod after --pod2 (stale abstraction cleaned up). All 35 sample documents pass. Co-Authored-By: Anthropic Claude Opus 4.6 (1M context)
Diffstat (limited to 'src/sisudoc/spine.d')
-rwxr-xr-xsrc/sisudoc/spine.d11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sisudoc/spine.d b/src/sisudoc/spine.d
index 0598ca7..e710281 100755
--- a/src/sisudoc/spine.d
+++ b/src/sisudoc/spine.d
@@ -165,6 +165,7 @@ string program_name = "spine";
"pdf-color-links" : false,
"pdf-init" : false,
"pod" : false,
+ "pod2" : false,
"serial" : false,
"show-abstraction" : false,
"show-abstraction-db" : false,
@@ -278,6 +279,7 @@ string program_name = "spine";
"pdf-color-links", "mono or color links for pdfs", &opts["pdf-color-links"],
"pdf-init", "initialise latex shared files (see latex-header-sty)", &opts["pdf-init"],
"pod", "spine (doc reform) pod source content bundled", &opts["pod"],
+ "pod2", "pod with document abstraction (.ssp) bundled", &opts["pod2"],
"quiet|q", "output to terminal", &opts["vox_is1"],
"section-backmatter", "document backmatter (default)" , &opts["backmatter"],
"section-biblio", "document biblio (default)", &opts["section_biblio"],
@@ -497,13 +499,16 @@ string program_name = "spine";
return ((opts["ocn-off"]) || (opts["no-ocn"])) ? true : false;
}
@trusted bool pod() {
- return opts["pod"];
+ return (opts["pod"] || opts["pod2"]) ? true : false;
+ }
+ @trusted bool pod2() {
+ return opts["pod2"];
}
@trusted bool show_config() {
return opts["show-config"];
}
@trusted bool show_abstraction() {
- return (opts["show-abstraction"] || source_or_pod) ? true : false;
+ return (opts["show-abstraction"] || pod2) ? true : false;
}
@trusted bool show_abstraction_db() {
return opts["show-abstraction-db"];
@@ -548,7 +553,7 @@ string program_name = "spine";
return opts["source"];
}
@trusted bool source_or_pod() {
- return (opts["pod"] || opts["source"]) ? true : false;
+ return (opts["pod"] || opts["pod2"] || opts["source"]) ? true : false;
}
@trusted bool sqlite_discrete() {
return opts["sqlite-discrete"];