aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/spine.org')
-rw-r--r--org/spine.org93
1 files changed, 48 insertions, 45 deletions
diff --git a/org/spine.org b/org/spine.org
index d185adb..05245f7 100644
--- a/org/spine.org
+++ b/org/spine.org
@@ -4,7 +4,7 @@
#+FILETAGS: :spine:hub:
#+AUTHOR: Ralph Amissah
#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
-#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah
+#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah
#+LANGUAGE: en
#+STARTUP: content hideblocks hidestars noindent entitiespretty
#+PROPERTY: header-args :exports code
@@ -37,7 +37,6 @@
- by zip filename
#+HEADER: :tangle "../src/sisudoc/spine.d"
-#+HEADER: :shebang "#!/usr/bin/env rdmd"
#+HEADER: :noweb yes
#+BEGIN_SRC d
<<doc_header_including_copyright_and_license>>
@@ -1282,7 +1281,7 @@ enforce(
*** 1. _document abstraction_ [#A]
- return tuple of:
- - doc_abstraction (the document)
+ - doc.abstraction (the document)
- doc_matters
#+NAME: spine_each_file_do_abstraction
@@ -1292,11 +1291,8 @@ if ((_opt_action.debug_do)
) {
writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]");
}
-auto t = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct);
-static assert(t.length==2);
-auto doc_abstraction = t[dAM.abstraction];
-auto doc_matters = t[dAM.matters];
-if ((doc_matters.opt.action.debug_do)
+auto doc = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct);
+if ((doc.matters.opt.action.debug_do)
|| (_opt_action.debug_do_stages)
) {
writeln("- stepX complete for [", manifest.src.filename, "]");
@@ -1323,9 +1319,9 @@ if ((doc_matters.opt.action.debug_do)
#+NAME: spine_each_file_do_debugs_checkdoc_0
#+BEGIN_SRC d
/+ ↓ debugs +/
-if (doc_matters.opt.action.show_summary) {
+if (doc.matters.opt.action.show_summary) {
import sisudoc.meta.metadoc_show_summary;
- spineMetaDocSummary!()(doc_abstraction, doc_matters);
+ spineMetaDocSummary!()(doc);
}
#+END_SRC
@@ -1335,9 +1331,9 @@ if (doc_matters.opt.action.show_summary) {
#+NAME: spine_each_file_do_debugs_checkdoc_1
#+BEGIN_SRC d
/+ ↓ debugs +/
-if (doc_matters.opt.action.show_metadata) {
+if (doc.matters.opt.action.show_metadata) {
import sisudoc.meta.metadoc_show_metadata;
- spineShowMetaData!()(doc_matters);
+ spineShowMetaData!()(doc.matters);
}
#+END_SRC
@@ -1347,9 +1343,9 @@ if (doc_matters.opt.action.show_metadata) {
#+NAME: spine_each_file_do_debugs_checkdoc_2
#+BEGIN_SRC d
/+ ↓ debugs +/
-if (doc_matters.opt.action.show_make) {
+if (doc.matters.opt.action.show_make) {
import sisudoc.meta.metadoc_show_make;
- spineShowMake!()(doc_matters);
+ spineShowMake!()(doc.matters);
}
#+END_SRC
@@ -1359,9 +1355,9 @@ if (doc_matters.opt.action.show_make) {
#+NAME: spine_each_file_do_debugs_checkdoc_3
#+BEGIN_SRC d
/+ ↓ debugs +/
-if (doc_matters.opt.action.show_config) {
+if (doc.matters.opt.action.show_config) {
import sisudoc.meta.metadoc_show_config;
- spineShowConfig!()(doc_matters);
+ spineShowConfig!()(doc.matters);
}
#+END_SRC
@@ -1370,17 +1366,17 @@ if (doc_matters.opt.action.show_config) {
#+NAME: spine_each_file_do_debugs_checkdoc_4
#+BEGIN_SRC d
-if (doc_matters.opt.action.curate) {
- auto _hvst = spineMetaDocCurate!()(doc_matters, hvst);
+if (doc.matters.opt.action.curate) {
+ auto _hvst = spineMetaDocCurate!()(doc.matters, hvst);
if (
_hvst.title.length > 0
&& _hvst.author_surname_fn.length > 0
) {
hvst.curates ~= _hvst;
} else {
- if ((doc_matters.opt.action.debug_do)
+ if ((doc.matters.opt.action.debug_do)
|| (_opt_action.debug_do_curate)
- || (doc_matters.opt.action.vox_gt2)
+ || (doc.matters.opt.action.vox_gt2)
) {
writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc);
}
@@ -1394,8 +1390,8 @@ if (doc_matters.opt.action.curate) {
#+NAME: spine_each_file_do_debugs_checkdoc_5
#+BEGIN_SRC d
/+ ↓ debugs +/
-if (doc_matters.opt.action.debug_do) {
- spineDebugs!()(doc_abstraction, doc_matters);
+if (doc.matters.opt.action.debug_do) {
+ spineDebugs!()(doc.abstraction, doc.matters);
}
#+END_SRC
@@ -1413,16 +1409,12 @@ if (!(_opt_action.skip_output)) {
#+NAME: spine_each_file_do_selected_output
#+BEGIN_SRC d
/+ ↓ output hub +/
-if (!(doc_matters.opt.action.skip_output)) {
- if ((_opt_action.debug_do)
- || (_opt_action.debug_do_stages)
- ) {
+if (!(doc.matters.opt.action.skip_output)) {
+ if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) {
writeln("step5 commence → (process outputs) [", manifest.src.filename, "]");
}
- doc_abstraction.outputHub!()(doc_matters);
- if ((_opt_action.debug_do)
- || (_opt_action.debug_do_stages)
- ) {
+ doc.outputHub!();
+ if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) {
writeln("- step5 complete for [", manifest.src.filename, "]");
}
}
@@ -1467,13 +1459,13 @@ template spineAbstraction() {
<<spine_metadoc_mixin>>
enum makeMeta { make, meta }
enum docAbst { doc_abstract_obj, doc_has }
- @system auto spineAbstraction(E,P,O,Cfg,M,S)(
- E _env,
- P program_info,
- O _opt_action,
- Cfg _cfg,
- M _manifest,
- S _make_and_meta_struct
+ @system auto spineAbstraction(E,P,O,Cfg,M)(
+ E _env,
+ P program_info,
+ O _opt_action,
+ Cfg _cfg,
+ M _manifest,
+ ConfComposite _make_and_meta_struct
){
<<spine_conf_files_in_yaml>>
<<spine_each_file_do_read_and_split_dr_markup_file_content_into_header_and_body>>
@@ -1489,8 +1481,19 @@ template spineAbstraction() {
}
auto doc_matters = ST_DocumentMatters();
<<spine_each_file_do_document_matters_msg_step4_end>>
- auto t = tuple(doc_abstraction, doc_matters);
- return t;
+ auto theDOC() {
+ struct ST_DOC {
+ const auto abstraction() {
+ return doc_abstraction;
+ }
+ auto matters() {
+ return doc_matters;
+ }
+ }
+ return ST_DOC();
+ }
+ auto the_doc = theDOC();
+ return the_doc;
}
}
#+END_SRC
@@ -1589,12 +1592,12 @@ if ((_opt_action.debug_do)
- prepare the document abstraction used in downstream processing
- _return tuple of_:
- - document abstraction (_the_document_ or doc_abstraction)
+ - document abstraction (_the_document_ or doc.abstraction)
- document abstraction keys
- (head, toc, body, endnotes, glossary, bibliography, bookindex, blurb, tail)
- - (transfer to _doc_matters_)
- - segnames for html epub (transfer to _doc_matters_)
- - image list (transfer to _doc_matters_)
+ - (transfer to _doc.matters_)
+ - segnames for html epub (transfer to _doc.matters_)
+ - image list (transfer to _doc.matters_)
#+NAME: spine_each_file_do_document_abstraction
#+BEGIN_SRC d
@@ -1632,7 +1635,7 @@ if ((_opt_action.debug_do)
if ((_opt_action.debug_do)
|| (_opt_action.debug_do_stages)
) {
- writeln("step4 commence → (doc_matters) [", _manifest.src.filename, "]");
+ writeln("step4 commence → (doc.matters) [", _manifest.src.filename, "]");
}
#+END_SRC
@@ -1691,7 +1694,7 @@ auto generated_time() {
#+NAME: spine_each_file_do_document_matters_2_meta
#+BEGIN_SRC d
-auto conf_make_meta() {
+ConfComposite conf_make_meta() {
return _make_and_meta_struct;
}
auto doc_digest() {