diff options
author | Ralph Amissah <ralph@amissah.com> | 2017-02-02 19:53:18 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | 30faa243410ac4b335fbe09d9ca90091629078b7 (patch) | |
tree | b8257b038579ec7c8d688ed0ac27d24fb8b37002 /src/sdp | |
parent | doc_matters, add image list (diff) |
reorganize org file
Diffstat (limited to 'src/sdp')
-rw-r--r-- | src/sdp/abstraction.d | 4 | ||||
-rw-r--r-- | src/sdp/abstraction_summary.d | 32 | ||||
-rw-r--r-- | src/sdp/ao_abstract_doc_source.d | 16 | ||||
-rw-r--r-- | src/sdp/ao_doc_debugs.d | 42 | ||||
-rw-r--r-- | src/sdp/ao_rgx.d | 2 | ||||
-rw-r--r-- | src/sdp/output_hub.d | 16 |
6 files changed, 60 insertions, 52 deletions
diff --git a/src/sdp/abstraction.d b/src/sdp/abstraction.d index d358f33..c1907f7 100644 --- a/src/sdp/abstraction.d +++ b/src/sdp/abstraction.d @@ -71,7 +71,7 @@ template SiSUabstraction() { ); static assert(!isTypeTuple!(da)); static assert(da.length==4); - auto doc_abstraction = da[0]; // head ~ toc ~ contents ~ endnotes_seg ~ glossary ~ bibliography ~ bookindex ~blurb; + auto doc_abstraction = da[0]; // head ~ toc ~ body ~ endnotes_seg ~ glossary ~ bibliography ~ bookindex ~blurb; string[][string] _document_section_keys_sequenced = da[1]; string[] _doc_html_segnames = da[2]; auto _images = da[3]; @@ -93,7 +93,7 @@ template SiSUabstraction() { return _k; } auto dochead_meta() { - string[string][string] _k = _0_make_1_dochead_meta_tuple[1]; + string[string][string] _k = _0_make_1_dochead_meta_tuple[1]; return _k; } auto source_filename() { diff --git a/src/sdp/abstraction_summary.d b/src/sdp/abstraction_summary.d index 237d1e0..75faf0e 100644 --- a/src/sdp/abstraction_summary.d +++ b/src/sdp/abstraction_summary.d @@ -1,6 +1,6 @@ template SiSUabstractionSummary() { auto SiSUabstractionSummary(S,T)( - auto ref const S contents, + auto ref const S doc_abstraction, auto ref T doc_matters, ) { import @@ -24,7 +24,7 @@ template SiSUabstractionSummary() { "last_obj_cite_number" : "NA [debug \"checkdoc\" not run]", ]; foreach (k; doc_matters.keys_seq_seg) { - foreach (obj; contents[k]) { + foreach (obj; doc_abstraction[k]) { if (obj.use != "empty") { if (!empty(obj.obj_cite_number)) { check["last_obj_cite_number"] = obj.obj_cite_number; @@ -48,31 +48,31 @@ template SiSUabstractionSummary() { doc_matters.dochead_meta["creator"]["author"], doc_matters.source_filename, markup.repeat_character_by_number_provided("-", char_repeat_number), - "length toc array: ", - to!int(contents["toc_seg"].length), - "length contents array: ", - to!int(contents["body"].length), + "length toc arr: ", + to!int(doc_abstraction["toc_seg"].length), + "length doc_abstraction arr: ", + to!int(doc_abstraction["body"].length), "last obj_cite_number: ", to!int(check["last_obj_cite_number"]), "length endnotes: ", - (contents["endnotes"].length > 1) - ? (to!int(contents["endnotes"].length)) + (doc_abstraction["endnotes"].length > 1) + ? (to!int(doc_abstraction["endnotes"].length)) : 0, "length glossary: ", - (contents["glossary"].length > 1) - ? (to!int(contents["glossary"].length)) + (doc_abstraction["glossary"].length > 1) + ? (to!int(doc_abstraction["glossary"].length)) : 0, "length biblio: ", - (contents["bibliography"].length > 1) - ? (to!int(contents["bibliography"].length)) + (doc_abstraction["bibliography"].length > 1) + ? (to!int(doc_abstraction["bibliography"].length)) : 0, "length bookindex: ", - (contents["bookindex_seg"].length > 1) - ? (to!int(contents["bookindex_seg"].length)) + (doc_abstraction["bookindex_seg"].length > 1) + ? (to!int(doc_abstraction["bookindex_seg"].length)) : 0, "length blurb: ", - (contents["blurb"].length > 1) - ? (to!int(contents["blurb"].length)) + (doc_abstraction["blurb"].length > 1) + ? (to!int(doc_abstraction["blurb"].length)) : 0, __FILE__, __LINE__, diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index 12bbd71..119a718 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -853,10 +853,10 @@ template SiSUdocAbstraction() { type["blurb_section"] = State.off; } previous_length = to!int(the_document_body_section.length); - if ( - match(the_document_body_section[$-1].text, - rgx.inline_notes_delimiter_al_regular_number_note) - ) { + if (match( + the_document_body_section[$-1].text, + rgx.inline_notes_delimiter_al_regular_number_note + )) { previous_count=to!int(the_document_body_section.length -1); note_section.gather_notes_for_endnote_section( the_document_body_section, @@ -1552,6 +1552,14 @@ template SiSUdocAbstraction() { document_section_keys_sequenced["seg"] ~= "tail"; document_section_keys_sequenced["scroll"] ~= "tail"; } + destroy(the_document_head_section); + destroy(the_table_of_contents_section); + destroy(the_document_body_section); + destroy(the_endnotes_section); + destroy(the_glossary_section); + destroy(the_bibliography_section); + destroy(the_bookindex_section); + destroy(the_blurb_section); auto t = tuple( document_the, document_section_keys_sequenced, diff --git a/src/sdp/ao_doc_debugs.d b/src/sdp/ao_doc_debugs.d index adc8c53..feb7de4 100644 --- a/src/sdp/ao_doc_debugs.d +++ b/src/sdp/ao_doc_debugs.d @@ -423,6 +423,27 @@ template SiSUdebugs() { } } } + debug(headings) { + writefln( + "%s\n%s:%s", + "-------------------------------", + __FILE__, + __LINE__, + ); + foreach (k; doc_matters.keys_seq_seg) { + foreach (obj; contents[k]) { + if (obj.is_a == "heading") { + writefln( + "%s~ [%s] %s", + obj.marked_up_level, + obj.obj_cite_number, + // "[", obj["is"], "] ", + obj.text + ); + } + } + } + } debug(summary) { string[string] check = [ "last_obj_cite_number" : "NA [debug \"checkdoc\" not run]", @@ -430,27 +451,6 @@ template SiSUdebugs() { } debug(checkdoc) { if ((doc_matters.opt_action_bool["debug"])) { - debug(headings) { - writefln( - "%s\n%s:%s", - "-------------------------------", - __FILE__, - __LINE__, - ); - foreach (k; doc_matters.keys_seq_seg) { - foreach (obj; contents[k]) { - if (obj.is_a == "heading") { - writefln( - "%s~ [%s] %s", - obj.marked_up_level, - obj.obj_cite_number, - // "[", obj["is"], "] ", - obj.text - ); - } - } - } - } debug(checkdoc) { if (auto mfn=match(doc_matters.source_filename, rgx.src_fn)) { if (doc_matters.opt_action_bool["assertions"]) { diff --git a/src/sdp/ao_rgx.d b/src/sdp/ao_rgx.d index 2d83d06..b91ae35 100644 --- a/src/sdp/ao_rgx.d +++ b/src/sdp/ao_rgx.d @@ -155,7 +155,7 @@ template SiSUrgxInit() { static inline_link_endnote_url_helper_punctuated = ctRegex!(`\{~\^\s+(.+?)\}((?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|#)\S+?)([.,;:?!]?(?:[ ]|$))`, "mg"); static inline_link_endnote_url_helper = ctRegex!(`\{~\^\s+(.+?)\}((?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|#)\S+)`, "mg"); static inline_a_url = ctRegex!(`(┤)(\S+?)(├)`, "mg"); - static image = ctRegex!(`([a-zA-Z._-]+?\.(?:png|gif|jpg))`, "mg"); + static image = ctRegex!(`([a-zA-Z0-9._-]+?\.(?:png|gif|jpg))`, "mg"); /+ inline markup book index +/ static book_index = ctRegex!(`^=\{\s*(.+?)\}$`, "m"); static book_index_open = ctRegex!(`^=\{\s*([^}]+?)$`); diff --git a/src/sdp/output_hub.d b/src/sdp/output_hub.d index c5c5510..6d6c134 100644 --- a/src/sdp/output_hub.d +++ b/src/sdp/output_hub.d @@ -29,7 +29,7 @@ template outputHub() { import ao_rgx, output_xhtmls; - void outputHub(C,D)(C contents, D doc_matters) { + void outputHub(D,I)(D doc_abstraction, I doc_matters) { mixin SiSUrgxInit; auto rgx = Rgx(); if ((doc_matters.opt_action_bool["verbose"])) { @@ -50,23 +50,23 @@ template outputHub() { } if (doc_matters.opt_action_bool["html"]) { if ((doc_matters.opt_action_bool["verbose"])) {write("html scroll processing... ");} - outputHTML!().scroll(contents,doc_matters); + outputHTML!().scroll(doc_abstraction, doc_matters); if ((doc_matters.opt_action_bool["verbose"])) {writeln("html scroll done");} if ((doc_matters.opt_action_bool["verbose"])) {write("html seg processing... ");} - outputHTML!().seg(contents,doc_matters); + outputHTML!().seg(doc_abstraction, doc_matters); if ((doc_matters.opt_action_bool["verbose"])) {writeln("html seg done");} - } else if(doc_matters.opt_action_bool["html_seg"]) { + } else if (doc_matters.opt_action_bool["html_seg"]) { if ((doc_matters.opt_action_bool["verbose"])) {write("html seg processing... ");} - outputHTML!().seg(contents,doc_matters); + outputHTML!().seg(doc_abstraction, doc_matters); if ((doc_matters.opt_action_bool["verbose"])) {writeln("html seg done");} - } else if(doc_matters.opt_action_bool["html_scroll"]) { + } else if (doc_matters.opt_action_bool["html_scroll"]) { if ((doc_matters.opt_action_bool["verbose"])) {write("html scroll processing... ");} - outputHTML!().scroll(contents,doc_matters); + outputHTML!().scroll(doc_abstraction, doc_matters); if ((doc_matters.opt_action_bool["verbose"])) {writeln("html scroll done");} } if (doc_matters.opt_action_bool["epub"]) { if ((doc_matters.opt_action_bool["verbose"])) {write("epub processing... ");} - outputEPub!()(contents, doc_matters); + outputEPub!()(doc_abstraction, doc_matters); // epub.css_write; if ((doc_matters.opt_action_bool["verbose"])) {writeln("epub done");} } |