diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/ao_debugs.org | 14 | ||||
-rw-r--r-- | org/ao_doc_abstraction.org | 26 | ||||
-rw-r--r-- | org/defaults.org | 1 | ||||
-rw-r--r-- | org/output.org | 12 | ||||
-rw-r--r-- | org/sdp.org | 13 |
5 files changed, 41 insertions, 25 deletions
diff --git a/org/ao_debugs.org b/org/ao_debugs.org index 39fdbac..3a73da0 100644 --- a/org/ao_debugs.org +++ b/org/ao_debugs.org @@ -85,7 +85,7 @@ debug(parent) { __FILE__, __LINE__, ); - foreach (key; doc_matters.keys_seq_seg) { + foreach (key; doc_matters.keys_seq.seg) { foreach (obj; contents[key]) { if (obj.use != "empty") { if (obj.is_a == "heading") { @@ -136,7 +136,7 @@ debug(checkdoc) { auto return ref const S contents, auto return ref T doc_matters, ) { - foreach (key; doc_matters.keys_seq_seg) { + foreach (key; doc_matters.keys_seq.seg) { if (contents[key].length > 1) { foreach (obj; contents[key]) { if (obj.heading_lev_markup == 4) { @@ -303,7 +303,7 @@ debug(section_body) { #+BEGIN_SRC d debug(toc_nav_dom) { enum DomTags { none, open, close, close_and_open, open_still, } - foreach (sect; doc_matters.keys_seq_seg) { + foreach (sect; doc_matters.keys_seq.seg) { foreach (obj; contents[sect]) { if (obj.is_a == "heading") { foreach_reverse (k; 0 .. 7) { @@ -326,7 +326,7 @@ debug(toc_nav_dom) { } } writeln("--------------------"); - foreach (sect; doc_matters.keys_seq_seg) { + foreach (sect; doc_matters.keys_seq.seg) { foreach (obj; contents[sect]) { if (obj.is_a == "heading") { foreach_reverse (k; 0 .. 7) { @@ -655,7 +655,7 @@ debug(anchor) { __FILE__, __LINE__, ); - foreach (k; doc_matters.keys_seq_seg) { + foreach (k; doc_matters.keys_seq.seg) { foreach (obj; contents[k]) { if (obj.is_a == "heading") { writefln( @@ -677,7 +677,7 @@ debug(anchor) { #+name: ao_output_debugs #+BEGIN_SRC d debug(heading) { // heading - foreach (k; doc_matters.keys_seq_seg) { + foreach (k; doc_matters.keys_seq.seg) { foreach (o; contents[k]) { if (o.is_a == "heading") { writefln( @@ -704,7 +704,7 @@ debug(headings) { __FILE__, __LINE__, ); - foreach (k; doc_matters.keys_seq_seg) { + foreach (k; doc_matters.keys_seq.seg) { foreach (obj; contents[k]) { if (obj.is_a == "heading") { writefln( diff --git a/org/ao_doc_abstraction.org b/org/ao_doc_abstraction.org index 240b8df..e178575 100644 --- a/org/ao_doc_abstraction.org +++ b/org/ao_doc_abstraction.org @@ -224,6 +224,7 @@ template SiSUdocAbstraction() { <<abs_functions_assertions>> /+ abstraction functions assertions ↑ +/ } /+ ← closed: template SiSUdocAbstraction +/ +<<template_doc_sect_keys_seq>> #+END_SRC ** 1. _pre loop processing_ :pre: @@ -2210,7 +2211,7 @@ dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; #+BEGIN_SRC d auto t = tuple( document_the, - document_section_keys_sequenced, + docSectKeysSeq!()(document_section_keys_sequenced), segnames, images, ); @@ -3429,8 +3430,8 @@ void _block_flag_line_empty_(B)( ); auto substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa); - an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; - anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; + an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; + anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "body"; comp_obj_block.is_of = "block"; @@ -6785,6 +6786,25 @@ auto assertions_flag_types_block_status_none_or_closed(T)(T type) { } #+END_SRC +*** doc sect keys seq + +#+name: template_doc_sect_keys_seq +#+BEGIN_SRC d +template docSectKeysSeq() { + auto docSectKeysSeq(string[][string] document_section_keys_sequenced) { + struct doc_sect_keys_seq { + auto seg() { + return document_section_keys_sequenced["seg"]; + } + auto scroll() { + return document_section_keys_sequenced["scroll"]; + } + } + return doc_sect_keys_seq(); + } +} +#+END_SRC + * 2. Object Setter (Set Abstract Object) :abstract:object: set abstracted objects for downstream processing diff --git a/org/defaults.org b/org/defaults.org index b83308d..272933e 100644 --- a/org/defaults.org +++ b/org/defaults.org @@ -925,7 +925,6 @@ template SiSUpaths() { #+END_SRC **** sisupod - ***** pod #+name: defaults_template_paths diff --git a/org/output.org b/org/output.org index a9fdc74..e0a7985 100644 --- a/org/output.org +++ b/org/output.org @@ -52,7 +52,7 @@ template outputHub() { mixin SiSUoutputRgxInit; auto rgx = Rgx(); if ((doc_matters.opt_action_bool["verbose"])) { - writeln(doc_matters.keys_seq_seg); + writeln(doc_matters.keys_seq.seg); } if (doc_matters.opt_action_bool["source"]) { /+ mixin outputSource; +/ @@ -1379,7 +1379,7 @@ void scroll(D,I)( string[] doc_html; string[] doc; string suffix = ".html"; - foreach (part; doc_matters.keys_seq_scroll) { + foreach (part; doc_matters.keys_seq.scroll) { foreach (obj; doc_abstraction[part]) { switch (obj.use) { case "frontmatter": @@ -1559,7 +1559,7 @@ void seg(D,I)( string segment_filename; string[] top_level_headings = ["","","",""]; string suffix = ".html"; - foreach (part; doc_matters.keys_seq_seg) { + foreach (part; doc_matters.keys_seq.seg) { foreach (obj; doc_abstraction[part]) { if (obj.is_a == "heading") { // all headings: frontmatter, body & backmatter switch (obj.heading_lev_markup) { @@ -2811,7 +2811,7 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); string toc ="<nav epub:type=\"toc\" id=\"toc\">\n"; - foreach (sect; doc_matters.keys_seq_seg) { + foreach (sect; doc_matters.keys_seq.seg) { foreach (obj; doc_abstraction[sect]) { if (obj.is_a == "heading") { foreach_reverse (n; 0 .. 7) { @@ -2905,7 +2905,7 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) { doc_matters.dochead_meta["title"]["full"], // title (doc_matters.dochead_meta["creator"]["author"].empty) ? "" : doc_matters.dochead_meta["creator"]["author"], // author ); - foreach (sect; doc_matters.keys_seq_seg) { + foreach (sect; doc_matters.keys_seq.seg) { foreach (obj; doc_abstraction[sect]) { if (obj.is_a == "heading") { foreach_reverse (k; 0 .. 7) { @@ -2970,7 +2970,7 @@ void outputEPub3(D,I)( string[] top_level_headings = ["","","",""]; string[string] oepbs_content_parts; string suffix = ".xhtml"; - foreach (part; doc_matters.keys_seq_seg) { + foreach (part; doc_matters.keys_seq.seg) { foreach (obj; doc_abstraction[part]) { if (obj.is_a == "heading") { switch (obj.heading_lev_markup) { diff --git a/org/sdp.org b/org/sdp.org index 6ef3d06..19ec705 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -541,7 +541,7 @@ auto da = SiSUdocAbstraction!()( static assert(!isTypeTuple!(da)); static assert(da.length==4); auto doc_abstraction = da[docAbst.doc_abstraction]; // head ~ toc ~ body ~ endnotes_seg ~ glossary ~ bibliography ~ bookindex ~blurb; -string[][string] _document_section_keys_sequenced = da[docAbst.section_keys]; +auto _document_section_keys_sequenced = da[docAbst.section_keys]; string[] _doc_html_segnames = da[docAbst.segnames]; auto _images = da[docAbst.images]; #+END_SRC @@ -554,12 +554,9 @@ auto _images = da[docAbst.images]; #+NAME: sdp_each_file_do_document_matters #+BEGIN_SRC d struct DocumentMatters { - string[] keys_seq_seg() { - string[] _k = _document_section_keys_sequenced["seg"]; - return _k; - } - string[] keys_seq_scroll() { - string[] _k = _document_section_keys_sequenced["scroll"]; + auto keys_seq() { + /+ contains .seg & .scroll sequences +/ + auto _k = _document_section_keys_sequenced; return _k; } string[] segnames() { @@ -661,7 +658,7 @@ auto markup = InlineMarkup(); string[string] check = [ "last_obj_cite_number" : "NA [debug \"checkdoc\" not run]", ]; -foreach (k; doc_matters.keys_seq_seg) { +foreach (k; doc_matters.keys_seq.seg) { foreach (obj; doc_abstraction[k]) { if (obj.use != "empty") { if (!empty(obj.obj_cite_number)) { |