aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-02-02 19:53:18 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit30faa243410ac4b335fbe09d9ca90091629078b7 (patch)
treeb8257b038579ec7c8d688ed0ac27d24fb8b37002
parentdoc_matters, add image list (diff)
reorganize org file
-rw-r--r--org/ao_debugs.org (renamed from org/ao_summary_and_debugs.org)124
-rw-r--r--org/ao_defaults.org2
-rw-r--r--org/ao_doc_abstraction.org34
-rw-r--r--org/ao_read_source_files.org1
-rw-r--r--org/output.org30
-rw-r--r--org/sdp.org177
-rw-r--r--src/sdp/abstraction.d4
-rw-r--r--src/sdp/abstraction_summary.d32
-rw-r--r--src/sdp/ao_abstract_doc_source.d16
-rw-r--r--src/sdp/ao_doc_debugs.d42
-rw-r--r--src/sdp/ao_rgx.d2
-rw-r--r--src/sdp/output_hub.d16
12 files changed, 263 insertions, 217 deletions
diff --git a/org/ao_summary_and_debugs.org b/org/ao_debugs.org
index 2fc405e..7a63a3a 100644
--- a/org/ao_summary_and_debugs.org
+++ b/org/ao_debugs.org
@@ -13,127 +13,7 @@
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
[[./sdp.org][sdp]] [[./][org/]]
-* 1. abstraction summary [#A] :summary:doc:abstraction:
-** 0. code structure: :abstraction_summary:
-
-#+BEGIN_SRC d :tangle ../src/sdp/abstraction_summary.d
-template SiSUabstractionSummary() {
- auto SiSUabstractionSummary(S,T)(
- auto ref const S contents,
- auto ref T doc_matters,
- ) {
- <<abstraction_summary_imports>>
- mixin InternalMarkup;
- <<abstraction_summary_initialize>>
- if (doc_matters.opt_action_bool["verbose"]) {
- <<ao_abstraction_summary>>
- }
- }
-}
-#+END_SRC
-
-** imports
-
-#+name: abstraction_summary_imports
-#+BEGIN_SRC d
-import
- ao_defaults,
- ao_rgx;
-import
- std.array,
- std.exception,
- std.stdio,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
-#+END_SRC
-
-** initialize :report:
-
-#+name: abstraction_summary_initialize
-#+BEGIN_SRC d
-auto markup = InlineMarkup();
-#+END_SRC
-
-** (last ocn)
-
-#+name: ao_abstraction_summary
-#+BEGIN_SRC d
-string[string] check = [
- "last_obj_cite_number" : "NA [debug \"checkdoc\" not run]",
-];
-foreach (k; doc_matters.keys_seq_seg) {
- foreach (obj; contents[k]) {
- if (obj.use != "empty") {
- if (!empty(obj.obj_cite_number)) {
- check["last_obj_cite_number"] = obj.obj_cite_number;
- }
- }
- }
-}
-#+END_SRC
-
-** summary
-
-#+name: ao_abstraction_summary
-#+BEGIN_SRC d
-// auto char_repeat_number = doc_matters.source_filename.length;
-// char_repeat_number = (char_repeat_number > 33)
-auto min_repeat_number = 66;
-auto char_repeat_number = (doc_matters.dochead_meta["title"]["full"].length
- + doc_matters.dochead_meta["creator"]["author"].length + 4);
-char_repeat_number = (char_repeat_number > min_repeat_number)
-? char_repeat_number
-: min_repeat_number;
-// writeln(char_repeat_number);
-writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n(%s: %s)\n%s",
- markup.repeat_character_by_number_provided("-", char_repeat_number),
- doc_matters.dochead_meta["title"]["full"],
- 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),
- "last obj_cite_number: ",
- to!int(check["last_obj_cite_number"]),
- "length endnotes: ",
- (contents["endnotes"].length > 1)
- ? (to!int(contents["endnotes"].length))
- : 0,
- "length glossary: ",
- (contents["glossary"].length > 1)
- ? (to!int(contents["glossary"].length))
- : 0,
- "length biblio: ",
- (contents["bibliography"].length > 1)
- ? (to!int(contents["bibliography"].length))
- : 0,
- "length bookindex: ",
- (contents["bookindex_seg"].length > 1)
- ? (to!int(contents["bookindex_seg"].length))
- : 0,
- "length blurb: ",
- (contents["blurb"].length > 1)
- ? (to!int(contents["blurb"].length))
- : 0,
- __FILE__,
- __LINE__,
- markup.repeat_character_by_number_provided("-", min_repeat_number),
-);
-#+END_SRC
-
-markup.repeat_character_by_number_provided("-", 10)
-markup.repeat_character_by_number_provided("-", (doc_matters.dochead_meta["title"]["full"].length))
-markup.repeat_character_by_number_provided("-", (doc_matters.source_filename.length))
-
-* 2. abstraction debugs :debug:doc:abstraction:
+* 1. abstraction debugs :debug:doc:abstraction:
** 0. code structure: :ao_doc_debugs:
#+BEGIN_SRC d :tangle ../src/sdp/ao_doc_debugs.d
@@ -815,7 +695,7 @@ debug(heading) { // heading
** (summary) [+1] :summary:
-#+name: ao_output_debugs_summary
+#+name: ao_output_debugs
#+BEGIN_SRC d
debug(headings) {
writefln(
diff --git a/org/ao_defaults.org b/org/ao_defaults.org
index a798763..2cb0eee 100644
--- a/org/ao_defaults.org
+++ b/org/ao_defaults.org
@@ -1007,7 +1007,7 @@ static inline_a_url = ctRegex!(`(┤)(\S+?)(â
#+name: ao_rgx
#+BEGIN_SRC d
-static image = ctRegex!(`([a-zA-Z._-]+?\.(?:png|gif|jpg))`, "mg");
+static image = ctRegex!(`([a-zA-Z0-9._-]+?\.(?:png|gif|jpg))`, "mg");
#+END_SRC
** inline markup book index :inline:bookindex:
diff --git a/org/ao_doc_abstraction.org b/org/ao_doc_abstraction.org
index 33ebea3..e4f38d3 100644
--- a/org/ao_doc_abstraction.org
+++ b/org/ao_doc_abstraction.org
@@ -26,11 +26,11 @@ Process markup document, create document abstraction.
+/
template SiSUdocAbstraction() {
/+ ↓ abstraction imports +/
- <<abs_imports>>
+ <<abs_top_imports>>
/+ ↓ abstraction mixins +/
- <<abs_mixins>>
+ <<abs_top_mixins>>
/+ ↓ abstraction struct init +/
- <<abs_init_struct>>
+ <<abs_top_init_struct>>
/+ ↓ abstract marked up document +/
auto SiSUdocAbstraction(Src,Make,Meta,Opt)(
Src markup_sourcefile_content,
@@ -137,10 +137,9 @@ template SiSUdocAbstraction() {
** 1. _pre loop processing_ :pre:
*** imports :imports:
-
[[./ao_defaults.org][ao_defaults]]
-#+name: abs_imports
+#+name: abs_top_imports
#+BEGIN_SRC d
import
ao_object_setter,
@@ -170,7 +169,7 @@ private import
*** mixins :mixins:
-#+name: abs_mixins
+#+name: abs_top_mixins
#+BEGIN_SRC d
mixin ObjectSetter;
mixin InternalMarkup;
@@ -180,7 +179,7 @@ mixin SiSUrgxInit;
*** initialize :initialize:
**** initialize general
-#+name: abs_init_struct
+#+name: abs_top_init_struct
#+BEGIN_SRC d
/+ initialize +/
ObjGenericComposite[][string] the_table_of_contents_section;
@@ -240,7 +239,7 @@ enum DomTags { none, open, close, close_and_open, open_still, }
**** initialize heading ancestors
-#+name: abs_init_struct
+#+name: abs_top_init_struct
#+BEGIN_SRC d
void heading_ancestors(O)(
auto ref O obj,
@@ -298,7 +297,7 @@ void heading_ancestors(O)(
**** initialize dom markup tags
-#+name: abs_init_struct
+#+name: abs_top_init_struct
#+BEGIN_SRC d
auto dom_set_markup_tags(int[] dom, int lev) {
foreach (i; 0 .. 8) {
@@ -343,7 +342,7 @@ auto dom_set_markup_tags(int[] dom, int lev) {
**** initialize dom collapsed tags
-#+name: abs_init_struct
+#+name: abs_top_init_struct
#+BEGIN_SRC d
auto dom_set_collapsed_tags(int[] dom, int lev) {
foreach (i; 0 .. 8) {
@@ -388,7 +387,7 @@ auto dom_set_collapsed_tags(int[] dom, int lev) {
**** initialize ocn emit
-#+name: abs_init_struct
+#+name: abs_top_init_struct
#+BEGIN_SRC d
int ocn_emit(int ocn_status_flag) {
return object_citation_number.ocn_emitter(ocn_status_flag);
@@ -1172,10 +1171,10 @@ if (the_document_body_section.length > 0) {
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,
@@ -1962,7 +1961,7 @@ if (the_blurb_section.length > 1) {
#+END_SRC
** 4. _return document tuple_ :post:
-*** the document :document:
+*** _the document_ :document:
#+name: abs_post
#+BEGIN_SRC d
@@ -2026,8 +2025,9 @@ if ((opt_action_bool["html"])
*** clean out structure
#+name: abs_post
+#+BEGIN_SRC d
destroy(the_document_head_section);
-destroy(the_document_table_of_contents_section);
+destroy(the_table_of_contents_section);
destroy(the_document_body_section);
destroy(the_endnotes_section);
destroy(the_glossary_section);
diff --git a/org/ao_read_source_files.org b/org/ao_read_source_files.org
index c325517..73594dd 100644
--- a/org/ao_read_source_files.org
+++ b/org/ao_read_source_files.org
@@ -81,7 +81,6 @@ template ConfigSDLang() {
}
#+END_SRC
-
** config file get sdl root tag :file:conf:sdlang:
#+name: ao_config_file_sdlang
diff --git a/org/output.org b/org/output.org
index 2d15db3..673fc4f 100644
--- a/org/output.org
+++ b/org/output.org
@@ -13,7 +13,7 @@
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
[[./sdp.org][sdp]] [[./][org/]]
-* 0. output hub template file [#A]
+* 0. output hub [#A]
#+BEGIN_SRC d :tangle ../src/sdp/output_hub.d
/++
@@ -47,7 +47,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"])) {
@@ -68,23 +68,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");}
}
@@ -137,8 +137,8 @@ import
output_xhtmls;
#+END_SRC
-** sisupod :sisupod:
-*** sisupod template :template:
+** _sisupod_ :sisupod:
+*** template :template:
#+BEGIN_SRC d :tangle ../src/sdp/source_sisupod.d
template SiSUpod() {
@@ -534,8 +534,8 @@ auto endnote(O)(
}
#+END_SRC
-*** html [#A] :html:
-**** html template :template:
+*** _html_ [#A] :html:
+**** template :template:
#+BEGIN_SRC d :tangle ../src/sdp/output_html.d
template outputHTML() {
@@ -2212,8 +2212,8 @@ auto css_write() {
}
#+END_SRC
-*** epub [#B] :epub:
-**** epub template :template:
+*** _epub_ [#B] :epub:
+**** template :template:
#+BEGIN_SRC d :tangle ../src/sdp/output_epub.d
template outputEPub() {
diff --git a/org/sdp.org b/org/sdp.org
index 9cb677b..658c0b9 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -365,7 +365,11 @@ enforce(
);
#+END_SRC
-*** 1. _document abstraction_
+*** 1. _document abstraction_ [#A]
+
+- return tuple of:
+ - doc_abstraction (the document)
+ - doc_matters
#+NAME: sdp_abstraction
#+BEGIN_SRC d
@@ -378,7 +382,7 @@ auto doc_matters = t[1];
#+END_SRC
*** 2. _output processing_ (post abstraction processing)
-**** 0. abstraction summary :abstraction:summary:
+**** 0. abstraction _print summary_ :abstraction:summary:
#+NAME: sdp_each_file_do_debugs_checkdoc
#+BEGIN_SRC d
@@ -434,8 +438,8 @@ writeln("no recognized filename");
break; // terminate, stop
#+END_SRC
-* 2. _document abstraction_
-** 0. abstraction template :template:
+* 2. _document abstraction functions_
+** 0. abstraction template [#A] :template:
#+BEGIN_SRC d :tangle ../src/sdp/abstraction.d
template SiSUabstraction() {
@@ -458,9 +462,19 @@ template SiSUabstraction() {
}
#+END_SRC
-** 1. (a) _read in raw file_ & (b) split content into: _doc header & doc content_
+** 1. (a) _read in raw file_ (b) split content into: _doc header & doc content_
- [[./ao_read_source_files.org][ao_read_source_files]]
+- read in the source marked up document and
+ - split the document into:
+ - document header
+ - document body
+ - if a master document make a list of insert files
+- return a tuple of:
+ - header
+ - body
+ - insert file list
+
#+NAME: sdp_each_file_do_read_and_split_sisu_markup_file_content_into_header_and_body
#+BEGIN_SRC d
/+ ↓ read file (filename with path) +/
@@ -476,9 +490,19 @@ debug(header_and_body) {
}
#+END_SRC
-** 2. split doc header into: _metadata & make_ :doc:header:metadata:make:
+** 2. _document metadata_ & _make instructions_ :doc:header:metadata:make:
- [[./ao_conf_make_meta.org][ao_conf_make_meta]]
+- read document header, split into:
+ - metadata
+ - make instructions
+- read config files
+ - consolidate make instructions
+- return tuple of:
+ - document metadata
+ - make instructions (from configuration files & document header make
+ instructions)
+
#+NAME: sdp_each_file_do_split_sisu_markup_file_header_into_make_and_meta
#+BEGIN_SRC d
/+ ↓ split header into make and meta +/
@@ -491,6 +515,17 @@ static assert(_0_make_1_dochead_meta_tuple.length==2);
** 3. _document abstraction, tuple_ (pre-processing) :processing:
- [[./ao_abstract_doc_source.org][ao_abstract_doc_source]]
+- prepare the document abstraction used in downstream processing
+
+- return tuple of:
+ - document abstraction (the_document or doc_abstraction)
+ - document abstraction keys
+ - (head, toc, body, endnotes, glossary, bibliography, bookindex, blurb,
+ tail)
+ - (passed in doc_matters)
+ - segnames for html epub (passed in doc_matters)
+ - image list (passed in doc_matters)
+
#+NAME: sdp_each_file_do_document_abstraction
#+BEGIN_SRC d
/+ ↓ document abstraction: process document, return abstraction as tuple +/
@@ -502,13 +537,16 @@ auto da = SiSUdocAbstraction!()(
);
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];
#+END_SRC
-** 4. _document matters_ (compiled from various sources)
+** 4. _document matters_ (doc info gathered, various sources)
+
+- prepare document_matters, miscellany about processing and the document of use
+ in downstream processing
#+NAME: sdp_each_file_do_document_matters
#+BEGIN_SRC d
@@ -530,7 +568,7 @@ struct DocumentMatters {
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() {
@@ -556,3 +594,124 @@ struct DocumentMatters {
}
auto doc_matters = DocumentMatters();
#+END_SRC
+
+* 3. document abstraction _summary_ :summary:doc:
+** 0. template: :template:
+
+#+BEGIN_SRC d :tangle ../src/sdp/abstraction_summary.d
+template SiSUabstractionSummary() {
+ auto SiSUabstractionSummary(S,T)(
+ auto ref const S doc_abstraction,
+ auto ref T doc_matters,
+ ) {
+ <<abstraction_summary_imports>>
+ mixin InternalMarkup;
+ <<abstraction_summary_initialize>>
+ if (doc_matters.opt_action_bool["verbose"]) {
+ <<ao_abstraction_summary>>
+ }
+ }
+}
+#+END_SRC
+
+** init
+*** imports
+
+#+name: abstraction_summary_imports
+#+BEGIN_SRC d
+import
+ ao_defaults,
+ ao_rgx;
+import
+ std.array,
+ std.exception,
+ std.stdio,
+ std.regex,
+ std.string,
+ std.traits,
+ std.typecons,
+ std.uni,
+ std.utf,
+ std.conv : to;
+#+END_SRC
+
+*** initialize :report:
+
+#+name: abstraction_summary_initialize
+#+BEGIN_SRC d
+auto markup = InlineMarkup();
+#+END_SRC
+
+** (last ocn)
+
+#+name: ao_abstraction_summary
+#+BEGIN_SRC d
+string[string] check = [
+ "last_obj_cite_number" : "NA [debug \"checkdoc\" not run]",
+];
+foreach (k; doc_matters.keys_seq_seg) {
+ foreach (obj; doc_abstraction[k]) {
+ if (obj.use != "empty") {
+ if (!empty(obj.obj_cite_number)) {
+ check["last_obj_cite_number"] = obj.obj_cite_number;
+ }
+ }
+ }
+}
+#+END_SRC
+
+** summary
+
+#+name: ao_abstraction_summary
+#+BEGIN_SRC d
+// auto char_repeat_number = doc_matters.source_filename.length;
+// char_repeat_number = (char_repeat_number > 33)
+auto min_repeat_number = 66;
+auto char_repeat_number = (doc_matters.dochead_meta["title"]["full"].length
+ + doc_matters.dochead_meta["creator"]["author"].length + 4);
+char_repeat_number = (char_repeat_number > min_repeat_number)
+? char_repeat_number
+: min_repeat_number;
+// writeln(char_repeat_number);
+writefln(
+ "%s\n\"%s\", %s\n%s\n%s\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n(%s: %s)\n%s",
+ markup.repeat_character_by_number_provided("-", char_repeat_number),
+ doc_matters.dochead_meta["title"]["full"],
+ doc_matters.dochead_meta["creator"]["author"],
+ doc_matters.source_filename,
+ markup.repeat_character_by_number_provided("-", char_repeat_number),
+ "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: ",
+ (doc_abstraction["endnotes"].length > 1)
+ ? (to!int(doc_abstraction["endnotes"].length))
+ : 0,
+ "length glossary: ",
+ (doc_abstraction["glossary"].length > 1)
+ ? (to!int(doc_abstraction["glossary"].length))
+ : 0,
+ "length biblio: ",
+ (doc_abstraction["bibliography"].length > 1)
+ ? (to!int(doc_abstraction["bibliography"].length))
+ : 0,
+ "length bookindex: ",
+ (doc_abstraction["bookindex_seg"].length > 1)
+ ? (to!int(doc_abstraction["bookindex_seg"].length))
+ : 0,
+ "length blurb: ",
+ (doc_abstraction["blurb"].length > 1)
+ ? (to!int(doc_abstraction["blurb"].length))
+ : 0,
+ __FILE__,
+ __LINE__,
+ markup.repeat_character_by_number_provided("-", min_repeat_number),
+);
+#+END_SRC
+
+markup.repeat_character_by_number_provided("-", 10)
+markup.repeat_character_by_number_provided("-", (doc_matters.dochead_meta["title"]["full"].length))
+markup.repeat_character_by_number_provided("-", (doc_matters.source_filename.length))
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");}
}