From 69c906fc8cffc841fc33ab6f9bdeafcf1d8f3b82 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 18 Apr 2017 20:48:41 -0400 Subject: section keys sequence --- org/ao_debugs.org | 14 +++++++------- org/ao_doc_abstraction.org | 26 +++++++++++++++++++++++--- org/defaults.org | 1 - org/output.org | 12 ++++++------ org/sdp.org | 13 +++++-------- 5 files changed, 41 insertions(+), 25 deletions(-) (limited to 'org') 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() { <> /+ abstraction functions assertions ↑ +/ } /+ ← closed: template SiSUdocAbstraction +/ +<> #+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 ="