aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/COPYRIGHT2
-rw-r--r--src/sisudoc/COPYRIGHT2
-rw-r--r--src/sisudoc/conf/compile_time_info.d2
-rw-r--r--src/sisudoc/io_in/paths_source.d2
-rw-r--r--src/sisudoc/io_in/read_config_files.d2
-rw-r--r--src/sisudoc/io_in/read_source_files.d22
-rw-r--r--src/sisudoc/io_out/create_zip_file.d2
-rw-r--r--src/sisudoc/io_out/defaults.d2
-rw-r--r--src/sisudoc/io_out/epub3.d124
-rw-r--r--src/sisudoc/io_out/html.d153
-rw-r--r--src/sisudoc/io_out/html_snippet.d2
-rw-r--r--src/sisudoc/io_out/hub.d71
-rw-r--r--src/sisudoc/io_out/latex.d2
-rw-r--r--src/sisudoc/io_out/metadata.d2
-rw-r--r--src/sisudoc/io_out/odt.d2
-rw-r--r--src/sisudoc/io_out/package.d2
-rw-r--r--src/sisudoc/io_out/paths_output.d2
-rw-r--r--src/sisudoc/io_out/rgx.d2
-rw-r--r--src/sisudoc/io_out/rgx_latex.d2
-rw-r--r--src/sisudoc/io_out/rgx_xhtml.d2
-rw-r--r--src/sisudoc/io_out/source_pod.d2
-rw-r--r--src/sisudoc/io_out/sqlite.d163
-rw-r--r--src/sisudoc/io_out/xmls.d4
-rw-r--r--src/sisudoc/io_out/xmls_css.d2
-rw-r--r--src/sisudoc/meta/conf_make_meta_json.d2
-rw-r--r--src/sisudoc/meta/conf_make_meta_structs.d2
-rw-r--r--src/sisudoc/meta/conf_make_meta_yaml.d1011
-rw-r--r--src/sisudoc/meta/defaults.d2
-rw-r--r--src/sisudoc/meta/doc_debugs.d2
-rw-r--r--src/sisudoc/meta/metadoc.d35
-rw-r--r--src/sisudoc/meta/metadoc_curate.d2
-rw-r--r--src/sisudoc/meta/metadoc_curate_authors.d2
-rw-r--r--src/sisudoc/meta/metadoc_curate_topics.d2
-rw-r--r--src/sisudoc/meta/metadoc_from_src.d44
-rw-r--r--src/sisudoc/meta/metadoc_from_src_functions.d206
-rw-r--r--src/sisudoc/meta/metadoc_object_setter.d3
-rw-r--r--src/sisudoc/meta/metadoc_show_config.d6
-rw-r--r--src/sisudoc/meta/metadoc_show_make.d6
-rw-r--r--src/sisudoc/meta/metadoc_show_metadata.d6
-rw-r--r--src/sisudoc/meta/metadoc_show_summary.d36
-rw-r--r--src/sisudoc/meta/package.d2
-rw-r--r--src/sisudoc/meta/rgx.d14
-rw-r--r--src/sisudoc/meta/rgx_files.d2
-rw-r--r--src/sisudoc/meta/rgx_yaml_tags.d2
-rw-r--r--src/sisudoc/share/defaults.d2
-rwxr-xr-xsrc/sisudoc/spine.d96
46 files changed, 960 insertions, 1098 deletions
diff --git a/src/COPYRIGHT b/src/COPYRIGHT
index 2676bf1..2a71121 100644
--- a/src/COPYRIGHT
+++ b/src/COPYRIGHT
@@ -5,7 +5,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah
+ - Copyright: (C) 2015 - 2025 Ralph Amissah
- code under src/* src/sisudoc/*
- License: AGPL 3 or later:
diff --git a/src/sisudoc/COPYRIGHT b/src/sisudoc/COPYRIGHT
index 2676bf1..2a71121 100644
--- a/src/sisudoc/COPYRIGHT
+++ b/src/sisudoc/COPYRIGHT
@@ -5,7 +5,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah
+ - Copyright: (C) 2015 - 2025 Ralph Amissah
- code under src/* src/sisudoc/*
- License: AGPL 3 or later:
diff --git a/src/sisudoc/conf/compile_time_info.d b/src/sisudoc/conf/compile_time_info.d
index e1ce86b..3169237 100644
--- a/src/sisudoc/conf/compile_time_info.d
+++ b/src/sisudoc/conf/compile_time_info.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_in/paths_source.d b/src/sisudoc/io_in/paths_source.d
index 071abff..d5fafa3 100644
--- a/src/sisudoc/io_in/paths_source.d
+++ b/src/sisudoc/io_in/paths_source.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_in/read_config_files.d b/src/sisudoc/io_in/read_config_files.d
index c71364c..8da08f5 100644
--- a/src/sisudoc/io_in/read_config_files.d
+++ b/src/sisudoc/io_in/read_config_files.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_in/read_source_files.d b/src/sisudoc/io_in/read_source_files.d
index b465cc3..c683d1e 100644
--- a/src/sisudoc/io_in/read_source_files.d
+++ b/src/sisudoc/io_in/read_source_files.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -253,7 +253,7 @@ template spineRawMarkupContent() {
) {
char[][] contents_insert;
int code_block_status = 0;
- enum codeBlock { off, curly, tic, }
+ enum codeBlock { off, curly, tic, quotemarks }
auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm);
auto markup_src_file_path = fn_pth_full.captures[1];
foreach (line; markup_sourcefile_insert_content) {
@@ -265,11 +265,19 @@ template spineRawMarkupContent() {
} else if (line.matchFirst(rgx.block_curly_code_open)) {
code_block_status = codeBlock.curly;
contents_insert ~= line;
+ } else if (code_block_status == codeBlock.quotemarks) {
+ if (line.matchFirst(rgx.block_quotemarks_close)) {
+ code_block_status = codeBlock.off;
+ }
+ contents_insert ~= line;
} else if (code_block_status == codeBlock.tic) {
if (line.matchFirst(rgx.block_tic_close)) {
code_block_status = codeBlock.off;
}
contents_insert ~= line;
+ } else if (line.matchFirst(rgx.block_quotemarks_code_open)) {
+ code_block_status = codeBlock.quotemarks;
+ contents_insert ~= line;
} else if (line.matchFirst(rgx.block_tic_code_open)) {
code_block_status = codeBlock.tic;
contents_insert ~= line;
@@ -328,7 +336,7 @@ template spineRawMarkupContent() {
import std.algorithm;
char[][] contents;
int code_block_status = 0;
- enum codeBlock { off, curly, tic, }
+ enum codeBlock { off, curly, tic, quotemarks }
auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm);
auto markup_src_file_path = fn_pth_full.captures[1];
char[][] contents_insert;
@@ -343,11 +351,19 @@ template spineRawMarkupContent() {
} else if (line.matchFirst(rgx.block_curly_code_open)) {
code_block_status = codeBlock.curly;
contents ~= line;
+ } else if (code_block_status == codeBlock.quotemarks) {
+ if (line.matchFirst(rgx.block_quotemarks_close)) {
+ code_block_status = codeBlock.off;
+ }
+ contents ~= line;
} else if (code_block_status == codeBlock.tic) {
if (line.matchFirst(rgx.block_tic_close)) {
code_block_status = codeBlock.off;
}
contents ~= line;
+ } else if (line.matchFirst(rgx.block_quotemarks_code_open)) {
+ code_block_status = codeBlock.quotemarks;
+ contents ~= line;
} else if (line.matchFirst(rgx.block_tic_code_open)) {
code_block_status = codeBlock.tic;
contents ~= line;
diff --git a/src/sisudoc/io_out/create_zip_file.d b/src/sisudoc/io_out/create_zip_file.d
index 36863eb..e468253 100644
--- a/src/sisudoc/io_out/create_zip_file.d
+++ b/src/sisudoc/io_out/create_zip_file.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/defaults.d b/src/sisudoc/io_out/defaults.d
index be7c122..e373b76 100644
--- a/src/sisudoc/io_out/defaults.d
+++ b/src/sisudoc/io_out/defaults.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/epub3.d b/src/sisudoc/io_out/epub3.d
index b4ff21b..610d6b8 100644
--- a/src/sisudoc/io_out/epub3.d
+++ b/src/sisudoc/io_out/epub3.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -95,10 +95,10 @@ template outputEPub3() {
</rootfiles>┃") ~ "\n</container>\n";
return o;
}
- string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) {
+ string epub3_oebps_content(D,P)(D doc, P parts) {
auto xhtml_format = outputXHTMLs();
- auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language);
- string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters!
+ auto pth_epub3 = spinePathsEPUB!()(doc.matters.output_path, doc.matters.src.language);
+ string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc.matters!
string content = format(q"┃<?xml version="1.0" encoding="utf-8"?>
<package version="3.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="uid" prefix="rendition: http://www.idpf.org/vocab/rendition/#">
<metadata
@@ -122,25 +122,25 @@ template outputEPub3() {
<item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" />
┃",
_uuid,
- xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_main),
- (doc_matters.conf_make_meta.meta.title_sub.empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_sub),
- (doc_matters.conf_make_meta.meta.creator_author.empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author),
- (doc_matters.conf_make_meta.meta.creator_author.empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author),
- doc_matters.src.language, // language, fix (needed in dochead metadata)
- (doc_matters.conf_make_meta.meta.date_published.empty)
- ? "" : xhtml_format.special_characters_date(doc_matters.conf_make_meta.meta.date_published),
- (doc_matters.conf_make_meta.meta.rights_copyright.empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright),
+ xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_main),
+ (doc.matters.conf_make_meta.meta.title_sub.empty)
+ ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_sub),
+ (doc.matters.conf_make_meta.meta.creator_author.empty)
+ ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author),
+ (doc.matters.conf_make_meta.meta.creator_author.empty)
+ ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author),
+ doc.matters.src.language, // language, fix (needed in dochead metadata)
+ (doc.matters.conf_make_meta.meta.date_published.empty)
+ ? "" : xhtml_format.special_characters_date(doc.matters.conf_make_meta.meta.date_published),
+ (doc.matters.conf_make_meta.meta.rights_copyright.empty)
+ ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.rights_copyright),
_uuid,
_uuid,
(pth_epub3.fn_oebps_css).chompPrefix("OEBPS/"),
);
content ~= parts["manifest_documents"];
// TODO sort jpg & png
- foreach (image; doc_matters.srcs.image_list) {
+ foreach (image; doc.matters.srcs.image_list) {
content ~= format(q"┃ <item id="%s" href="%s/%s" media-type="image/%s" />
┃",
image.baseName.stripExtension,
@@ -158,8 +158,8 @@ template outputEPub3() {
content ~= " " ~ "</guide>" ~ "\n ";
content ~= "" ~ "</package>";
debug(epubmanifest) {
- foreach (section; doc_matters.has.keys_seq.seg) { // TODO
- foreach (obj; doc_abstraction[section]) {
+ foreach (section; doc.matters.has.keys_seq.seg) { // TODO
+ foreach (obj; doc.abstraction[section]) {
if (obj.metainfo.is_a == "heading") {
if (obj.metainfo.heading_lev_markup == 4) {
writefln(
@@ -183,7 +183,7 @@ template outputEPub3() {
}
return content;
}
- string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) {
+ string epub3_oebps_toc_nav_xhtml(D)(D doc) {
enum DomTags { none, open, close, close_and_open, open_still, }
auto markup = InlineMarkup();
static auto rgx = RgxO();
@@ -202,12 +202,12 @@ template outputEPub3() {
</header>
<nav epub:type="toc" id="toc">
┃",
- (doc_matters.conf_make_meta.meta.title_full).special_characters_text,
+ (doc.matters.conf_make_meta.meta.title_full).special_characters_text,
);
string _toc_nav_tail = "";
- // writeln(doc_matters.has.keys_seq.seg); // DEBUG line
- foreach (sect; doc_matters.has.keys_seq.seg) {
- foreach (obj; doc_abstraction[sect]) {
+ // writeln(doc.matters.has.keys_seq.seg); // DEBUG line
+ foreach (sect; doc.matters.has.keys_seq.seg) {
+ foreach (obj; doc.abstraction[sect]) {
if ((sect == "head") && (obj.metainfo.is_a == "heading")) {
toc = toc_head;
}
@@ -263,7 +263,7 @@ template outputEPub3() {
}
break;
}
- if (doc_matters.has.keys_seq.seg[doc_matters.has.keys_seq.seg.length - 2] == sect) {
+ if (doc.matters.has.keys_seq.seg[doc.matters.has.keys_seq.seg.length - 2] == sect) {
// writeln(n, ": ", sect, ": ", _txt, " - ", obj.metainfo.dom_structure_collapsed_tags_status); // DEBUG
// read last heading (heading prior to closing) and determine what those instructions imply still need to be done
// CLOSE // DomTags { 0 none, 1 open, 2 close, 3 close_and_open, 4 open_still, }
@@ -296,16 +296,12 @@ template outputEPub3() {
toc ~= _toc_nav_tail;
return toc;
}
- @system void outputEPub3(D,I)(
- const D doc_abstraction,
- I doc_matters,
- ) {
+ @system void outputEPub3(D)(D doc) {
mixin spineRgxOut;
mixin spineRgxXHTML;
auto xhtml_format = outputXHTMLs();
static auto rgx = RgxO();
static auto rgx_xhtml = RgxXHTML();
- string[] doc;
string segment_filename;
string[] top_level_headings = ["","","",""];
string[string] oepbs_content_parts;
@@ -322,8 +318,8 @@ template outputEPub3() {
string[] doc_parts;
}
auto epubWrite = writeOut();
- foreach (section; doc_matters.has.keys_seq.seg) {
- foreach (obj; doc_abstraction[section]) {
+ foreach (section; doc.matters.has.keys_seq.seg) {
+ foreach (obj; doc.abstraction[section]) {
string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj);
if (obj.metainfo.is_a == "heading") {
assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail");
@@ -351,8 +347,8 @@ template outputEPub3() {
goto default;
default:
epubWrite.doc_parts ~= obj.tags.segment_anchor_tag_epub;
- epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc_matters);
- Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub");
+ epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc.matters);
+ Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= t[0];
epubWrite.doc_epub3_endnotes[obj.tags.segment_anchor_tag_epub] ~= t[1];
break;
@@ -360,19 +356,19 @@ template outputEPub3() {
break;
case 4:
segment_filename = obj.tags.segment_anchor_tag_epub;
- epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters);
- Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub");
+ epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc.matters);
+ Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case 5: .. case 7:
- Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub");
+ Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case 8: .. case 9:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
@@ -380,7 +376,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup);
}
}
@@ -395,13 +391,13 @@ template outputEPub3() {
case "para":
switch (obj.metainfo.is_a) {
case "toc":
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -410,7 +406,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -422,13 +418,13 @@ template outputEPub3() {
case "para":
switch (obj.metainfo.is_a) {
case "para":
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -438,37 +434,37 @@ template outputEPub3() {
case "block":
switch (obj.metainfo.is_a) {
case "quote":
- t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0].to!string;
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "group":
- t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0].to!string;
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "block":
- t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0].to!string;
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "poem":
break;
case "verse":
- t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0].to!string;
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "code":
- epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters);
+ epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters);
break;
case "table":
- epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters);
+ epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters);
epubWrite.doc_epub3_endnotes[segment_filename] ~= "";
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -477,7 +473,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -490,37 +486,37 @@ template outputEPub3() {
case "para":
switch (obj.metainfo.is_a) {
case "endnote": assert(section == "endnotes");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
break;
case "glossary": assert(section == "glossary");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "bibliography": assert(section == "bibliography");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "bookindex": assert(section == "bookindex");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "blurb": assert(section == "blurb");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "tail": assert(section == "tail");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -529,7 +525,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -540,7 +536,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_epub) {
+ if (doc.matters.opt.action.debug_do_epub) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
}
}
@@ -597,9 +593,9 @@ template outputEPub3() {
/+ epub specific documents +/
epubWrite.mimetypes = epub3_mimetypes;
epubWrite.meta_inf_container_xml = epub3_container_xml;
- epubWrite.oebps_toc_nav_xhtml = doc_abstraction.epub3_oebps_toc_nav_xhtml(doc_matters);
- epubWrite.oebps_content_opf = doc_abstraction.epub3_oebps_content(doc_matters, oepbs_content_parts);
- epubWrite.epub3_write_output_files(doc_matters);
+ epubWrite.oebps_toc_nav_xhtml = doc.epub3_oebps_toc_nav_xhtml;
+ epubWrite.oebps_content_opf = doc.epub3_oebps_content(oepbs_content_parts);
+ epubWrite.epub3_write_output_files(doc.matters);
}
@system void epub3_write_output_files(W,M)(
W epub_write,
diff --git a/src/sisudoc/io_out/html.d b/src/sisudoc/io_out/html.d
index d9aaa58..6d3129a 100644
--- a/src/sisudoc/io_out/html.d
+++ b/src/sisudoc/io_out/html.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -64,22 +64,19 @@ template outputHTML() {
sisudoc.io_out.xmls,
sisudoc.io_out.xmls_css;
mixin outputXHTMLs;
- void scroll(D,M)(
- const D doc_abstraction,
- M doc_matters,
- ) {
+ void scroll(D)(D doc) {
mixin spineRgxOut;
mixin spineRgxXHTML;
auto xhtml_format = outputXHTMLs();
static auto rgx = RgxO();
static auto rgx_xhtml = RgxXHTML();
string[] doc_html;
- string[] doc;
+ string[] doc_out;
string suffix = ".html";
string previous_section = "";
string delimit = "";
- foreach (section; doc_matters.has.keys_seq.scroll) {
- foreach (obj; doc_abstraction[section]) {
+ foreach (section; doc.matters.has.keys_seq.scroll) {
+ foreach (obj; doc.abstraction[section]) {
delimit = xhtml_format.div_delimit(section, previous_section);
string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj);
switch (obj.metainfo.is_of_part) {
@@ -88,14 +85,14 @@ template outputHTML() {
case "para":
switch (obj.metainfo.is_a) {
case "heading":
- doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix);
break;
case "toc":
- doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix);
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -104,7 +101,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -116,14 +113,14 @@ template outputHTML() {
case "para":
switch (obj.metainfo.is_a) {
case "heading":
- doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix);
break;
case "para":
- doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix);
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -133,28 +130,28 @@ template outputHTML() {
case "block":
switch (obj.metainfo.is_a) {
case "quote":
- doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc_matters);
+ doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc.matters);
break;
case "group":
- doc_html ~= xhtml_format.group_scroll(_txt, obj, doc_matters);
+ doc_html ~= xhtml_format.group_scroll(_txt, obj, doc.matters);
break;
case "block":
- doc_html ~= xhtml_format.block_scroll(_txt, obj, doc_matters);
+ doc_html ~= xhtml_format.block_scroll(_txt, obj, doc.matters);
break;
case "poem":
break;
case "verse":
- doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc.matters, suffix);
break;
case "code":
- doc_html ~= xhtml_format.code(_txt, obj, doc_matters);
+ doc_html ~= xhtml_format.code(_txt, obj, doc.matters);
break;
case "table":
- doc_html ~= xhtml_format.table(_txt, obj, doc_matters);
+ doc_html ~= xhtml_format.table(_txt, obj, doc.matters);
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -163,7 +160,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -176,29 +173,29 @@ template outputHTML() {
case "para":
switch (obj.metainfo.is_a) {
case "heading":
- doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix);
break;
case "endnote": assert(section == "endnotes");
- doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix);
break;
case "glossary": assert(section == "glossary");
- doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix);
break;
case "bibliography": assert(section == "bibliography");
- doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix);
break;
case "bookindex": assert(section == "bookindex");
- doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix);
break;
case "blurb": assert(section == "blurb");
- doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix);
break;
case "tail": assert(section == "tail");
- doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix);
+ doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix);
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -207,7 +204,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -218,7 +215,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
@@ -228,18 +225,18 @@ template outputHTML() {
}
}
}
- doc = xhtml_format.html_head(doc_matters, "scroll")
+ doc_out = xhtml_format.html_head(doc.matters, "scroll")
~ doc_html
~ xhtml_format.dom_close
- ~ xhtml_format.tail(doc_matters);
- scroll_write_output(doc, doc_matters);
+ ~ xhtml_format.tail(doc.matters);
+ scroll_write_output(doc_out, doc.matters);
}
- @trusted void scroll_write_output(D,M)(
- D doc,
+ @trusted void scroll_write_output(O,M)(
+ O doc_out,
M doc_matters,
) {
debug(asserts) {
- static assert(is(typeof(doc) == string[]));
+ static assert(is(typeof(doc_out) == string[]));
}
auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language);
try {
@@ -248,7 +245,7 @@ template outputHTML() {
}
{
auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w");
- foreach (o; doc) {
+ foreach (o; doc_out) {
f.writeln(o);
}
}
@@ -271,10 +268,7 @@ template outputHTML() {
writeln(" ", pth_html.fn_scroll(doc_matters.src.filename));
}
}
- void seg(D,M)(
- const D doc_abstraction,
- M doc_matters,
- ) {
+ void seg(D)(D doc) {
mixin spineRgxOut;
mixin spineRgxXHTML;
static auto rgx = RgxO();
@@ -282,15 +276,14 @@ template outputHTML() {
auto xhtml_format = outputXHTMLs();
string[][string] doc_html;
string[][string] doc_html_endnotes;
- string[] doc;
string segment_filename;
string[] top_level_headings = ["","","",""];
string previous_seg_filename = "";
string suffix = ".html";
string previous_section = "";
string delimit = "";
- foreach (section; doc_matters.has.keys_seq.seg) {
- foreach (obj; doc_abstraction[section]) {
+ foreach (section; doc.matters.has.keys_seq.seg) {
+ foreach (obj; doc.abstraction[section]) {
delimit = xhtml_format.div_delimit(section, previous_section);
string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj);
if (obj.metainfo.is_a == "heading") {
@@ -318,33 +311,33 @@ template outputHTML() {
top_level_headings[3] = "";
goto default;
default:
- Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg");
+ Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg");
top_level_headings[obj.metainfo.heading_lev_markup] = t[0];
break;
}
break;
case 4:
segment_filename = obj.tags.segment_anchor_tag_epub;
- doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg");
- auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc_matters);
+ doc_html[segment_filename] ~= xhtml_format.html_head(doc.matters, "seg");
+ auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc.matters);
doc_html[segment_filename] ~= navigation_bar.toc_pre_next;
previous_seg_filename = segment_filename;
foreach (top_level_heading; top_level_headings) {
doc_html[segment_filename] ~= top_level_heading;
}
- Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg");
+ Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
- doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc_matters);
+ doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc.matters);
doc_html_endnotes[segment_filename] ~= t[1];
break;
case 5: .. case 7:
- Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg");
+ Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
doc_html_endnotes[segment_filename] ~= t[1];
break;
case 8: .. case 9:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
@@ -352,7 +345,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup);
}
}
@@ -367,12 +360,12 @@ template outputHTML() {
case "para":
switch (obj.metainfo.is_a) {
case "toc":
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -381,7 +374,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -393,13 +386,13 @@ template outputHTML() {
case "para":
switch (obj.metainfo.is_a) {
case "para":
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
doc_html_endnotes[segment_filename] ~= t[1];
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -409,24 +402,24 @@ template outputHTML() {
case "block":
switch (obj.metainfo.is_a) {
case "quote":
- t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "seg");
goto default;
case "group":
- t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "seg");
goto default;
case "block":
- t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "seg");
goto default;
case "poem":
break;
case "verse":
- t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "seg");
goto default;
case "code":
- doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters);
+ doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters);
break;
case "table":
- doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters);
+ doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters);
doc_html_endnotes[segment_filename] ~= "";
break;
default:
@@ -438,7 +431,7 @@ template outputHTML() {
doc_html[segment_filename] ~= t[0].to!string;
doc_html_endnotes[segment_filename] ~= t[1];
} else { /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -447,7 +440,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -460,37 +453,37 @@ template outputHTML() {
case "para":
switch (obj.metainfo.is_a) {
case "endnote": assert(section == "endnotes");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0];
break;
case "glossary": assert(section == "glossary");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0];
doc_html_endnotes[segment_filename] ~= t[1];
break;
case "bibliography": assert(section == "bibliography");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0];
doc_html_endnotes[segment_filename] ~= t[1];
break;
case "bookindex": assert(section == "bookindex");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0];
doc_html_endnotes[segment_filename] ~= t[1];
break;
case "blurb": assert(section == "blurb");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0];
doc_html_endnotes[segment_filename] ~= t[1];
break;
case "tail": assert(section == "tail");
- t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg");
+ t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg");
doc_html[segment_filename] ~= t[0];
doc_html_endnotes[segment_filename] ~= t[1];
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -499,7 +492,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -510,7 +503,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_html) {
+ if (doc.matters.opt.action.debug_do_html) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
}
}
@@ -519,7 +512,7 @@ template outputHTML() {
}
}
}
- seg_write_output(doc_html, doc_html_endnotes, doc_matters);
+ seg_write_output(doc_html, doc_html_endnotes, doc.matters);
}
@trusted void seg_write_output(D,E,M)( // @system?
D doc_html,
@@ -587,9 +580,7 @@ template outputHTML() {
// Handle error
}
}
- @trusted void images_cp(M)( // @system
- M doc_matters,
- ) {
+ @trusted void images_cp(M)(M doc_matters) { // @system
{ /+ (copy html images) +/
auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language);
if (!exists(pth_html.image)) {
diff --git a/src/sisudoc/io_out/html_snippet.d b/src/sisudoc/io_out/html_snippet.d
index 480246a..9cc9259 100644
--- a/src/sisudoc/io_out/html_snippet.d
+++ b/src/sisudoc/io_out/html_snippet.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/hub.d b/src/sisudoc/io_out/hub.d
index 0b7fe8c..8c41ce5 100644
--- a/src/sisudoc/io_out/hub.d
+++ b/src/sisudoc/io_out/hub.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -59,101 +59,98 @@ template outputHub() {
sisudoc.io_out.xmls,
sisudoc.io_out.create_zip_file,
sisudoc.io_out.paths_output;
- @system void outputHub(D,I)(
- const D doc_abstraction,
- I doc_matters
- ) {
+ @system void outputHub(D)(D doc) {
mixin Msg;
- auto msg = Msg!()(doc_matters);
+ auto msg = Msg!()(doc.matters);
enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff }
- void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) {
- auto msg = Msg!()(doc_matters);
+ void Scheduled(D)(int sched, D doc) {
+ auto msg = Msg!()(doc.matters);
if (sched == outTask.source_or_pod) {
msg.v("spine (doc reform) source processing... ");
- if (doc_matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); }
+ if (doc.matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); }
import sisudoc.io_out.source_pod;
- spinePod!()(doc_matters);
- if (doc_matters.opt.action.source) { msg.vv("spine (doc reform) source done"); }
- if (doc_matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); }
+ spinePod!()(doc.matters);
+ if (doc.matters.opt.action.source) { msg.vv("spine (doc reform) source done"); }
+ if (doc.matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); }
}
if (sched == outTask.epub) {
msg.v("epub3 processing... ");
import sisudoc.io_out.epub3;
- doc_abstraction.outputEPub3!()(doc_matters);
+ doc.outputEPub3!();
msg.vv("epub3 done");
}
if (sched == outTask.html_stuff) {
- outputMetadata!()(doc_matters);
+ outputMetadata!()(doc.matters);
msg.vv("html metadata done");
}
if (sched == outTask.html_scroll) {
msg.v("html scroll processing... ");
import sisudoc.io_out.html;
- outputHTML!().scroll(doc_abstraction, doc_matters);
+ outputHTML!().scroll(doc);
msg.vv("html scroll done");
}
if (sched == outTask.html_seg) {
msg.v("html seg processing... ");
import sisudoc.io_out.html;
- outputHTML!().seg(doc_abstraction, doc_matters);
+ outputHTML!().seg(doc);
msg.vv("html seg done");
}
if (sched == outTask.html_stuff) {
import sisudoc.io_out.html;
- outputHTML!().css(doc_matters);
- outputHTML!().images_cp(doc_matters);
+ outputHTML!().css(doc.matters);
+ outputHTML!().images_cp(doc.matters);
msg.vv("html css & images done");
}
if (sched == outTask.latex) {
msg.v("latex processing... (available for downstream processing & pdf output");
import sisudoc.io_out.latex;
import std.file;
- if ((isValidPath(doc_matters.output_path ~ "/latex/sty"))
- && (!(exists(doc_matters.output_path ~ "/latex/sty")))
+ if ((isValidPath(doc.matters.output_path ~ "/latex/sty"))
+ && (!(exists(doc.matters.output_path ~ "/latex/sty")))
) {
outputLaTeXstyInit!()(
- doc_matters.output_path,
- doc_matters.opt.action.generated_by,
- doc_matters.generator_program.name_version_and_compiler,
- doc_matters.generator_program.time_output_generated,
+ doc.matters.output_path,
+ doc.matters.opt.action.generated_by,
+ doc.matters.generator_program.name_version_and_compiler,
+ doc.matters.generator_program.time_output_generated,
);
}
- outputLaTeX!()(doc_abstraction, doc_matters);
+ outputLaTeX!()(doc.abstraction, doc.matters);
msg.vv("latex done");
}
if (sched == outTask.odt) {
msg.v("odf:odt processing... ");
import sisudoc.io_out.odt;
- outputODT!()(doc_abstraction, doc_matters);
+ outputODT!()(doc.abstraction, doc.matters);
msg.vv("odf:odt done");
}
if (sched == outTask.sqlite) {
msg.v("sqlite processing... ");
import sisudoc.io_out.sqlite;
- doc_abstraction.SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_matters);
+ doc.SQLiteHubDiscreteBuildTablesAndPopulate!();
msg.vv("sqlite done");
}
}
- if (doc_matters.opt.action.vox_gt0) { writeln(doc_matters.src.filename_base); }
- if (!(doc_matters.opt.action.parallelise_subprocesses)) {
- foreach(schedule; doc_matters.opt.action.output_task_scheduler) {
- Scheduled!()(schedule, doc_abstraction, doc_matters);
+ if (doc.matters.opt.action.vox_gt0) { writeln(doc.matters.src.filename_base); }
+ if (!(doc.matters.opt.action.parallelise_subprocesses)) {
+ foreach(schedule; doc.matters.opt.action.output_task_scheduler) {
+ Scheduled!()(schedule, doc);
}
} else {
import std.parallelism;
- foreach(schedule; parallel(doc_matters.opt.action.output_task_scheduler)) {
- Scheduled!()(schedule, doc_abstraction, doc_matters);
+ foreach(schedule; parallel(doc.matters.opt.action.output_task_scheduler)) {
+ Scheduled!()(schedule, doc);
}
}
- if (doc_matters.opt.action.sqlite_update) {
+ if (doc.matters.opt.action.sqlite_update) {
msg.v("sqlite update processing...");
import sisudoc.io_out.sqlite;
- doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters);
+ doc.SQLiteHubBuildTablesAndPopulate!();
msg.vv("sqlite update done");
- } else if (doc_matters.opt.action.sqlite_delete) {
+ } else if (doc.matters.opt.action.sqlite_delete) {
msg.v("sqlite delete processing...");
import sisudoc.io_out.sqlite;
- doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters);
+ doc.SQLiteHubBuildTablesAndPopulate!();
msg.vv("sqlite delete done");
}
}
diff --git a/src/sisudoc/io_out/latex.d b/src/sisudoc/io_out/latex.d
index e1b5731..d26d502 100644
--- a/src/sisudoc/io_out/latex.d
+++ b/src/sisudoc/io_out/latex.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/metadata.d b/src/sisudoc/io_out/metadata.d
index 0917969..4d540af 100644
--- a/src/sisudoc/io_out/metadata.d
+++ b/src/sisudoc/io_out/metadata.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/odt.d b/src/sisudoc/io_out/odt.d
index 0450509..8740d44 100644
--- a/src/sisudoc/io_out/odt.d
+++ b/src/sisudoc/io_out/odt.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/package.d b/src/sisudoc/io_out/package.d
index 5c73cb9..1ab72b0 100644
--- a/src/sisudoc/io_out/package.d
+++ b/src/sisudoc/io_out/package.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/paths_output.d b/src/sisudoc/io_out/paths_output.d
index f134f41..72508fc 100644
--- a/src/sisudoc/io_out/paths_output.d
+++ b/src/sisudoc/io_out/paths_output.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/rgx.d b/src/sisudoc/io_out/rgx.d
index 474a120..9c70c1e 100644
--- a/src/sisudoc/io_out/rgx.d
+++ b/src/sisudoc/io_out/rgx.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/rgx_latex.d b/src/sisudoc/io_out/rgx_latex.d
index 826455c..05c1adb 100644
--- a/src/sisudoc/io_out/rgx_latex.d
+++ b/src/sisudoc/io_out/rgx_latex.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/rgx_xhtml.d b/src/sisudoc/io_out/rgx_xhtml.d
index 1c33b0e..58d6138 100644
--- a/src/sisudoc/io_out/rgx_xhtml.d
+++ b/src/sisudoc/io_out/rgx_xhtml.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/source_pod.d b/src/sisudoc/io_out/source_pod.d
index 2b9953f..a6253ab 100644
--- a/src/sisudoc/io_out/source_pod.d
+++ b/src/sisudoc/io_out/source_pod.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/io_out/sqlite.d b/src/sisudoc/io_out/sqlite.d
index bee9cad..8776c9f 100644
--- a/src/sisudoc/io_out/sqlite.d
+++ b/src/sisudoc/io_out/sqlite.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -66,11 +66,8 @@ static auto rgx_xhtml = RgxXHTML();
static auto mkup = InlineMarkup();
long _metadata_tid_lastrowid;
template SQLiteHubBuildTablesAndPopulate() {
- void SQLiteHubBuildTablesAndPopulate(D,M)(
- const D doc_abstraction,
- M doc_matters,
- ) {
- auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path);
+ void SQLiteHubBuildTablesAndPopulate(D)(D doc) {
+ auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path);
if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) {
} else {
try {
@@ -78,14 +75,13 @@ template SQLiteHubBuildTablesAndPopulate() {
} catch (FileException ex) { }
}
template SQLiteDbStatementComposite() {
- void SQLiteDbStatementComposite(Db,D,M)(
- Db db,
- const D doc_abstraction,
- M doc_matters,
+ void SQLiteDbStatementComposite(Db,D)(
+ Db db,
+ D doc
) {
string _db_statement;
- if ((doc_matters.opt.action.sqlite_db_create)) {
- auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path);
+ if ((doc.matters.opt.action.sqlite_db_create)) {
+ auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path);
if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) {
} else {
try {
@@ -93,38 +89,38 @@ template SQLiteHubBuildTablesAndPopulate() {
} catch (FileException ex) { }
}
_db_statement ~= SQLiteTablesReCreate!()();
- SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "TABLE RE-CREATE");
+ SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "TABLE RE-CREATE");
_db_statement = [];
}
- if (doc_matters.opt.action.sqlite_delete) {
- _db_statement ~= SQLiteDeleteDocument!()(doc_matters);
- SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document");
+ if (doc.matters.opt.action.sqlite_delete) {
+ _db_statement ~= SQLiteDeleteDocument!()(doc.matters);
+ SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document");
_db_statement = [];
}
- if (doc_matters.opt.action.sqlite_update) {
- _db_statement ~= SQLiteDeleteDocument!()(doc_matters);
- SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document");
+ if (doc.matters.opt.action.sqlite_update) {
+ _db_statement ~= SQLiteDeleteDocument!()(doc.matters);
+ SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document");
_db_statement = [];
- _db_statement ~= SQLiteInsertMetadata!()(doc_matters);
- SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaData");
+ _db_statement ~= SQLiteInsertMetadata!()(doc.matters);
+ SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaData");
_db_statement = [];
- /+ get tid (lastrowid or max) for use in doc_objects table +/
- _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters);
- SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT DocObjects");
+ /+ get tid (lastrowid or max) for use in doc.objects table +/
+ _db_statement ~= doc.SQLiteInsertDocObjectsLoop!();
+ SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT DocObjects");
_db_statement = [];
- _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters);
- SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaDataTopics");
+ _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters);
+ SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaDataTopics");
_db_statement = [];
}
db.close;
- if (doc_matters.opt.action.vox_gt0) {
+ if (doc.matters.opt.action.vox_gt0) {
writeln(" ", pth_sqlite.sqlite_file);
}
}
}
try {
auto db = Database(pth_sqlite.sqlite_file);
- SQLiteDbStatementComposite!()(db, doc_abstraction, doc_matters);
+ SQLiteDbStatementComposite!()(db, doc);
}
catch (FileException e) {
writeln("Failed (FileException): ", e.msg, " ", pth_sqlite.sqlite_file);
@@ -152,33 +148,29 @@ template SQLiteHubBuildTablesAndPopulate() {
}
}
template SQLiteHubDiscreteBuildTablesAndPopulate() {
- void SQLiteHubDiscreteBuildTablesAndPopulate(D,M)(
- const D doc_abstraction,
- M doc_matters,
- ) {
- auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language);
- auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); // doc_matters.db_path
+ void SQLiteHubDiscreteBuildTablesAndPopulate(D)(D doc) {
+ auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language);
+ auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc.matters.output_path, doc.matters.src.language); // doc.matters.db_path
if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) {
} else {
try {
pth_sqlite.base.mkdirRecurse;
} catch (FileException ex) { }
}
- auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename));
+ auto db = Database(pth_sqlite.sqlite_file(doc.matters.src.filename));
template SQLiteDiscreteDbStatementComposite() {
- void SQLiteDiscreteDbStatementComposite(Db,D,M)(
- Db db,
- const D doc_abstraction,
- M doc_matters,
+ void SQLiteDiscreteDbStatementComposite(Db,D)(
+ Db db,
+ D doc
) {
try {
{
string _db_statement;
_db_statement ~= SQLiteTablesReCreate!()();
- _db_statement ~= SQLiteInsertMetadata!()(doc_matters);
- _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters);
- _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters);
- SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "table CREATE Tables, INSERT DocObjects");
+ _db_statement ~= SQLiteInsertMetadata!()(doc.matters);
+ _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters);
+ _db_statement ~= doc.SQLiteInsertDocObjectsLoop!();
+ SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "table CREATE Tables, INSERT DocObjects");
}
db.close;
}
@@ -204,12 +196,12 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() {
import core.runtime;
core.runtime.Runtime.terminate();
}
- if (doc_matters.opt.action.vox_gt0) {
- writeln(" ", pth_sqlite.sqlite_file(doc_matters.src.filename));
+ if (doc.matters.opt.action.vox_gt0) {
+ writeln(" ", pth_sqlite.sqlite_file(doc.matters.src.filename));
}
}
}
- SQLiteDiscreteDbStatementComposite!()(db, doc_abstraction, doc_matters);
+ SQLiteDiscreteDbStatementComposite!()(db, doc);
}
}
template SQLiteDbRun() {
@@ -251,9 +243,7 @@ template SQLinsertDelimiter() {
}
}
template SQLiteFormatAndLoadObject() {
- auto SQLiteFormatAndLoadObject(M)(
- M doc_matters,
- ) {
+ auto SQLiteFormatAndLoadObject(M)(M doc_matters) {
mixin spineRgxOut;
mixin spineRgxXHTML;
struct sqlite_format_and_load_objects {
@@ -1143,9 +1133,7 @@ template SQLiteTablesReCreate() {
}
}
template SQLiteDeleteDocument() {
- string SQLiteDeleteDocument(M)(
- M doc_matters,
- ) {
+ string SQLiteDeleteDocument(M)(M doc_matters) {
string _uid = doc_matters.src.doc_uid;
string _delete_uid = format(q"┃
DELETE FROM metadata_and_text
@@ -1160,9 +1148,7 @@ template SQLiteDeleteDocument() {
}
}
template SQLiteInsertMetadata() {
- string SQLiteInsertMetadata(M)(
- M doc_matters,
- ) {
+ string SQLiteInsertMetadata(M)(M doc_matters) {
string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid);
string _insert_metadata = format(q"┃
INSERT INTO metadata_and_text (
@@ -1276,9 +1262,7 @@ template SQLiteInsertMetadata() {
}
}
template SQLiteInsertMetadataTopics() {
- string SQLiteInsertMetadataTopics(M)(
- M doc_matters,
- ) {
+ string SQLiteInsertMetadataTopics(M)(M doc_matters) {
string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid);
string[] _insert_topics;
foreach (topic_line; doc_matters.conf_make_meta.meta.classify_topic_register_expanded_arr) {
@@ -1301,12 +1285,9 @@ template SQLiteInsertMetadataTopics() {
}
}
template SQLiteInsertDocObjectsLoop() {
- string SQLiteInsertDocObjectsLoop(D,M)(
- const D doc_abstraction,
- M doc_matters,
- ) {
- string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid);
- auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language);
+ string SQLiteInsertDocObjectsLoop(D)(D doc) {
+ string _uid = SQLinsertDelimiter!()(doc.matters.src.doc_uid);
+ auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language);
string insertDocObjectsRow(O)(O obj) {
string _insert_doc_objects_row = format(q"┃
INSERT INTO doc_objects (
@@ -1336,23 +1317,23 @@ template SQLiteInsertDocObjectsLoop() {
);
return _insert_doc_objects_row;
}
- auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc_matters);
+ auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc.matters);
string[string] obj_txt;
string doc_text;
string[] _insert_doc_objects;
- foreach (part; doc_matters.has.keys_seq.sql) {
- foreach (obj; doc_abstraction[part]) {
+ foreach (part; doc.matters.has.keys_seq.sql) {
+ foreach (obj; doc.abstraction[part]) {
switch (obj.metainfo.is_of_part) {
case "frontmatter": assert(part == "head", part);
switch (obj.metainfo.is_of_type) {
case "para":
switch (obj.metainfo.is_a) {
case "heading":
- obj_txt = format_and_sqlite_load.heading(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.heading(doc.matters, obj);
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_sqlite) {
+ if (doc.matters.opt.action.debug_do_sqlite) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -1361,7 +1342,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_sqlite) {
+ if (doc.matters.opt.action.debug_do_sqlite) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -1378,14 +1359,14 @@ template SQLiteInsertDocObjectsLoop() {
writeln(__LINE__, ": ", obj.text);
}
}
- obj_txt = format_and_sqlite_load.heading(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.heading(doc.matters, obj);
break;
case "para":
- obj_txt = format_and_sqlite_load.para(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.para(doc.matters, obj);
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_sqlite) {
+ if (doc.matters.opt.action.debug_do_sqlite) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -1395,28 +1376,28 @@ template SQLiteInsertDocObjectsLoop() {
case "block":
switch (obj.metainfo.is_a) {
case "quote":
- obj_txt = format_and_sqlite_load.quote(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.quote(doc.matters, obj);
break;
case "group":
- obj_txt = format_and_sqlite_load.group(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.group(doc.matters, obj);
break;
case "block":
- obj_txt = format_and_sqlite_load.block(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.block(doc.matters, obj);
break;
case "poem": // double check on keeping both poem & verse
break;
case "verse":
- obj_txt = format_and_sqlite_load.verse(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.verse(doc.matters, obj);
break;
case "code":
- obj_txt = format_and_sqlite_load.code(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.code(doc.matters, obj);
break;
case "table":
- obj_txt = format_and_sqlite_load.table(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.table(doc.matters, obj);
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_sqlite) {
+ if (doc.matters.opt.action.debug_do_sqlite) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -1425,7 +1406,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_sqlite) {
+ if (doc.matters.opt.action.debug_do_sqlite) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -1438,23 +1419,23 @@ template SQLiteInsertDocObjectsLoop() {
case "para":
switch (obj.metainfo.is_a) {
case "heading":
- obj_txt = format_and_sqlite_load.heading(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.heading(doc.matters, obj);
break;
case "glossary": assert(part == "glossary", part);
- obj_txt = format_and_sqlite_load.para(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.para(doc.matters, obj);
break;
case "bibliography": assert(part == "bibliography", part);
- obj_txt = format_and_sqlite_load.para(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.para(doc.matters, obj);
break;
case "bookindex": assert(part == "bookindex", part);
- obj_txt = format_and_sqlite_load.para(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.para(doc.matters, obj);
break;
case "blurb": assert(part == "blurb", part);
- obj_txt = format_and_sqlite_load.para(doc_matters, obj);
+ obj_txt = format_and_sqlite_load.para(doc.matters, obj);
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_sqlite) {
+ if (doc.matters.opt.action.debug_do_sqlite) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
}
@@ -1463,7 +1444,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_sqlite) {
+ if (doc.matters.opt.action.debug_do_sqlite) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
}
@@ -1474,7 +1455,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do_sqlite) {
+ if (doc.matters.opt.action.debug_do_sqlite) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from
@@ -1483,9 +1464,9 @@ template SQLiteInsertDocObjectsLoop() {
break;
}
if (obj.metainfo.is_a == "heading") {
- if (doc_matters.opt.action.show_sqlite) {
+ if (doc.matters.opt.action.show_sqlite) {
if (obj.metainfo.heading_lev_markup == 0) {
- writeln(doc_matters.src.filename);
+ writeln(doc.matters.src.filename);
}
writeln(
"markup: ", obj.metainfo.heading_lev_markup,
diff --git a/src/sisudoc/io_out/xmls.d b/src/sisudoc/io_out/xmls.d
index c268bb7..7fc5e51 100644
--- a/src/sisudoc/io_out/xmls.d
+++ b/src/sisudoc/io_out/xmls.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -490,7 +490,7 @@ string tail(M)(M doc_matters) {
<a href="https://sisudoc.org" class="lnkicon">≅ SiSU Spine ፨</a> (object numbering &amp; object search)
</p>
<p class="small_center" id="sisu_spine"><a name="sisu_spine"></a>
- (web 1993, object numbering 1997, object search 2002 ...) 2024
+ (web 1993, object numbering 1997, object search 2002 ...) 2025
</p>
</div>
<a name="bottom" id="bottom"></a>
diff --git a/src/sisudoc/io_out/xmls_css.d b/src/sisudoc/io_out/xmls_css.d
index e9f38e6..aef861a 100644
--- a/src/sisudoc/io_out/xmls_css.d
+++ b/src/sisudoc/io_out/xmls_css.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/conf_make_meta_json.d b/src/sisudoc/meta/conf_make_meta_json.d
index 5330799..44f2c5e 100644
--- a/src/sisudoc/meta/conf_make_meta_json.d
+++ b/src/sisudoc/meta/conf_make_meta_json.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/conf_make_meta_structs.d b/src/sisudoc/meta/conf_make_meta_structs.d
index 3ece2dc..4738a57 100644
--- a/src/sisudoc/meta/conf_make_meta_structs.d
+++ b/src/sisudoc/meta/conf_make_meta_structs.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/conf_make_meta_yaml.d b/src/sisudoc/meta/conf_make_meta_yaml.d
index 5712bcf..98a92f9 100644
--- a/src/sisudoc/meta/conf_make_meta_yaml.d
+++ b/src/sisudoc/meta/conf_make_meta_yaml.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -71,7 +71,7 @@ template contentYAMLtoSpineStruct() {
sisudoc.meta.rgx_yaml,
sisudoc.meta.rgx;
ConfComposite _struct_composite;
- @system auto contentYAMLtoSpineStruct(C,Y,M,O,Cfg)(
+ @system ConfComposite contentYAMLtoSpineStruct(C,Y,M,O,Cfg)(
C _struct_composite,
Y _yaml,
M _manifested,
@@ -91,8 +91,55 @@ template contentYAMLtoSpineStruct() {
.strip;
return _txt;
}
+ @system string _get_yaml_node_string(Y)(
+ Y _yaml,
+ string _return,
+ string _title,
+ string _subtitle,
+ bool _munge=false
+ ) {
+ if ((_title in _yaml && _yaml[_title].type.sequence)
+ && (_yaml[_title].type.mapping
+ && _yaml[_title].tag.match(rgx_y.yaml_tag_is_map))
+ ) {
+ if (_subtitle in _yaml[_title]
+ && _yaml[_title][_subtitle].type.string
+ && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_str)
+ ) {
+ _return = (!(_munge))
+ ? _yaml[_title][_subtitle].get!string
+ : check_input_markup(_yaml[_title][_subtitle].get!string);
+ }
+ }
+ return _return;
+ }
+ @system int _get_yaml_node_int(Y)(
+ Y _yaml,
+ int _return,
+ string _title,
+ string _subtitle
+ ) {
+ if ((_title in _yaml && _yaml[_title].type.sequence)
+ && (_yaml[_title].type.mapping
+ && _yaml[_title].tag.match(rgx_y.yaml_tag_is_map))
+ ) {
+ if (_subtitle in _yaml[_title]
+ && _yaml[_title][_subtitle].type.string
+ && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_int)
+ ) {
+ _return = _yaml[_title][_subtitle].get!int;
+ } else if (_subtitle in _yaml[_title]
+ && _yaml[_title][_subtitle].type.string
+ && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_str)
+ ) {
+ _return = _yaml[_title][_subtitle].get!int;
+ }
+ }
+ return _return;
+ }
confCompositeMakeBuild _mk;
if (_identifier != "header") { // called only once per run anyway
+ string _init_string;
/+ conf ------------------------------------------------------------------- +/
/+
_cfg. build defaults (else program runtime defaults)
@@ -101,145 +148,52 @@ template contentYAMLtoSpineStruct() {
+/
{
if (_opt_action.webserver_http.length > 0) {
- _struct_composite.conf.w_srv_http
- = _opt_action.webserver_http;
+ _struct_composite.conf.w_srv_http = _opt_action.webserver_http;
} else {
- _struct_composite.conf.w_srv_http
- = (_cfg.http_request_type.empty)
- ? "http"
- : _cfg.http_request_type;
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("http" in _yaml["webserv"]
- && _yaml["webserv"]["http"].type.string
- && _yaml["webserv"]["http"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_http
- = _yaml["webserv"]["http"].get!string;
- }
- }
+ _init_string = (_cfg.http_request_type.empty) ? "http" : _cfg.http_request_type;
+ _struct_composite.conf.w_srv_http = _get_yaml_node_string(_yaml, _init_string, "webserv", "http");
}
if (_opt_action.cgi_search_title.length > 0) {
- _struct_composite.conf.w_srv_cgi_search_form_title
- = _opt_action.cgi_search_title;
+ _struct_composite.conf.w_srv_cgi_search_form_title = _opt_action.cgi_search_title;
} else {
- _struct_composite.conf.w_srv_cgi_search_form_title
- = (_cfg.cgi_search_form_title.empty)
- ? "≅ SiSU spine search form"
- : _cfg.cgi_search_form_title;
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("cgi_search_form_title" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_search_form_title"].type.string
- && _yaml["webserv"]["cgi_search_form_title"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_search_form_title
- = _yaml["webserv"]["cgi_search_form_title"].get!string;
- }
- }
+ _init_string = (_cfg.cgi_search_form_title.empty) ? "≅ SiSU spine search form" : _cfg.cgi_search_form_title;
+ _struct_composite.conf.w_srv_cgi_search_form_title = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_search_form_title");
}
if (_opt_action.cgi_sqlite_search_filename.length > 0) {
- _struct_composite.conf.w_srv_cgi_search_script
- = _opt_action.cgi_sqlite_search_filename;
+ _struct_composite.conf.w_srv_cgi_search_script = _opt_action.cgi_sqlite_search_filename;
} else {
- _struct_composite.conf.w_srv_cgi_search_script
- = (_cfg.cgi_filename.empty)
- ? "spine_search"
- : _cfg.cgi_filename;
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("cgi_search_script" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_search_script"].type.string
- && _yaml["webserv"]["cgi_search_script"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_search_script
- = _yaml["webserv"]["cgi_search_script"].get!string;
- }
- }
+ _init_string = (_cfg.cgi_filename.empty) ? "spine_search" : _cfg.cgi_filename;
+ _struct_composite.conf.w_srv_cgi_search_script = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_search_script");
}
if (_opt_action.sqliteDB_filename.length > 0) {
- _struct_composite.conf.w_srv_db_sqlite_filename
- = _opt_action.sqliteDB_filename;
+ _struct_composite.conf.w_srv_db_sqlite_filename = _opt_action.sqliteDB_filename;
} else {
- _struct_composite.conf.w_srv_db_sqlite_filename
- = (_cfg.db_sqlite_filename.empty)
- ? "spine.search.db"
- : _cfg.db_sqlite_filename;
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("db_sqlite_filename" in _yaml["webserv"]
- && _yaml["webserv"]["db_sqlite_filename"].type.string
- && _yaml["webserv"]["db_sqlite_filename"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_db_sqlite_filename
- = _yaml["webserv"]["db_sqlite_filename"].get!string;
- }
- }
+ _init_string = (_cfg.db_sqlite_filename.empty) ? "spine.search.db" : _cfg.db_sqlite_filename;
+ _struct_composite.conf.w_srv_db_sqlite_filename = _get_yaml_node_string(_yaml, _init_string, "webserv", "db_sqlite_filename");
}
if (_opt_action.sqliteDB_path.length > 0) {
- _struct_composite.conf.w_srv_db_sqlite_path
- = _opt_action.sqliteDB_path;
+ _struct_composite.conf.w_srv_db_sqlite_path = _opt_action.sqliteDB_path;
} else {
- _struct_composite.conf.w_srv_db_sqlite_path
- = (_cfg.db_sqlite_path.empty)
- ? "/var/www/sqlite"
- : _cfg.db_sqlite_path;
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("db_sqlite_path" in _yaml["webserv"]
- && _yaml["webserv"]["db_sqlite_path"].type.string
- && _yaml["webserv"]["db_sqlite_path"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_db_sqlite_path
- = _yaml["webserv"]["db_sqlite_path"].get!string;
- }
- }
+ _init_string = (_cfg.db_sqlite_path.empty) ? "/var/www/sqlite" : _cfg.db_sqlite_path;
+ _struct_composite.conf.w_srv_db_sqlite_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "db_sqlite_path");
}
if (_opt_action.cgi_url_action.length > 0) {
_struct_composite.conf.w_srv_cgi_action
= _opt_action.cgi_url_action;
} else {
- _struct_composite.conf.w_srv_cgi_action
- = (_cfg.www_url_doc_root.empty)
- ? "http://locahost" // "https://sisudoc.org"
- : _cfg.www_url_doc_root;
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("cgi_action" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_action"].type.string
- && _yaml["webserv"]["cgi_action"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_action
- = _yaml["webserv"]["cgi_action"].get!string;
- } else if (_opt_action.cgi_sqlite_search_filename.length > 0) {
- _struct_composite.conf.w_srv_cgi_action
- = _struct_composite.conf.w_srv_cgi_bin_url ~ "/" ~ _opt_action.cgi_sqlite_search_filename;
- }
+ _init_string = (_cfg.www_url_doc_root.empty) ? "http://locahost" : _cfg.www_url_doc_root; // "https://sisudoc.org"
+ _struct_composite.conf.w_srv_cgi_action = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_action");
+ if (_opt_action.cgi_sqlite_search_filename.length > 0) {
+ _struct_composite.conf.w_srv_cgi_action = _struct_composite.conf.w_srv_cgi_bin_url ~ "/" ~ _opt_action.cgi_sqlite_search_filename; // not yet right
}
}
if (!(_struct_composite.conf.output_path)) {
_struct_composite.conf.output_path = ((_manifested.output.path).asNormalizedPath).array;
} {
if (_opt_action.output_dir_set.length > 0) {
- _struct_composite.conf.output_path
- = (_opt_action.output_dir_set.asNormalizedPath).array;
+ _struct_composite.conf.output_path = (_opt_action.output_dir_set.asNormalizedPath).array;
} else {
- _struct_composite.conf.output_path
- = (_cfg.processing_path_doc_root.empty)
- ? "/srv/www/spine"
- : _cfg.processing_path_doc_root;
+ _struct_composite.conf.output_path = (_cfg.processing_path_doc_root.empty) ? "/srv/www/spine" : _cfg.processing_path_doc_root;
if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
&& (_yaml["webserv"].type.mapping
&& _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
@@ -261,75 +215,23 @@ template contentYAMLtoSpineStruct() {
}
}
if (_opt_action.webserver_host_doc_root.length > 0) { // same as output_path immediately above, resolve FIX REMOVE
- _struct_composite.conf.w_srv_data_root_path
- = _opt_action.webserver_host_doc_root;
+ _struct_composite.conf.w_srv_data_root_path = _opt_action.webserver_host_doc_root;
} else {
- _struct_composite.conf.w_srv_data_root_path
- = (_cfg.processing_path_doc_root.empty)
- ? "/var/www/spine"
- : _cfg.processing_path_doc_root;
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("data_root_path" in _yaml["webserv"]
- && _yaml["webserv"]["data_root_path"].type.string
- && _yaml["webserv"]["data_root_path"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_data_root_path
- = _yaml["webserv"]["data_root_path"].get!string;
- }
- }
+ _init_string = (_cfg.processing_path_doc_root.empty) ? "/var/www/spine" : _cfg.processing_path_doc_root;
+ _struct_composite.conf.w_srv_data_root_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_root_path");
}
}
if (_opt_action.cgi_bin_root.length > 0) {
- _struct_composite.conf.w_srv_cgi_bin_path
- = _opt_action.cgi_bin_root;
+ _struct_composite.conf.w_srv_cgi_bin_path = _opt_action.cgi_bin_root;
} else {
- _struct_composite.conf.w_srv_cgi_bin_path
- = (_cfg.cgi_bin_root.empty)
- ? "/var/www/cgi/cgi-bin"
- : _cfg.cgi_bin_root;
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("cgi_bin_path" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_bin_path"].type.string
- && _yaml["webserv"]["cgi_bin_path"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_bin_path
- = _yaml["webserv"]["cgi_bin_path"].get!string;
- }
- }
- }
- { _struct_composite.conf.w_srv_data_root_part
- = "";
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("data_root_part" in _yaml["webserv"]
- && _yaml["webserv"]["data_root_part"].type.string
- && _yaml["webserv"]["data_root_part"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_data_root_part = _yaml["webserv"]["data_root_part"].get!string;
- }
- }
- }
- { _struct_composite.conf.w_srv_images_root_part
- = "image";
- if (("webserv" in _yaml && _yaml["webserv"].type.sequence)
- && (_yaml["webserv"].type.mapping
- && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
- ) {
- if ("images_root_part" in _yaml["webserv"]
- && _yaml["webserv"]["images_root_part"].type.string
- && _yaml["webserv"]["images_root_part"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_images_root_part = _yaml["webserv"]["images_root_part"].get!string;
- }
- }
+ _init_string = (_cfg.cgi_bin_root.empty) ? "/var/www/cgi/cgi-bin" : _cfg.cgi_bin_root;
+ _struct_composite.conf.w_srv_cgi_bin_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_bin_path");
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_root_part");
+ if (!(_init_string.empty)) { _struct_composite.conf.w_srv_data_root_part = _init_string; }
+ } {
+ _init_string = "image"; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "images_root_part");
+ if (!(_init_string.empty)) { _struct_composite.conf.w_srv_images_root_part = _init_string; }
}
}
if (("webserv" in _yaml
@@ -337,106 +239,68 @@ template contentYAMLtoSpineStruct() {
&& (_yaml["webserv"].type.mapping
&& _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map))
) { // cannot be used as is with opt_action FIX look at remaining, decide what to do later
- if ("data_http" in _yaml["webserv"]
- && _yaml["webserv"]["data_http"].type.string
- && _yaml["webserv"]["data_http"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_data_http = _yaml["webserv"]["data_http"].get!string;
- }
- // if (_opt_action.*.length > 0) {
- if ("cgi_http" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_http"].type.string
- && _yaml["webserv"]["cgi_http"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_http = _yaml["webserv"]["cgi_http"].get!string;
- }
- // if (_opt_action.*.length > 0) {
- if ("host" in _yaml["webserv"]
- && _yaml["webserv"]["host"].type.string
- && _yaml["webserv"]["host"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_host = _yaml["webserv"]["host"].get!string;
- }
- if ("data_root_url" in _yaml["webserv"]
- && _yaml["webserv"]["data_root_url"].type.string
- && _yaml["webserv"]["data_root_url"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string;
- _struct_composite.conf.w_srv_data_root_url_html =
- _yaml["webserv"]["data_root_url"].get!string
- ~ _struct_composite.conf.w_srv_data_root_part ~ "/"
- ~ _manifested.src.language ~ "/"
- ~ "html";
- } else {
- _struct_composite.conf.w_srv_data_root_url = _struct_composite.conf.w_srv_data_root_part;
- _struct_composite.conf.w_srv_data_root_url_html =
- _struct_composite.conf.w_srv_data_root_part ~ "/"
- ~ _manifested.src.language ~ "/"
- ~ "html";
- }
- if ("cgi_host" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_host"].type.string
- && _yaml["webserv"]["cgi_host"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_host = _yaml["webserv"]["cgi_host"].get!string;
- } else { // composite construct
- _struct_composite.conf.w_srv_cgi_host = _struct_composite.conf.w_srv_host;
- }
- if ("cgi_bin_subpath" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_bin_subpath"].type.string
- && _yaml["webserv"]["cgi_bin_subpath"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_bin_subpath = _yaml["webserv"]["cgi_bin_subpath"].get!string;
- }
- if ("cgi_port" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_port"].type.string
- && _yaml["webserv"]["cgi_port"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_port = _yaml["webserv"]["cgi_port"].get!string;
- }
- if ("cgi_user" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_user"].type.string
- && _yaml["webserv"]["cgi_user"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_user = _yaml["webserv"]["cgi_user"].get!string;
- }
- if ("cgi_bin_url" in _yaml["webserv"]
- && _yaml["webserv"]["cgi_bin_url"].type.string
- && _yaml["webserv"]["cgi_bin_url"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.w_srv_cgi_bin_url = _yaml["webserv"]["cgi_bin_url"].get!string;
- } else {
- _struct_composite.conf.w_srv_cgi_bin_url =
- (_struct_composite.conf.w_srv_cgi_http.empty)
- ? _struct_composite.conf.w_srv_http
- :_struct_composite.conf.w_srv_cgi_http
- ~ "://"
- ~ (_struct_composite.conf.w_srv_cgi_host.empty)
- ? _struct_composite.conf.w_srv_cgi_host
- : _struct_composite.conf.w_srv_host
- ~ _struct_composite.conf.w_srv_cgi_bin_subpath;
- }
- // if ("cgi_file_links" in _yaml["webserv"]
- // && _yaml["webserv"]["cgi_file_links"].type.string
- // && _yaml["webserv"]["cgi_file_links"].tag.match(rgx_y.yaml_tag_is_str)
- // ) {
- // _struct_composite.conf.w_srv_cgi_file_links = _yaml["webserv"]["cgi_file_links"].get!string;
- // }
- }
- // make (in: conf, make, meta)?
- if ("processing" in _yaml
- && _yaml["processing"].type.sequence
- ) {
- if (_yaml["processing"].type.mapping
- && _yaml["processing"].tag.match(rgx_y.yaml_tag_is_map)
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_http");
+ if (!(_init_string.empty)) { _struct_composite.conf.w_srv_data_http = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_http");
+ if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_http = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "host");
+ if (!(_init_string.empty)) { _struct_composite.conf.w_srv_host = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_bin_subpath");
+ if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_bin_subpath = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_port");
+ if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_port = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_user");
+ if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_user = _init_string; }
+ }
+ if ("data_root_url" in _yaml["webserv"]
+ && _yaml["webserv"]["data_root_url"].type.string
+ && _yaml["webserv"]["data_root_url"].tag.match(rgx_y.yaml_tag_is_str)
) {
- if ("concord_max" in _yaml["processing"]
- && _yaml["processing"]["concord_max"].type.string
- && _yaml["processing"]["concord_max"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.processing_concord_max = _yaml["processing"]["concord_max"].get!string;
- }
+ _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string;
+ _struct_composite.conf.w_srv_data_root_url_html =
+ _yaml["webserv"]["data_root_url"].get!string
+ ~ _struct_composite.conf.w_srv_data_root_part ~ "/"
+ ~ _manifested.src.language ~ "/"
+ ~ "html";
+ } else {
+ _struct_composite.conf.w_srv_data_root_url = _struct_composite.conf.w_srv_data_root_part;
+ _struct_composite.conf.w_srv_data_root_url_html =
+ _struct_composite.conf.w_srv_data_root_part ~ "/"
+ ~ _manifested.src.language ~ "/"
+ ~ "html";
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_host");
+ _struct_composite.conf.w_srv_cgi_host = (!(_init_string.empty)) ? _init_string : _struct_composite.conf.w_srv_host;
}
+ if ("cgi_bin_url" in _yaml["webserv"]
+ && _yaml["webserv"]["cgi_bin_url"].type.string
+ && _yaml["webserv"]["cgi_bin_url"].tag.match(rgx_y.yaml_tag_is_str)
+ ) {
+ _struct_composite.conf.w_srv_cgi_bin_url = _yaml["webserv"]["cgi_bin_url"].get!string;
+ } else {
+ _struct_composite.conf.w_srv_cgi_bin_url =
+ (_struct_composite.conf.w_srv_cgi_http.empty) ? _struct_composite.conf.w_srv_http :_struct_composite.conf.w_srv_cgi_http
+ ~ "://"
+ ~ (_struct_composite.conf.w_srv_cgi_host.empty) ? _struct_composite.conf.w_srv_cgi_host : _struct_composite.conf.w_srv_host
+ ~ _struct_composite.conf.w_srv_cgi_bin_subpath;
+ }
+ // if ("cgi_file_links" in _yaml["webserv"]
+ // && _yaml["webserv"]["cgi_file_links"].type.string
+ // && _yaml["webserv"]["cgi_file_links"].tag.match(rgx_y.yaml_tag_is_str)
+ // ) {
+ // _struct_composite.conf.w_srv_cgi_file_links = _yaml["webserv"]["cgi_file_links"].get!string;
+ // }
+ }
+ // make (in: conf, make, meta)?
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "processing", "concord_max");
+ if (!(_init_string.empty)) { _struct_composite.conf.processing_concord_max = _init_string; }
}
if ("flag" in _yaml
&& _yaml["flag"].type.sequence
@@ -444,65 +308,36 @@ template contentYAMLtoSpineStruct() {
if (_yaml["flag"].type.mapping
&& _yaml["flag"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("act0" in _yaml["flag"]
- && _yaml["flag"]["act0"].type.string
- && _yaml["flag"]["act0"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act0 = _yaml["flag"]["act0"].get!string;
- }
- if ("act1" in _yaml["flag"]
- && _yaml["flag"]["act1"].type.string
- && _yaml["flag"]["act1"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act1 = _yaml["flag"]["act1"].get!string;
- }
- if ("act2" in _yaml["flag"]
- && _yaml["flag"]["act2"].type.string
- && _yaml["flag"]["act2"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act2 = _yaml["flag"]["act2"].get!string;
- }
- if ("act3" in _yaml["flag"]
- && _yaml["flag"]["act3"].type.string
- && _yaml["flag"]["act3"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act3 = _yaml["flag"]["act3"].get!string;
- }
- if ("act4" in _yaml["flag"]
- && _yaml["flag"]["act4"].type.string
- && _yaml["flag"]["act4"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act4 = _yaml["flag"]["act4"].get!string;
- }
- if ("act5" in _yaml["flag"]
- && _yaml["flag"]["act5"].type.string
- && _yaml["flag"]["act5"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act5 = _yaml["flag"]["act5"].get!string;
- }
- if ("act6" in _yaml["flag"]
- && _yaml["flag"]["act6"].type.string
- && _yaml["flag"]["act6"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act6 = _yaml["flag"]["act6"].get!string;
- }
- if ("act7" in _yaml["flag"]
- && _yaml["flag"]["act7"].type.string
- && _yaml["flag"]["act7"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act7 = _yaml["flag"]["act7"].get!string;
- }
- if ("act8" in _yaml["flag"]
- && _yaml["flag"]["act8"].type.string
- && _yaml["flag"]["act8"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act8 = _yaml["flag"]["act8"].get!string;
- }
- if ("act9" in _yaml["flag"]
- && _yaml["flag"]["act9"].type.string
- && _yaml["flag"]["act9"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.flag_act9 = _yaml["flag"]["act9"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act0");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act0 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act1");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act1 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act2");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act2 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act3");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act3 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act4");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act4 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act5");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act5 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act6");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act6 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act7");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act7 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act8");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act8 = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act9");
+ if (!(_init_string.empty)) { _struct_composite.conf.flag_act9 = _init_string; }
}
}
}
@@ -568,20 +403,11 @@ template contentYAMLtoSpineStruct() {
}
string _set_papersize;
if (_opt_action.latex_papersize.length > 0) {
- _set_papersize
- = _opt_action.latex_papersize;
+ _set_papersize = _opt_action.latex_papersize;
} else {
- _set_papersize
- = (_cfg.default_papersize.empty)
- ? "a4,letter.portrait"
- : _cfg.default_papersize;
- if ("papersize" in _yaml["default"]
- && _yaml["default"]["papersize"].type.string
- && _yaml["default"]["papersize"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _set_papersize
- = _yaml["default"]["papersize"].get!string;
- }
+ _set_papersize = (_cfg.default_papersize.empty) ? "a4,letter.portrait" : _cfg.default_papersize;
+ _init_string = _set_papersize; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "papersize");
+ if (!(_init_string.empty)) { _set_papersize = _init_string; }
}
_struct_composite.conf.set_papersize = selected_papersize(_set_papersize);
if (
@@ -590,29 +416,18 @@ template contentYAMLtoSpineStruct() {
&& _yaml["default"].type.mapping
&& _yaml["default"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("text_wrap" in _yaml["default"]
- && _yaml["default"]["text_wrap"].type.string
- && _yaml["default"]["text_wrap"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.set_text_wrap = _yaml["default"]["text_wrap"].get!string;
- }
- if ("emphasis" in _yaml["default"]
- && _yaml["default"]["emphasis"].type.string
- && _yaml["default"]["emphasis"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.set_emphasis = _yaml["default"]["emphasis"].get!string;
- }
- if ("language" in _yaml["default"]
- && _yaml["default"]["language"].type.string
- && _yaml["default"]["language"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.set_language = _yaml["default"]["language"].get!string;
- }
- if ("digest" in _yaml["default"]
- && _yaml["default"]["digest"].type.string
- && _yaml["default"]["digest"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.set_digest = _yaml["default"]["digest"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "text_wrap");
+ if (!(_init_string.empty)) { _struct_composite.conf.set_text_wrap = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "emphasis");
+ if (!(_init_string.empty)) { _struct_composite.conf.set_emphasis = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "language");
+ if (!(_init_string.empty)) { _struct_composite.conf.set_language = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "digest");
+ if (!(_init_string.empty)) { _struct_composite.conf.set_digest = _init_string; }
}
}
if ("search" in _yaml
@@ -621,33 +436,24 @@ template contentYAMLtoSpineStruct() {
if (_yaml["search"].type.mapping
&& _yaml["search"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("flag" in _yaml["search"]
- && _yaml["search"]["flag"].type.string
- && _yaml["search"]["flag"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.search_flag = _yaml["search"]["flag"].get!string;
- }
- if ("action" in _yaml["search"]
- && _yaml["search"]["action"].type.string
- && _yaml["search"]["action"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.search_action = _yaml["search"]["action"].get!string;
- }
- if ("db" in _yaml["search"]
- && _yaml["search"]["db"].type.string
- && _yaml["search"]["db"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.search_db = _yaml["search"]["db"].get!string;
- }
- if ("title" in _yaml["search"]
- && _yaml["search"]["title"].type.string
- && _yaml["search"]["title"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.conf.search_title = _yaml["search"]["title"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "flag");
+ if (!(_init_string.empty)) { _struct_composite.conf.search_flag = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "action");
+ if (!(_init_string.empty)) { _struct_composite.conf.search_action = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "db");
+ if (!(_init_string.empty)) { _struct_composite.conf.search_db = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "title");
+ if (!(_init_string.empty)) { _struct_composite.conf.search_title = _init_string; }
}
}
}
- } else {
+ } else { // !(_identifier != "header")
+ string _init_string;
+ int _init_int;
/+ make ------------------------------------------------------------------- +/
if ("make" in _yaml
&& _yaml["make"].type.sequence
@@ -655,41 +461,24 @@ template contentYAMLtoSpineStruct() {
if (_yaml["make"].type.mapping
&& _yaml["make"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("doc_type" in _yaml["make"]
- && _yaml["make"]["doc_type"].type.string
- && _yaml["make"]["doc_type"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.make_str.doc_type = _yaml["make"]["doc_type"].get!string;
- }
- if ("breaks" in _yaml["make"]
- && _yaml["make"]["breaks"].type.string
- && _yaml["make"]["breaks"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.make_str.breaks = _yaml["make"]["breaks"].get!string;
- }
- if ("bold" in _yaml["make"]
- && _yaml["make"]["bold"].type.string
- && _yaml["make"]["bold"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.make_str.bold = _yaml["make"]["bold"].get!string;
- }
- if ("cover_image" in _yaml["make"]
- && _yaml["make"]["cover_image"].type.string
- && _yaml["make"]["cover_image"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.make_str.cover_image = _yaml["make"]["cover_image"].get!string;
- }
- if ("css" in _yaml["make"]
- && _yaml["make"]["css"].type.string
- && _yaml["make"]["css"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.make_str.css = _yaml["make"]["css"].get!string;
- }
- if ("emphasis" in _yaml["make"]
- && _yaml["make"]["emphasis"].type.string
- && _yaml["make"]["emphasis"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.make_str.emphasis = _yaml["make"]["emphasis"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "doc_type");
+ if (!(_init_string.empty)) { _struct_composite.make_str.doc_type = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "breaks");
+ if (!(_init_string.empty)) { _struct_composite.make_str.breaks = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "bold");
+ if (!(_init_string.empty)) { _struct_composite.make_str.bold = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "cover_image");
+ if (!(_init_string.empty)) { _struct_composite.make_str.cover_image = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "css");
+ if (!(_init_string.empty)) { _struct_composite.make_str.css = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "emphasis");
+ if (!(_init_string.empty)) { _struct_composite.make_str.emphasis = _init_string; }
}
if ("footer" in _yaml["make"]
&& _yaml["make"]["footer"].type.string
@@ -781,16 +570,9 @@ template contentYAMLtoSpineStruct() {
break;
}
}
- if ("auto_num_depth" in _yaml["make"]
- && _yaml["make"]["auto_num_depth"].type.string
- && _yaml["make"]["auto_num_depth"].tag.match(rgx_y.yaml_tag_is_int)
- ) { // not sure implemented for documents
- _struct_composite.make_str.auto_num_depth = _yaml["make"]["auto_num_depth"].get!int;
- } else if ("auto_num_depth" in _yaml["make"]
- && _yaml["make"]["auto_num_depth"].type.string
- && _yaml["make"]["auto_num_depth"].tag.match(rgx_y.yaml_tag_is_str)
- ) { // not sure implemented for documents
- _struct_composite.make_str.auto_num_depth = _yaml["make"]["auto_num_depth"].get!int;
+ {
+ _init_int = _get_yaml_node_int(_yaml, 99, "make", "auto_num_depth");
+ if (!(_init_int == 99)) { _struct_composite.make_str.auto_num_depth = _init_int; }
}
if ("texpdf_font" in _yaml["make"]
&& _yaml["make"]["texpdf_font"].type.string
@@ -823,29 +605,18 @@ template contentYAMLtoSpineStruct() {
if (_yaml["creator"].type.mapping
&& _yaml["creator"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("author" in _yaml["creator"]
- && _yaml["creator"]["author"].type.string
- && _yaml["creator"]["author"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.creator_author = _yaml["creator"]["author"].get!string;
- }
- if ("email" in _yaml["creator"]
- && _yaml["creator"]["email"].type.string
- && _yaml["creator"]["email"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.creator_author_email = _yaml["creator"]["email"].get!string;
- }
- if ("illustrator" in _yaml["creator"]
- && _yaml["creator"]["illustrator"].type.string
- && _yaml["creator"]["illustrator"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.creator_illustrator = _yaml["creator"]["illustrator"].get!string;
- }
- if ("translator" in _yaml["creator"]
- && _yaml["creator"]["translator"].type.string
- && _yaml["creator"]["translator"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.creator_translator = _yaml["creator"]["translator"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "author");
+ if (!(_init_string.empty)) { _struct_composite.meta.creator_author = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "email");
+ if (!(_init_string.empty)) { _struct_composite.meta.creator_author_email = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "illustrator");
+ if (!(_init_string.empty)) { _struct_composite.meta.creator_illustrator = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "translator");
+ if (!(_init_string.empty)) { _struct_composite.meta.creator_translator = _init_string; }
}
} else if (_yaml["creator"].type.string
&& _yaml["creator"].tag.match(rgx_y.yaml_tag_is_str)
@@ -901,43 +672,27 @@ template contentYAMLtoSpineStruct() {
) {
_struct_composite.meta.title_main = _yaml["title"]["title"].get!string;
}
- if ("edition" in _yaml["title"]
- && _yaml["title"]["edition"].type.string
- && _yaml["title"]["edition"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.title_edition = _yaml["title"]["edition"].get!string;
- }
- if ("full" in _yaml["title"]
- && _yaml["title"]["full"].type.string
- && _yaml["title"]["full"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.title_full = _yaml["title"]["full"].get!string;
- }
- if ("language" in _yaml["title"]
- && _yaml["title"]["language"].type.string
- && _yaml["title"]["language"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.title_language = _yaml["title"]["language"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "edition");
+ if (!(_init_string.empty)) { _struct_composite.meta.title_edition = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "full");
+ if (!(_init_string.empty)) { _struct_composite.meta.title_full = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "language");
+ if (!(_init_string.empty)) { _struct_composite.meta.title_language = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "note");
+ if (!(_init_string.empty)) { _struct_composite.meta.title_note = _init_string; }
}
- if ("note" in _yaml["title"]
- && _yaml["title"]["note"].type.string
- && _yaml["title"]["note"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.title_note = _yaml["title"]["note"].get!string;
+ if ("subtitle" in _yaml["title"]) {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "subtitle");
+ if (!(_init_string.empty)) { _struct_composite.meta.title_subtitle = _init_string; }
+ } else if ("sub" in _yaml["title"]) {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "sub");
+ if (!(_init_string.empty)) { _struct_composite.meta.title_subtitle = _init_string; }
}
- if ("subtitle" in _yaml["title"]
- && _yaml["title"]["subtitle"].type.string
- && _yaml["title"]["subtitle"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.title_subtitle = _yaml["title"]["subtitle"].get!string;
- } else if ("sub" in _yaml["title"]
- && _yaml["title"]["sub"].type.string
- && _yaml["title"]["sub"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.title_subtitle = _yaml["title"]["sub"].get!string;
- }
- } else if (
- _yaml["title"].type.string
+ } else if (_yaml["title"].type.string
&& _yaml["title"].tag.match(rgx_y.yaml_tag_is_str)
) {
_struct_composite.meta.title_main = _yaml["title"].get!string;
@@ -962,23 +717,15 @@ template contentYAMLtoSpineStruct() {
if (_yaml["classify"].type.mapping
&& _yaml["classify"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("dewey" in _yaml["classify"]
- && _yaml["classify"]["dewey"].type.string
- && _yaml["classify"]["dewey"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.classify_dewey = _yaml["classify"]["dewey"].get!string;
- }
- if ("loc" in _yaml["classify"]
- && _yaml["classify"]["loc"].type.string
- && _yaml["classify"]["loc"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.classify_loc = _yaml["classify"]["loc"].get!string;
- }
- if ("keywords" in _yaml["classify"]
- && _yaml["classify"]["keywords"].type.string
- && _yaml["classify"]["keywords"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.classify_keywords = _yaml["classify"]["keywords"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "dewey");
+ if (!(_init_string.empty)) { _struct_composite.meta.classify_dewey = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "loc");
+ if (!(_init_string.empty)) { _struct_composite.meta.classify_loc = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "keywords");
+ if (!(_init_string.empty)) { _struct_composite.meta.classify_keywords = _init_string; }
}
if ("topic_register" in _yaml["classify"]
&& _yaml["classify"]["topic_register"].type.string
@@ -1032,47 +779,27 @@ template contentYAMLtoSpineStruct() {
if (_yaml["date"].type.mapping
&& _yaml["date"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("added_to_site" in _yaml["date"]
- && _yaml["date"]["added_to_site"].type.string
- && _yaml["date"]["added_to_site"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.date_added_to_site = _yaml["date"]["added_to_site"].get!string;
- }
- if ("available" in _yaml["date"]
- && _yaml["date"]["available"].type.string
- && _yaml["date"]["available"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.date_available = _yaml["date"]["available"].get!string;
- }
- if ("created" in _yaml["date"]
- && _yaml["date"]["created"].type.string
- && _yaml["date"]["created"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.date_created = _yaml["date"]["created"].get!string;
- }
- if ("issued" in _yaml["date"]
- && _yaml["date"]["issued"].type.string
- && _yaml["date"]["issued"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.date_issued = _yaml["date"]["issued"].get!string;
- }
- if ("modified" in _yaml["date"]
- && _yaml["date"]["modified"].type.string
- && _yaml["date"]["modified"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.date_modified = _yaml["date"]["modified"].get!string;
- }
- if ("published" in _yaml["date"]
- && _yaml["date"]["published"].type.string
- && _yaml["date"]["published"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.date_published = _yaml["date"]["published"].get!string;
- }
- if ("valid" in _yaml["date"]
- && _yaml["date"]["valid"].type.string
- && _yaml["date"]["valid"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.date_valid = _yaml["date"]["valid"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "added_to_site");
+ if (!(_init_string.empty)) { _struct_composite.meta.date_added_to_site = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "available");
+ if (!(_init_string.empty)) { _struct_composite.meta.date_available = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "created");
+ if (!(_init_string.empty)) { _struct_composite.meta.date_created = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "issued");
+ if (!(_init_string.empty)) { _struct_composite.meta.date_issued = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "modified");
+ if (!(_init_string.empty)) { _struct_composite.meta.date_modified = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "published");
+ if (!(_init_string.empty)) { _struct_composite.meta.date_published = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "valid");
+ if (!(_init_string.empty)) { _struct_composite.meta.date_valid = _init_string; }
}
}
}
@@ -1088,23 +815,15 @@ template contentYAMLtoSpineStruct() {
if (_yaml["notes"].type.mapping
&& _yaml["notes"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("abstract" in _yaml["notes"]
- && _yaml["notes"]["abstract"].type.string
- && _yaml["notes"]["abstract"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.notes_abstract = _yaml["notes"]["abstract"].get!string;
- }
- if ("description" in _yaml["notes"]
- && _yaml["notes"]["description"].type.string
- && _yaml["notes"]["description"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.notes_description = _yaml["notes"]["description"].get!string;
- }
- if ("summary" in _yaml["notes"]
- && _yaml["notes"]["summary"].type.string
- && _yaml["notes"]["summary"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.notes_summary = _yaml["notes"]["summary"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "abstract");
+ if (!(_init_string.empty)) { _struct_composite.meta.notes_abstract = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "description");
+ if (!(_init_string.empty)) { _struct_composite.meta.notes_description = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "summary");
+ if (!(_init_string.empty)) { _struct_composite.meta.notes_summary = _init_string; }
}
}
}
@@ -1114,29 +833,18 @@ template contentYAMLtoSpineStruct() {
if (_yaml["original"].type.mapping
&& _yaml["original"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("language" in _yaml["original"]
- && _yaml["original"]["language"].type.string
- && _yaml["original"]["language"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.original_language = _yaml["original"]["language"].get!string;
- }
- if ("language_char" in _yaml["original"]
- && _yaml["original"]["language_char"].type.string
- && _yaml["original"]["language_char"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.original_language_char = _yaml["original"]["language_char"].get!string;
- }
- if ("source" in _yaml["original"]
- && _yaml["original"]["source"].type.string
- && _yaml["original"]["source"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.original_source = _yaml["original"]["source"].get!string;
- }
- if ("title" in _yaml["original"]
- && _yaml["original"]["title"].type.string
- && _yaml["original"]["title"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.original_title = _yaml["original"]["title"].get!string;
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "language");
+ if (!(_init_string.empty)) { _struct_composite.meta.original_language = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "language_char");
+ if (!(_init_string.empty)) { _struct_composite.meta.original_language_char = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "source");
+ if (!(_init_string.empty)) { _struct_composite.meta.original_source = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "title");
+ if (!(_init_string.empty)) { _struct_composite.meta.original_title = _init_string; }
}
}
}
@@ -1151,59 +859,34 @@ template contentYAMLtoSpineStruct() {
if (_yaml["rights"].type.mapping
&& _yaml["rights"].tag.match(rgx_y.yaml_tag_is_map)
) {
- if ("copyright" in _yaml["rights"]
- && _yaml["rights"]["copyright"].type.string
- && _yaml["rights"]["copyright"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_copyright = check_input_markup(_yaml["rights"]["copyright"].get!string);
- }
- if ("copyright_text" in _yaml["rights"]
- && _yaml["rights"]["copyright_text"].type.string
- && _yaml["rights"]["copyright_text"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_copyright_text = _yaml["rights"]["copyright_text"].get!string;
- }
- if ("copyright_audio" in _yaml["rights"]
- && _yaml["rights"]["copyright_audio"].type.string
- && _yaml["rights"]["copyright_audio"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_copyright_audio = _yaml["rights"]["copyright_audio"].get!string;
- }
- if ("copyright_cover" in _yaml["rights"]
- && _yaml["rights"]["copyright_cover"].type.string
- && _yaml["rights"]["copyright_cover"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_copyright_cover = _yaml["rights"]["copyright_cover"].get!string;
- }
- if ("copyright_illustrations" in _yaml["rights"]
- && _yaml["rights"]["copyright_illustrations"].type.string
- && _yaml["rights"]["copyright_illustrations"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_copyright_illustrations = _yaml["rights"]["copyright_illustrations"].get!string;
- }
- if ("copyright_photographs" in _yaml["rights"]
- && _yaml["rights"]["copyright_photographs"].type.string
- && _yaml["rights"]["copyright_photographs"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_copyright_photographs = _yaml["rights"]["copyright_photographs"].get!string;
- }
- if ("copyright_translation" in _yaml["rights"]
- && _yaml["rights"]["copyright_translation"].type.string
- && _yaml["rights"]["copyright_translation"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_copyright_translation = _yaml["rights"]["copyright_translation"].get!string;
- }
- if ("copyright_video" in _yaml["rights"]
- && _yaml["rights"]["copyright_video"].type.string
- && _yaml["rights"]["copyright_video"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_copyright_video = _yaml["rights"]["copyright_video"].get!string;
- }
- if ("license" in _yaml["rights"]
- && _yaml["rights"]["license"].type.string
- && _yaml["rights"]["license"].tag.match(rgx_y.yaml_tag_is_str)
- ) {
- _struct_composite.meta.rights_license = check_input_markup(_yaml["rights"]["license"].get!string);
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright", true);
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_text");
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_text = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_audio");
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_audio = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_cover");
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_cover = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_illustrations");
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_illustrations = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_photographs");
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_photographs = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_translation");
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_translation = _init_string; }
+ } {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_video");
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_video = _init_string; }
+ }
+ {
+ _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "license", true);
+ if (!(_init_string.empty)) { _struct_composite.meta.rights_license = _init_string; }
}
}
}
@@ -1217,12 +900,12 @@ template configParseYAMLreturnSpineStruct() {
sisudoc.meta.conf_make_meta_structs,
sisudoc.meta.conf_make_meta_json;
mixin contentYAMLtoSpineStruct;
- @system auto configParseYAMLreturnSpineStruct(T,CCm,M,O,Cfg)(
- T _document_struct,
- CCm _make_and_meta_struct,
- M _manifested,
- O _opt_action,
- Cfg _cfg
+ @system ConfComposite configParseYAMLreturnSpineStruct(T,M,O,Cfg)(
+ T _document_struct,
+ ConfComposite _make_and_meta_struct,
+ M _manifested,
+ O _opt_action,
+ Cfg _cfg
){
Node _yaml;
if (_document_struct.content.length > 0) {
@@ -1249,7 +932,7 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() {
std.exception,
std.regex,
std.stdio,
- std.traits,
+ // std.traits,
std.typecons,
std.utf,
std.conv : to;
@@ -1265,12 +948,12 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() {
static auto rgx = RgxI();
mixin spineRgxYamlTags;
static auto rgx_y = RgxYaml();
- @system auto docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct(CCm,Src,M,O,Cfg)(
- Src header_src,
- CCm _make_and_meta_struct,
- M _manifested,
- O _opt_action,
- Cfg _cfg,
+ @system ConfComposite docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct(Src,M,O,Cfg)(
+ Src header_src,
+ ConfComposite _make_and_meta_struct,
+ M _manifested,
+ O _opt_action,
+ Cfg _cfg,
) {
Node _yaml;
try {
diff --git a/src/sisudoc/meta/defaults.d b/src/sisudoc/meta/defaults.d
index fe0cd1a..97b1d5f 100644
--- a/src/sisudoc/meta/defaults.d
+++ b/src/sisudoc/meta/defaults.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/doc_debugs.d b/src/sisudoc/meta/doc_debugs.d
index ae50256..35fd3de 100644
--- a/src/sisudoc/meta/doc_debugs.d
+++ b/src/sisudoc/meta/doc_debugs.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/metadoc.d b/src/sisudoc/meta/metadoc.d
index 25f28b6..5c3694e 100644
--- a/src/sisudoc/meta/metadoc.d
+++ b/src/sisudoc/meta/metadoc.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -68,13 +68,13 @@ template spineAbstraction() {
mixin outputHub;
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
){
{ /+ document config/make file +/
auto _config_document_struct = readConfigDoc!()(_manifest, _env);
@@ -144,7 +144,7 @@ template spineAbstraction() {
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, "]");
}
struct ST_DocumentMatters {
auto generator_program() {
@@ -190,7 +190,7 @@ template spineAbstraction() {
~ ":" ~ _st.second.to!string;
return _time;
}
- auto conf_make_meta() {
+ ConfComposite conf_make_meta() {
return _make_and_meta_struct;
}
auto doc_digest() {
@@ -294,7 +294,18 @@ template spineAbstraction() {
) {
writeln("- step4 complete for [", _manifest.src.filename, "]");
}
- 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;
}
}
diff --git a/src/sisudoc/meta/metadoc_curate.d b/src/sisudoc/meta/metadoc_curate.d
index 3b5654b..bb7452a 100644
--- a/src/sisudoc/meta/metadoc_curate.d
+++ b/src/sisudoc/meta/metadoc_curate.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/metadoc_curate_authors.d b/src/sisudoc/meta/metadoc_curate_authors.d
index cb2b1db..c86d3e1 100644
--- a/src/sisudoc/meta/metadoc_curate_authors.d
+++ b/src/sisudoc/meta/metadoc_curate_authors.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/metadoc_curate_topics.d b/src/sisudoc/meta/metadoc_curate_topics.d
index a30be73..fca3ff2 100644
--- a/src/sisudoc/meta/metadoc_curate_topics.d
+++ b/src/sisudoc/meta/metadoc_curate_topics.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/metadoc_from_src.d b/src/sisudoc/meta/metadoc_from_src.d
index 70fec62..4aa49dc 100644
--- a/src/sisudoc/meta/metadoc_from_src.d
+++ b/src/sisudoc/meta/metadoc_from_src.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -99,8 +99,8 @@ template docAbstraction() {
anchor_tag = "";
}
mixin spineNode;
- auto node_para_int_ = node_metadata_para_int;
- auto node_para_str_ = node_metadata_para_str;
+ int[string] node_para_int_ = node_metadata_para_int;
+ string[string] node_para_str_ = node_metadata_para_str;
ObjGenericComposite comp_obj_;
line_occur = [
"heading" : 0,
@@ -231,7 +231,7 @@ template docAbstraction() {
writeln("substitution to make: ", conf_make_meta.make.italics[Substitute.markup]);
}
}
- auto loopMarkupSrcByLine(
+ _loopMarkupSrcByLineStruct loopMarkupSrcByLine(
char[][] markup_sourcefile_content,
string[string] an_object,
uint[string] pith,
@@ -340,7 +340,7 @@ template docAbstraction() {
._doc_header_and_make_substitutions_(conf_make_meta)
._doc_header_and_make_substitutions_fontface_(conf_make_meta);
{
- auto _get = line.txt_by_line_block_quote(an_object, pith);
+ ST_txt_by_line_block_generic _get = line.txt_by_line_block_quote(an_object, pith);
{
an_object = _get.this_object;
pith = _get.pith;
@@ -353,7 +353,7 @@ template docAbstraction() {
._doc_header_and_make_substitutions_fontface_(conf_make_meta)
.replaceAll(rgx.para_delimiter, mkup.br_line_spaced ~ "$1");
{
- auto _get = line.txt_by_line_block_group(an_object, pith);
+ ST_txt_by_line_block_generic _get = line.txt_by_line_block_group(an_object, pith);
{
an_object = _get.this_object;
pith = _get.pith;
@@ -369,7 +369,7 @@ template docAbstraction() {
.replaceAll(rgx.spaces_keep, (m.captures[1]).translate([ ' ' : mkup.nbsp ]));
}
{
- auto _get = line.txt_by_line_block_block(an_object, pith);
+ ST_txt_by_line_block_generic _get = line.txt_by_line_block_block(an_object, pith);
{
an_object = _get.this_object;
pith = _get.pith;
@@ -378,7 +378,7 @@ template docAbstraction() {
continue;
} else if (pith["block_is"] == eN.blk_is.poem) {
{
- auto _get = line.txt_by_line_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg);
+ ST_txt_by_line_block_poem _get = line.txt_by_line_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg);
{
an_object = _get.this_object;
pith = _get.pith;
@@ -412,7 +412,7 @@ template docAbstraction() {
object_number_poem["start"] = obj_cite_digits.object_number.to!string;
}
{
- auto _get = line.txt_by_line_block_start(pith, dochas, object_number_poem);
+ ST_txt_by_line_block_start _get = line.txt_by_line_block_start(pith, dochas, object_number_poem);
{
pith = _get.pith;
dochas = _get.dochas;
@@ -442,7 +442,7 @@ template docAbstraction() {
|| line.matchFirst(rgx.book_index_item_open)
|| pith["section"] == eN.sect.book_index) {
{ // book_index
- auto _get = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action);
+ ST_flow_book_index _get = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action);
{
an_object = _get.this_object;
pith = _get.pith;
@@ -464,7 +464,7 @@ template docAbstraction() {
comp_obj_comment.text = an_object[an_object_key].strip;
the_document_body_section ~= comp_obj_comment;
{
- auto _get = txt_by_line_common_reset_(line_occur, an_object, pith);
+ ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith);
{
line_occur = _get.line_occur;
an_object = _get.this_object;
@@ -481,7 +481,7 @@ template docAbstraction() {
&& (pith["make_headings"] == eN.bi.off)) {
// heading found
{
- auto _get = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith);
+ ST_flow_heading_found _get = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith);
{
heading_match_str = _get.heading_match_str;
heading_match_rgx = _get.heading_match_rgx;
@@ -496,7 +496,7 @@ template docAbstraction() {
) {
// heading make set
{
- auto _get = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith);
+ ST_flow_heading_make_set _get = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith);
{
line = _get.line;
an_object = _get.this_object;
@@ -534,7 +534,7 @@ template docAbstraction() {
._doc_header_and_make_substitutions_(conf_make_meta)
._doc_header_and_make_substitutions_fontface_(conf_make_meta);
{
- auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
+ ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
{
an_object = _get.this_object;
an_object_key = _get.this_object_key;
@@ -563,7 +563,7 @@ template docAbstraction() {
} else if (pith["block_state"] == eN.blk_state.closing) {
// line empty, with blocks flag
{
- auto _get = line.flow_block_flag_line_empty_(
+ ST_flow_block_flag_line_empty _get = line.flow_block_flag_line_empty_(
an_object,
bookindex_extract_hash,
the_document_body_section,
@@ -679,7 +679,7 @@ template docAbstraction() {
_anchor_tag = obj_cite_digits.identifier;
// (incrementally build toc) table of contents here!
{
- auto _get = obj_im.flow_table_of_contents_gather_headings(
+ ST_flow_table_of_contents_gather_headings _get = obj_im.flow_table_of_contents_gather_headings(
an_object,
conf_make_meta,
tag_in_seg,
@@ -700,7 +700,7 @@ template docAbstraction() {
if (an_object["lev_markup_number"].to!int <= 4) {
segnames["epub"] ~= tag_in_seg["seg_lv1to4"];
}
- auto comp_obj_ = node_construct.node_emitter_heading(
+ ObjGenericComposite comp_obj_ = node_construct.node_emitter_heading(
an_object,
tag_in_seg,
lev_anchor_tag,
@@ -721,7 +721,7 @@ template docAbstraction() {
the_document_body_section ~= comp_obj_;
debug(objectrelated1) { writeln(line); } // check
{
- auto _get = txt_by_line_common_reset_(line_occur, an_object, pith);
+ ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith);
{
line_occur = _get.line_occur;
an_object = _get.this_object;
@@ -742,7 +742,7 @@ template docAbstraction() {
an_object["bookindex_nugget"] = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes = bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, tag_in_seg);
an_object["is"] = "para";
- auto comp_obj_ = node_construct.node_location_emitter(
+ ObjGenericComposite comp_obj_ = node_construct.node_location_emitter(
content_non_header,
tag_in_seg,
lev_anchor_tag,
@@ -774,7 +774,7 @@ template docAbstraction() {
the_document_body_section ~= comp_obj_;
tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
{
- auto _get = txt_by_line_common_reset_(line_occur, an_object, pith);
+ ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith);
{
line_occur = _get.line_occur;
an_object = _get.this_object;
@@ -848,7 +848,7 @@ template docAbstraction() {
return ret;
}
{ // loopMarkupSrcByLine
- auto _doc_by_line = loopMarkupSrcByLine(markup_sourcefile_content, an_object, pith);
+ _loopMarkupSrcByLineStruct _doc_by_line = loopMarkupSrcByLine(markup_sourcefile_content, an_object, pith);
the_document_toc_section = _doc_by_line.toc;
the_document_body_section = _doc_by_line.body;
the_document_glossary_section = _doc_by_line.glossary;
@@ -1496,7 +1496,7 @@ template docAbstraction() {
return tag_assoc;
}
}
- auto doc_has() {
+ DocHas_ doc_has() {
return DocHas_();
}
// the doc to be returned
diff --git a/src/sisudoc/meta/metadoc_from_src_functions.d b/src/sisudoc/meta/metadoc_from_src_functions.d
index 953e75a..3ae10d1 100644
--- a/src/sisudoc/meta/metadoc_from_src_functions.d
+++ b/src/sisudoc/meta/metadoc_from_src_functions.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -453,6 +453,62 @@ template docAbstractionFunctions() {
pith["block_is"] = eN.blk_is.table;
pith["block_state"] = eN.blk_state.on;
pith["block_delim"] = eN.blk_delim.curly_special;
+ } else if (auto m = line.matchFirst(rgx.block_quotemarks_code_open)) {
+ dochas["codeblock"]++;
+ an_object["lang"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
+ debug(codequotemarks) { writefln( "* [code quotemarks] %s", line); }
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.quotemarks; //
+ } else if (auto m = line.matchFirst(rgx.block_quotemarks_poem_open)) {
+ dochas["poem"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(poem) { writefln( "* [poem quotemarks] %s", line); }
+ object_number_poem["start"] = obj_cite_digits.object_number.to!string;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.quotemarks; //
+ pith["verse_new"] = eN.bi.on;
+ } else if (auto m = line.matchFirst(rgx.block_quotemarks_group_open)) {
+ dochas["group"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(group) { writefln( "* [group quotemarks] %s", line); }
+ pith["block_is"] = eN.blk_is.group;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.quotemarks;
+ } else if (auto m = line.matchFirst(rgx.block_quotemarks_block_open)) {
+ dochas["block"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(block) { writefln( "* [block quotemarks] %s", line); }
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.quotemarks;
+ } else if (auto m = line.matchFirst(rgx.block_quotemarks_quote_open)) {
+ dochas["quote"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = m["attrib"].to!string;
+ an_object["lang"] = m["lang"].to!string;
+ debug(quote) { writefln( "* [quote quotemarks] %s", line); // quote (quotemarks) open
+ }
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.quotemarks;
+ } else if (auto m = line.matchFirst(rgx.block_quotemarks_table_open)) { // quotemarks table open
+ debug(table) { writefln( "* [table quotemarks] %s", line); }
+ dochas["table"] ++;
+ an_object["table_head"] = m["attrib"].to!string;
+ an_object["block_type"] = "quotemarks";
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.quotemarks;
} else if (auto m = line.matchFirst(rgx.block_tic_code_open)) {
dochas["codeblock"]++;
an_object["lang"] = "";
@@ -536,6 +592,17 @@ template docAbstractionFunctions() {
debug(group) { writeln(line); }
an_object[an_object_key] ~= line ~= "\n";
}
+ } else if (pith["block_delim"] == eN.blk_delim.quotemarks) {
+ if (line.matchFirst(rgx.block_quotemarks_close)) {
+ debug(group) { writeln(line); }
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.group;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
+ } else {
+ debug(group) { writeln(line); }
+ an_object[an_object_key] ~= line ~= "\n";
+ }
} else if (pith["block_delim"] == eN.blk_delim.tic) {
if (line.matchFirst(rgx.block_tic_close)) {
debug(group) { writeln(line); }
@@ -574,6 +641,17 @@ template docAbstractionFunctions() {
debug(block) { writeln(line); }
an_object[an_object_key] ~= line ~= "\n";
}
+ } else if (pith["block_delim"] == eN.blk_delim.quotemarks) {
+ if (line.matchFirst(rgx.block_quotemarks_close)) {
+ debug(block) { writeln(line); }
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
+ } else {
+ debug(block) { writeln(line); }
+ an_object[an_object_key] ~= line ~= "\n";
+ }
} else if (pith["block_delim"] == eN.blk_delim.tic) {
if (line.matchFirst(rgx.block_tic_close)) {
debug(block) { writeln(line); }
@@ -698,6 +776,94 @@ template docAbstractionFunctions() {
++cntr;
}
}
+ } else if (pith["block_delim"] == eN.blk_delim.quotemarks) {
+ if (auto m = line.matchFirst(rgx.block_quotemarks_close)) {
+ an_object[an_object_key] = "verse";
+ debug(poem) { writefln( "* [poem quotemarks] %s", line); }
+ if (processing.length > 0) {
+ an_object[an_object_key] = processing["verse"];
+ }
+ if (an_object.length > 0) {
+ debug(poem) { writeln(__LINE__); writeln(obj_cite_digits.object_number, line); }
+ processing.remove("verse");
+ an_object["is"] = "verse";
+ ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct
+ = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
+ an_object["substantive"] = substantive_obj_misc_struct.obj_txt;
+ anchor_tag = substantive_obj_misc_struct.anchor_tag;
+ comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number);
+ comp_obj_.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
+ comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg;
+ comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star;
+ comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links;
+ the_document_body_section ~= comp_obj_;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ object_number_poem["end"] = obj_cite_digits.object_number.to!string;
+ object_reset(an_object);
+ processing.remove("verse");
+ ++cntr;
+ }
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
+ } else {
+ processing["verse"] ~= line ~= "\n";
+ if (pith["verse_new"] == eN.bi.on) {
+ obj_cite_digits = ocn_emit(pith["ocn"]);
+ pith["verse_new"] = eN.bi.off;
+ } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) {
+ processing["verse"] = processing["verse"].stripRight;
+ pith["verse_new"] = eN.bi.on;
+ verse_line = eN.bi.off;
+ }
+ if (pith["verse_new"] == eN.bi.on) {
+ verse_line = 1;
+ an_object[an_object_key] = processing["verse"];
+ debug(poem) { writefln(
+ "* %s tic\n%s",
+ obj_cite_digits.object_number,
+ an_object[an_object_key]
+ );
+ }
+ processing.remove("verse");
+ an_object["is"] = "verse";
+ auto comp_obj_location
+ = node_construct.node_location_emitter(
+ content_non_header,
+ tag_in_seg,
+ lev_anchor_tag,
+ tag_assoc,
+ obj_cite_digits,
+ cntr,
+ heading_ptr-1,
+ an_object["is"]
+ );
+ ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct
+ = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
+ an_object["substantive"] = substantive_obj_misc_struct.obj_txt;
+ anchor_tag = substantive_obj_misc_struct.anchor_tag;
+ comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number);
+ comp_obj_.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
+ comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg;
+ comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star;
+ comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links;
+ the_document_body_section ~= comp_obj_;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ object_reset(an_object);
+ processing.remove("verse");
+ ++cntr;
+ }
+ }
} else if (pith["block_delim"] == eN.blk_delim.tic) {
if (auto m = line.matchFirst(rgx.block_tic_close)) {
an_object[an_object_key] = "verse";
@@ -816,6 +982,19 @@ template docAbstractionFunctions() {
debug(codecurly) { writeln(line); }
an_object[an_object_key] ~= line ~= "\n";
}
+ } else if (pith["block_delim"] == eN.blk_delim.quotemarks) {
+ if (line.matchFirst(rgx.block_quotemarks_close)) {
+ debug(codequotemarks) { writeln(line); }
+ an_object[an_object_key] = an_object[an_object_key]
+ .replaceFirst(rgx.newline_eol_delimiter_only, "")
+ .stripRight;
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
+ } else {
+ debug(codequotemarks) { writeln(line); }
+ an_object[an_object_key] ~= line ~= "\n";
+ }
} else if (pith["block_delim"] == eN.blk_delim.tic) {
if (line.matchFirst(rgx.block_tic_close)) {
debug(codetic) { writeln(line); }
@@ -884,6 +1063,16 @@ template docAbstractionFunctions() {
debug(table) { writeln(line); }
an_object[an_object_key] ~= line ~= "\n";
}
+ } else if (pith["block_delim"] == eN.blk_delim.quotemarks) {
+ if (line.matchFirst(rgx.block_quotemarks_close)) {
+ debug(table) { writeln(line); }
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
+ } else {
+ debug(table) { writeln(line); }
+ an_object[an_object_key] ~= line ~= "\n";
+ }
} else if (pith["block_delim"] == eN.blk_delim.tic) {
if (line.matchFirst(rgx.block_tic_close)) {
debug(table) { writeln(line); }
@@ -927,6 +1116,17 @@ template docAbstractionFunctions() {
debug(quote) { writeln(line); }
an_object[an_object_key] ~= line ~= "\n";
}
+ } else if (pith["block_delim"] == eN.blk_delim.quotemarks) {
+ if (line.matchFirst(rgx.block_quotemarks_close)) {
+ debug(quote) { writeln(line); }
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
+ } else {
+ debug(quote) { writeln(line); }
+ an_object[an_object_key] ~= line ~= "\n";
+ }
} else if (pith["block_delim"] == eN.blk_delim.tic) {
if (line.matchFirst(rgx.block_tic_close)) {
debug(quote) { writeln(line); }
@@ -3631,7 +3831,7 @@ template docAbstractionFunctions() {
}
} else { // para
{
- auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
+ ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
{
an_object = _get.this_object;
an_object_key = _get.this_object_key;
@@ -3924,7 +4124,7 @@ template docAbstractionFunctions() {
tag_assoc[comp_obj_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_.tags.segment_anchor_tag_epub;
} else if (!(line.empty)) {
{
- auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
+ ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
{
an_object = _get.this_object;
an_object_key = _get.this_object_key;
diff --git a/src/sisudoc/meta/metadoc_object_setter.d b/src/sisudoc/meta/metadoc_object_setter.d
index 8b2daf0..e0e896e 100644
--- a/src/sisudoc/meta/metadoc_object_setter.d
+++ b/src/sisudoc/meta/metadoc_object_setter.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -420,6 +420,7 @@ template ObjectSetter() {
tic,
curly_special,
tic_special,
+ quotemarks,
}
}
return _e();
diff --git a/src/sisudoc/meta/metadoc_show_config.d b/src/sisudoc/meta/metadoc_show_config.d
index 76a0394..7434506 100644
--- a/src/sisudoc/meta/metadoc_show_config.d
+++ b/src/sisudoc/meta/metadoc_show_config.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -139,9 +139,7 @@ template spineShowSiteConfig() {
}
}
template spineShowConfig() {
- void spineShowConfig(T)(
- T doc_matters,
- ) {
+ void spineShowConfig(T)(T doc_matters) {
import
sisudoc.meta.defaults,
sisudoc.meta.rgx;
diff --git a/src/sisudoc/meta/metadoc_show_make.d b/src/sisudoc/meta/metadoc_show_make.d
index ddbb687..a5e5608 100644
--- a/src/sisudoc/meta/metadoc_show_make.d
+++ b/src/sisudoc/meta/metadoc_show_make.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -50,9 +50,7 @@
module sisudoc.meta.metadoc_show_make;
@safe:
template spineShowMake() {
- void spineShowMake(T)(
- T doc_matters,
- ) {
+ void spineShowMake(T)(T doc_matters) {
import
sisudoc.meta.defaults,
sisudoc.meta.rgx;
diff --git a/src/sisudoc/meta/metadoc_show_metadata.d b/src/sisudoc/meta/metadoc_show_metadata.d
index 31ff1ea..4a7a177 100644
--- a/src/sisudoc/meta/metadoc_show_metadata.d
+++ b/src/sisudoc/meta/metadoc_show_metadata.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -50,9 +50,7 @@
module sisudoc.meta.metadoc_show_metadata;
@safe:
template spineShowMetaData() {
- void spineShowMetaData(T)(
- T doc_matters,
- ) {
+ void spineShowMetaData(T)(T doc_matters) {
import
sisudoc.meta.defaults,
sisudoc.meta.rgx;
diff --git a/src/sisudoc/meta/metadoc_show_summary.d b/src/sisudoc/meta/metadoc_show_summary.d
index 92d476c..2ceb337 100644
--- a/src/sisudoc/meta/metadoc_show_summary.d
+++ b/src/sisudoc/meta/metadoc_show_summary.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -50,10 +50,8 @@
module sisudoc.meta.metadoc_show_summary;
@safe:
template spineMetaDocSummary() {
- void spineMetaDocSummary(S,T)(
- const S doc_abstraction,
- T doc_matters,
- ) {
+ void spineMetaDocSummary(D)(D doc) {
+ auto doc_matters = doc.matters;
import
sisudoc.meta.defaults,
sisudoc.meta.rgx;
@@ -85,7 +83,7 @@ template spineMetaDocSummary() {
"last_object_number_book_index" : "0",
];
foreach (k; doc_matters.has.keys_seq.seg) {
- foreach (obj; doc_abstraction[k]) {
+ foreach (obj; doc.abstraction[k]) {
if (obj.metainfo.is_of_part != "empty") {
if (!empty(obj.metainfo.object_number)) {
if (k == "body") {
@@ -116,9 +114,9 @@ template spineMetaDocSummary() {
doc_matters.src.language,
markup.repeat_character_by_number_provided("-", char_repeat_number),
"- toc arr length:",
- to!int(doc_abstraction["toc"].length),
- "- doc_abstraction arr length:",
- to!int(doc_abstraction["body"].length),
+ to!int(doc.abstraction["toc"].length),
+ "- doc.abstraction arr length:",
+ to!int(doc.abstraction["body"].length),
" doc body last obj on.#:",
to!int(check["last_object_number_body"]),
" - number of tables:",
@@ -134,26 +132,26 @@ template spineMetaDocSummary() {
" - number of images:",
doc_matters.has.images,
"- endnotes length:", // subtract headings
- (doc_abstraction["endnotes"].length > 2)
- ? (to!int(doc_abstraction["endnotes"].length - 2))
+ (doc.abstraction["endnotes"].length > 2)
+ ? (to!int(doc.abstraction["endnotes"].length - 2))
: 0,
"- glossary length:",
- (doc_abstraction["glossary"].length > 1)
- ? (to!int(doc_abstraction["glossary"].length))
+ (doc.abstraction["glossary"].length > 1)
+ ? (to!int(doc.abstraction["glossary"].length))
: 0,
"- biblio length:",
- (doc_abstraction["bibliography"].length > 1)
- ? (to!int(doc_abstraction["bibliography"].length))
+ (doc.abstraction["bibliography"].length > 1)
+ ? (to!int(doc.abstraction["bibliography"].length))
: 0,
"- bookindex length:",
- (doc_abstraction["bookindex"].length > 1)
- ? (to!int(doc_abstraction["bookindex"].length))
+ (doc.abstraction["bookindex"].length > 1)
+ ? (to!int(doc.abstraction["bookindex"].length))
: 0,
" book idx last obj on.#:",
to!int(check["last_object_number_book_index"]),
"- blurb length:",
- (doc_abstraction["blurb"].length > 1)
- ? (to!int(doc_abstraction["blurb"].length))
+ (doc.abstraction["blurb"].length > 1)
+ ? (to!int(doc.abstraction["blurb"].length))
: 0,
"* last obj on.#:",
to!int(check["last_object_number"]),
diff --git a/src/sisudoc/meta/package.d b/src/sisudoc/meta/package.d
index 1926eb6..d24afbb 100644
--- a/src/sisudoc/meta/package.d
+++ b/src/sisudoc/meta/package.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/rgx.d b/src/sisudoc/meta/rgx.d
index 0b5f9f0..259ab82 100644
--- a/src/sisudoc/meta/rgx.d
+++ b/src/sisudoc/meta/rgx.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -108,8 +108,8 @@ static template spineRgxIn() {
static para_attribs = ctRegex!(`^_(?:(?:[0-9])(?:_([0-9]))?|(?:[1-9])?[*]) `);
static para_inline_link_anchor = ctRegex!(`\*[~](?P<anchor>[a-z0-9_.-]+)(?= |$)`,"i");
/+ blocked markup +/
- static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^`{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]");
- static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|`{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)");
+ static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^[`']{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]");
+ static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|[`']{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)");
/+ blocked markup tics +/
static block_tic_code_open = ctRegex!("^`{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?");
static block_tic_poem_open = ctRegex!("^`{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?");
@@ -118,6 +118,14 @@ static template spineRgxIn() {
static block_tic_quote_open = ctRegex!("^`{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?");
static block_tic_table_open = ctRegex!("^`{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); // ctRegex!("^`{3} table(?:\(.*?\))?");
static block_tic_close = ctRegex!("^(`{3})$","m");
+ /+ blocked markup tics +/
+ static block_quotemarks_code_open = ctRegex!(`^'{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`);
+ static block_quotemarks_poem_open = ctRegex!(`^'{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`);
+ static block_quotemarks_group_open = ctRegex!(`^'{3} group(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`);
+ static block_quotemarks_block_open = ctRegex!(`^'{3} block(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`);
+ static block_quotemarks_quote_open = ctRegex!(`^'{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`);
+ static block_quotemarks_table_open = ctRegex!(`^'{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); // ctRegex!("^'{3} table(?:\(.*?\))?");
+ static block_quotemarks_close = ctRegex!(`^('{3})$`,"m");
/+ blocked markup curly +/
static block_curly_code_open = ctRegex!(`^(?:code(?:[.](?P<syntax>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`);
static block_curly_code_close = ctRegex!(`^([}]code)`);
diff --git a/src/sisudoc/meta/rgx_files.d b/src/sisudoc/meta/rgx_files.d
index 05db651..299c2a4 100644
--- a/src/sisudoc/meta/rgx_files.d
+++ b/src/sisudoc/meta/rgx_files.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/meta/rgx_yaml_tags.d b/src/sisudoc/meta/rgx_yaml_tags.d
index 6266bac..ee57469 100644
--- a/src/sisudoc/meta/rgx_yaml_tags.d
+++ b/src/sisudoc/meta/rgx_yaml_tags.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/share/defaults.d b/src/sisudoc/share/defaults.d
index f6303c8..502aca0 100644
--- a/src/sisudoc/share/defaults.d
+++ b/src/sisudoc/share/defaults.d
@@ -6,7 +6,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
diff --git a/src/sisudoc/spine.d b/src/sisudoc/spine.d
index 39563fb..e6e163d 100755
--- a/src/sisudoc/spine.d
+++ b/src/sisudoc/spine.d
@@ -7,7 +7,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved.
+ - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved.
- License: AGPL 3 or later:
@@ -1059,66 +1059,59 @@ string program_name = "spine";
) {
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, "]");
}
/+ ↓ 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);
}
/+ ↓ 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);
}
/+ ↓ 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);
}
/+ ↓ 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);
}
- 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);
}
}
}
/+ ↓ 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);
}
/+ ↓ 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, "]");
}
}
@@ -1165,66 +1158,59 @@ string program_name = "spine";
) {
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, "]");
}
/+ ↓ 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);
}
/+ ↓ 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);
}
/+ ↓ 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);
}
/+ ↓ 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);
}
- 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);
}
}
}
/+ ↓ 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);
}
/+ ↓ 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, "]");
}
}