diff options
author | Ralph Amissah <ralph@amissah.com> | 2017-10-17 12:55:09 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | 4749683d540b2554c66bf4734d41393e6410066f (patch) | |
tree | d4c115dde30e907a43e7d168482d1f614903dc81 /src/sdp/meta/metadoc_from_src.d | |
parent | org header cosmetic & maker.org/makefile (diff) |
meta_abstraction, a renaming, minor
Diffstat (limited to 'src/sdp/meta/metadoc_from_src.d')
-rw-r--r-- | src/sdp/meta/metadoc_from_src.d | 212 |
1 files changed, 106 insertions, 106 deletions
diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d index b164a64..b4bee7a 100644 --- a/src/sdp/meta/metadoc_from_src.d +++ b/src/sdp/meta/metadoc_from_src.d @@ -79,9 +79,9 @@ template SiSUdocAbstraction() { OCNset obj_cite_digits; int obj_cite_digit_, obj_cite_digit_off, obj_cite_digit_bkidx, obj_cite_digit_type; auto object_citation_number = OCNemitter(); - int[] dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; - int[] dom_markedup_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; - int[] dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] dom_markedup_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; int[] dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; enum DomTags { none, open, close, close_and_open, open_still, } pure auto obj_heading_ancestors(O)( @@ -137,7 +137,7 @@ template SiSUdocAbstraction() { } return obj; } - pure auto obj_dom_set_markup_tags(O)( + pure auto obj_dom_structure_set_markup_tags(O)( O obj, int[] dom, int lev @@ -482,20 +482,20 @@ template SiSUdocAbstraction() { the_glossary_section ~= comp_obj_heading_; } else { _para_match_(line, an_object, an_object_key, indent, bullet, obj_type_status, line_occur); - comp_obj_para = comp_obj_para.init; - comp_obj_para.of_part = "backmatter"; - comp_obj_para.of_section = "glossary"; - comp_obj_para.is_of = "para"; - comp_obj_para.is_a = "glossary"; - comp_obj_para.text = line.to!string.strip; - comp_obj_para.ocn = 0; - comp_obj_para.obj_cite_number = ""; - comp_obj_para.obj_cite_number_off = ""; - comp_obj_para.obj_cite_number_type = 0; - comp_obj_para.indent_hang = indent["hang_position"]; - comp_obj_para.indent_base = indent["base_position"]; - comp_obj_para.bullet = bullet; - the_glossary_section ~= comp_obj_para; + comp_obj_para = comp_obj_para.init; + comp_obj_para.of_part = "backmatter"; + comp_obj_para.of_section = "glossary"; + comp_obj_para.is_of = "para"; + comp_obj_para.is_a = "glossary"; + comp_obj_para.text = line.to!string.strip; + comp_obj_para.ocn = 0; + comp_obj_para.obj_cite_number = ""; + comp_obj_para.obj_cite_number_off = ""; + comp_obj_para.obj_cite_number_type = 0; + comp_obj_para.indent_hang = indent["hang_position"]; + comp_obj_para.indent_base = indent["base_position"]; + comp_obj_para.bullet = bullet; + the_glossary_section ~= comp_obj_para; } obj_type_status["ocn_status"] = OCNstatus.on; } @@ -580,23 +580,23 @@ template SiSUdocAbstraction() { comp_obj_heading_.heading_lev_collapsed = an_object["lev_collapsed_number"].to!int; // make int, remove need to conv comp_obj_heading_.parent_ocn = 1; comp_obj_heading_.parent_lev_markup = 0; - the_blurb_section ~= comp_obj_heading_; + the_blurb_section ~= comp_obj_heading_; } else { _para_match_(line, an_object, an_object_key, indent, bullet, obj_type_status, line_occur); - comp_obj_para = comp_obj_para.init; - comp_obj_para.of_part = "backmatter"; - comp_obj_para.of_section = "blurb"; - comp_obj_para.is_of = "para"; - comp_obj_para.is_a = "blurb"; - comp_obj_para.text = line.to!string.strip; - comp_obj_para.ocn = 0; - comp_obj_para.obj_cite_number = ""; - comp_obj_para.obj_cite_number_off = ""; - comp_obj_para.obj_cite_number_type = 0; - comp_obj_para.indent_hang = indent["hang_position"]; - comp_obj_para.indent_base = indent["base_position"]; - comp_obj_para.bullet = bullet; - the_blurb_section ~= comp_obj_para; + comp_obj_para = comp_obj_para.init; + comp_obj_para.of_part = "backmatter"; + comp_obj_para.of_section = "blurb"; + comp_obj_para.is_of = "para"; + comp_obj_para.is_a = "blurb"; + comp_obj_para.text = line.to!string.strip; + comp_obj_para.ocn = 0; + comp_obj_para.obj_cite_number = ""; + comp_obj_para.obj_cite_number_off = ""; + comp_obj_para.obj_cite_number_type = 0; + comp_obj_para.indent_hang = indent["hang_position"]; + comp_obj_para.indent_base = indent["base_position"]; + comp_obj_para.bullet = bullet; + the_blurb_section ~= comp_obj_para; } obj_type_status["ocn_status"] = OCNstatus.on; } @@ -687,7 +687,7 @@ template SiSUdocAbstraction() { debug(comment) { writeln(line); } - an_object[an_object_key] ~= line ~= "\n"; + an_object[an_object_key] ~= line ~= "\n"; comp_obj_comment = comp_obj_comment.init; comp_obj_comment.of_part = "comment"; // breaks flow comp_obj_comment.of_section = "comment"; // breaks flow @@ -1377,7 +1377,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1403,7 +1403,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1428,7 +1428,7 @@ template SiSUdocAbstraction() { || (opt_action["html-scroll"]) || (opt_action["html-seg"]) || (opt_action["epub"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1460,7 +1460,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1501,7 +1501,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1535,7 +1535,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1573,7 +1573,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1616,7 +1616,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1654,7 +1654,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1693,7 +1693,7 @@ template SiSUdocAbstraction() { || (opt_action["epub"]) || (opt_action["sqlite"]) || (opt_action["postgresql"])) { - obj = obj_dom_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); + obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup); obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed); } obj = obj_heading_ancestors(obj, lv_ancestors_txt); @@ -1727,10 +1727,10 @@ template SiSUdocAbstraction() { comp_obj_heading_.parent_lev_markup = 0; comp_obj_heading_.dom_markedup = dom_markedup.dup; comp_obj_heading_.dom_collapsed = dom_collapsed.dup; - comp_obj_heading_ = obj_dom_set_markup_tags(comp_obj_heading_, dom_markedup, 0); + comp_obj_heading_ = obj_dom_structure_set_markup_tags(comp_obj_heading_, dom_markedup, 0); comp_obj_heading_ = obj_dom_set_collapsed_tags(comp_obj_heading_, dom_collapsed, 0); comp_obj_heading_ = obj_heading_ancestors(comp_obj_heading_, lv_ancestors_txt); - the_dom_tail_section ~= comp_obj_heading_; + // the_dom_tail_section ~= comp_obj_heading_; // remove tail for now, decide on later auto document_the = [ "head": the_document_head_section, "toc_seg": the_table_of_contents_section["seg"], @@ -2260,7 +2260,7 @@ template SiSUdocAbstraction() { processing.remove("verse"); ++cntr; } - obj_cite_number_poem["end"] = obj_cite_digits.on.to!string; + obj_cite_number_poem["end"] = obj_cite_digits.on.to!string; obj_type_status["blocks"] = TriState.closing; obj_type_status["poem"] = TriState.closing; obj_type_status["curly_poem"] = TriState.off; @@ -4106,53 +4106,53 @@ template SiSUdocAbstraction() { _anchor_tag, ); toc_txt_= munge.url_links(toc_txt_); - comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.of_part = "frontmatter"; - comp_obj_toc.of_section = "toc"; - comp_obj_toc.is_of = "para"; - comp_obj_toc.is_a = "toc"; - comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = ""; - comp_obj_toc.obj_cite_number_off = ""; - comp_obj_toc.obj_cite_number_type = 0; - comp_obj_toc.indent_hang = indent["hang_position"]; - comp_obj_toc.indent_base = indent["base_position"]; - comp_obj_toc.bullet = false; - comp_obj_toc.text = toc_txt_.to!string.strip; - comp_obj_toc.inline_links = true; + comp_obj_toc = comp_obj_toc.init; + comp_obj_toc.of_part = "frontmatter"; + comp_obj_toc.of_section = "toc"; + comp_obj_toc.is_of = "para"; + comp_obj_toc.is_a = "toc"; + comp_obj_toc.ocn = 0; + comp_obj_toc.obj_cite_number = ""; + comp_obj_toc.obj_cite_number_off = ""; + comp_obj_toc.obj_cite_number_type = 0; + comp_obj_toc.indent_hang = indent["hang_position"]; + comp_obj_toc.indent_base = indent["base_position"]; + comp_obj_toc.bullet = false; + comp_obj_toc.text = toc_txt_.to!string.strip; + comp_obj_toc.inline_links = true; the_table_of_contents_section["scroll"] ~= comp_obj_toc; } else { indent=[ "hang_position" : 0, "base_position" : 0, ]; - comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.of_part = "frontmatter"; - comp_obj_toc.of_section = "toc"; - comp_obj_toc.is_of = "para"; - comp_obj_toc.is_a = "toc"; - comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = ""; - comp_obj_toc.obj_cite_number_off = ""; - comp_obj_toc.obj_cite_number_type = 0; - comp_obj_toc.indent_hang = indent["hang_position"]; - comp_obj_toc.indent_base = indent["base_position"]; - comp_obj_toc.bullet = false; - comp_obj_toc.text = "Table of Contents"; - comp_obj_toc.inline_links = true; + comp_obj_toc = comp_obj_toc.init; + comp_obj_toc.of_part = "frontmatter"; + comp_obj_toc.of_section = "toc"; + comp_obj_toc.is_of = "para"; + comp_obj_toc.is_a = "toc"; + comp_obj_toc.ocn = 0; + comp_obj_toc.obj_cite_number = ""; + comp_obj_toc.obj_cite_number_off = ""; + comp_obj_toc.obj_cite_number_type = 0; + comp_obj_toc.indent_hang = indent["hang_position"]; + comp_obj_toc.indent_base = indent["base_position"]; + comp_obj_toc.bullet = false; + comp_obj_toc.text = "Table of Contents"; + comp_obj_toc.inline_links = true; the_table_of_contents_section["scroll"] ~= comp_obj_toc; } - comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.of_part = "frontmatter"; - comp_obj_toc.of_section = "toc"; - comp_obj_toc.is_of = "para"; - comp_obj_toc.is_a = "toc"; - comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = ""; - comp_obj_toc.obj_cite_number_off = ""; - comp_obj_toc.obj_cite_number_type = 0; - comp_obj_toc.bullet = false; - comp_obj_toc.inline_links = true; + comp_obj_toc = comp_obj_toc.init; + comp_obj_toc.of_part = "frontmatter"; + comp_obj_toc.of_section = "toc"; + comp_obj_toc.is_of = "para"; + comp_obj_toc.is_a = "toc"; + comp_obj_toc.ocn = 0; + comp_obj_toc.obj_cite_number = ""; + comp_obj_toc.obj_cite_number_off = ""; + comp_obj_toc.obj_cite_number_type = 0; + comp_obj_toc.bullet = false; + comp_obj_toc.inline_links = true; switch (obj_["lev_markup_number"].to!int) { case 0: indent=[ @@ -4161,11 +4161,11 @@ template SiSUdocAbstraction() { ]; toc_txt_ = "{ Table of Contents }" ~ mkup.mark_internal_site_lnk ~ "toc.fnSuffix"; toc_txt_= munge.url_links(toc_txt_); - comp_obj_toc.indent_hang = indent["hang_position"]; - comp_obj_toc.indent_base = indent["base_position"]; - comp_obj_toc.text = toc_txt_.to!string.strip; - comp_obj_toc.inline_links = true; - the_table_of_contents_section["seg"] ~= comp_obj_toc; + comp_obj_toc.indent_hang = indent["hang_position"]; + comp_obj_toc.indent_base = indent["base_position"]; + comp_obj_toc.text = toc_txt_.to!string.strip; + comp_obj_toc.inline_links = true; + the_table_of_contents_section["seg"] ~= comp_obj_toc; break; case 1: .. case 3: indent=[ @@ -4177,11 +4177,11 @@ template SiSUdocAbstraction() { heading_toc_, ); toc_txt_= munge.url_links(toc_txt_); - comp_obj_toc.indent_hang = indent["hang_position"]; - comp_obj_toc.indent_base = indent["base_position"]; - comp_obj_toc.text = toc_txt_.to!string.strip; - comp_obj_toc.inline_links = true; - the_table_of_contents_section["seg"] ~= comp_obj_toc; + comp_obj_toc.indent_hang = indent["hang_position"]; + comp_obj_toc.indent_base = indent["base_position"]; + comp_obj_toc.text = toc_txt_.to!string.strip; + comp_obj_toc.inline_links = true; + the_table_of_contents_section["seg"] ~= comp_obj_toc; break; case 4: toc_txt_ = format( @@ -4197,11 +4197,11 @@ template SiSUdocAbstraction() { "hang_position" : obj_["lev_markup_number"].to!int, "base_position" : obj_["lev_markup_number"].to!int, ]; - comp_obj_toc.indent_hang = indent["hang_position"]; - comp_obj_toc.indent_base = indent["base_position"]; - comp_obj_toc.text = toc_txt_.to!string.strip; - comp_obj_toc.inline_links = true; - the_table_of_contents_section["seg"] ~= comp_obj_toc; + comp_obj_toc.indent_hang = indent["hang_position"]; + comp_obj_toc.indent_base = indent["base_position"]; + comp_obj_toc.text = toc_txt_.to!string.strip; + comp_obj_toc.inline_links = true; + the_table_of_contents_section["seg"] ~= comp_obj_toc; break; case 5: .. case 7: toc_txt_ = format( @@ -4226,11 +4226,11 @@ template SiSUdocAbstraction() { "hang_position" : obj_["lev_markup_number"].to!int, "base_position" : obj_["lev_markup_number"].to!int, ]; - comp_obj_toc.indent_hang = indent["hang_position"]; - comp_obj_toc.indent_base = indent["base_position"]; - comp_obj_toc.text = toc_txt_.to!string.strip; - comp_obj_toc.inline_links = true; - the_table_of_contents_section["seg"] ~= comp_obj_toc; + comp_obj_toc.indent_hang = indent["hang_position"]; + comp_obj_toc.indent_base = indent["base_position"]; + comp_obj_toc.text = toc_txt_.to!string.strip; + comp_obj_toc.inline_links = true; + the_table_of_contents_section["seg"] ~= comp_obj_toc; break; default: break; |