aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine.org
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 /org/spine.org
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 'org/spine.org')
-rw-r--r--org/spine.org11
1 files changed, 8 insertions, 3 deletions
diff --git a/org/spine.org b/org/spine.org
index e1748e7..e140bd2 100644
--- a/org/spine.org
+++ b/org/spine.org
@@ -340,6 +340,7 @@ bool[string] opts = [
"pdf-color-links" : false,
"pdf-init" : false,
"pod" : false,
+ "pod2" : false,
"serial" : false,
"show-abstraction" : false,
"show-abstraction-db" : false,
@@ -467,6 +468,7 @@ auto helpInfo = getopt(args,
"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"],
@@ -693,13 +695,16 @@ struct OptActions {
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"];
@@ -744,7 +749,7 @@ struct OptActions {
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"];