aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_output_debugs.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-11-11 15:14:52 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commita32c38eda635daa4f7bf00e971e8105bd7d25c57 (patch)
tree57758a74537400d31a640b41c84362691ac25852 /org/ao_output_debugs.org
parent0.9.0 document sections (diff)
document sections
Diffstat (limited to 'org/ao_output_debugs.org')
-rw-r--r--org/ao_output_debugs.org327
1 files changed, 311 insertions, 16 deletions
diff --git a/org/ao_output_debugs.org b/org/ao_output_debugs.org
index b13bdce..0cab796 100644
--- a/org/ao_output_debugs.org
+++ b/org/ao_output_debugs.org
@@ -15,7 +15,52 @@
* output debugs :debug:output:
[[./sdp.org][sdp]] [[./][org/]]
-** book index (sort &) report :report:
+** initialize :report:
+
+#+name: initialize
+#+BEGIN_SRC d
+string key;
+string indent_amount_;
+auto indented_(int indent) {
+ switch (indent) {
+ case 0:
+ indent_amount_="";
+ break;
+ case 1:
+ indent_amount_=" ";
+ break;
+ case 2:
+ indent_amount_=" ";
+ break;
+ case 3:
+ indent_amount_=" ";
+ break;
+ case 4:
+ indent_amount_=" ";
+ break;
+ case 5:
+ indent_amount_=" ";
+ break;
+ case 6:
+ indent_amount_=" ";
+ break;
+ case 7:
+ indent_amount_=" ";
+ break;
+ case 8:
+ indent_amount_=" ";
+ break;
+ case 9:
+ indent_amount_=" ";
+ break;
+ default:
+ break;
+ }
+ return indent_amount_;
+}
+#+END_SRC
+
+** book index (sort &) report :report:
#+name: book_index_sorted_report
#+BEGIN_SRC d
@@ -97,6 +142,262 @@ debug(dumpdoc) {
}
#+END_SRC
+** shared output section arrange
+*** out toc
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+void out_toc(S)(
+ auto ref const S contents,
+ string key,
+) {
+ if (contents[key].length > 1) {
+ string indent_amount;
+ foreach (obj; contents[key]) {
+ indent_amount=indented_(obj.para_attrib.indent_start);
+ writefln(
+ "%s%s",
+ indent_amount,
+ obj.object
+ );
+ }
+ }
+}
+#+END_SRC
+
+*** out endnotes :endnotes:
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+void out_endnotes(S)(
+ auto ref const S contents,
+ string key,
+) {
+ if (contents[key].length > 1) {
+ foreach (obj; contents[key]) {
+ writefln(
+ "[%s]\n%s",
+ obj.is_a,
+ obj.object
+ );
+ }
+ }
+}
+#+END_SRC
+
+*** out bookindex :bookindex:
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+void out_bookindex(S)(
+ auto ref const S contents,
+ string key,
+) {
+ if (contents[key].length > 1) {
+ foreach (obj; contents[key]) {
+ writefln(
+ "[%s][%s]\n%s",
+ obj.obj_cite_number,
+ obj.is_a,
+ obj.object
+ );
+ }
+ }
+}
+#+END_SRC
+
+** sections
+*** heading_section :heading:
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_head) {
+ key="head";
+ if (contents[key].length > 1) {
+ foreach (obj; contents[key]) {
+ writefln(
+ "[%s][%s]\n%s",
+ obj.obj_cite_number,
+ obj.is_a,
+ obj.object
+ );
+ }
+ }
+}
+#+END_SRC
+
+*** toc_section (seg & scroll)
+**** toc
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_toc) {
+ key="toc_seg";
+ out_toc(contents, key);
+}
+#+END_SRC
+
+**** toc seg
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_toc_seg) {
+ key="toc_seg";
+ out_toc(contents, key);
+}
+#+END_SRC
+
+**** toc scroll
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_toc_scroll) {
+ key="toc_scroll";
+ out_toc(contents, key);
+}
+#+END_SRC
+
+*** body_section :body:
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_body) {
+ key="body";
+ if (contents[key].length > 1) {
+ foreach (obj; contents[key]) {
+ writefln(
+ "[%s][%s]\n%s",
+ obj.obj_cite_number,
+ obj.is_a,
+ obj.object
+ );
+ }
+ }
+}
+#+END_SRC
+
+*** endnotes_section (seg & scroll) :endnotes:
+
+**** endnotes
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_endnotes) {
+ key="endnotes_seg";
+ out_endnotes(contents, key);
+}
+#+END_SRC
+
+**** endnotes seg
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_endnotes_seg) {
+ key="endnotes_seg";
+ out_endnotes(contents, key);
+}
+#+END_SRC
+
+**** endnotes scroll
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_endnotes_scroll) {
+ key="endnotes_scroll";
+ out_endnotes(contents, key);
+}
+#+END_SRC
+
+*** glossary_section :glossary:
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_glossary) {
+ key="glossary";
+ if (contents[key].length > 1) {
+ foreach (obj; contents[key]) {
+ writefln(
+ "[%s][%s]\n%s",
+ obj.obj_cite_number,
+ obj.is_a,
+ obj.object
+ );
+ }
+ }
+}
+#+END_SRC
+
+*** bibliography_section (seg & scroll) :bibliography:
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_bibliography) {
+ key="bibliography";
+ if (contents[key].length > 1) {
+ foreach (obj; contents[key]) {
+ writefln(
+ "[%s][%s]\n%s",
+ obj.obj_cite_number,
+ obj.is_a,
+ obj.object
+ );
+ }
+ }
+}
+#+END_SRC
+
+*** bookindex_section (seg & scroll) :bookindex:
+
+**** bookindex
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_bookindex) {
+ key="bookindex_seg";
+ out_bookindex(contents, key);
+}
+#+END_SRC
+
+**** bookindex seg
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_bookindex_seg) {
+ key="bookindex_seg";
+ out_bookindex(contents, key);
+}
+#+END_SRC
+
+**** bookindex scroll
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(section_bookindex_scroll) {
+ key="bookindex_scroll";
+ out_bookindex(contents, key);
+}
+#+END_SRC
+
+*** section_blurb :blurb:
+
+#+name: ao_output_debugs
+#+BEGIN_SRC d
+debug(blurb_section) {
+ key="blurb";
+ if (contents[key].length > 1) {
+ foreach (obj; contents[key]) {
+ writefln(
+ "[%s][%s]\n%s",
+ obj.obj_cite_number,
+ obj.is_a,
+ obj.object
+ );
+ }
+ }
+}
+#+END_SRC
+
+* end
** (objects) :objects:
#+name: ao_output_debugs
@@ -325,8 +626,8 @@ debug(anchor) {
__FILE__,
__LINE__,
);
- foreach (key; document_section_keys_sequenced["seg"]) {
- foreach (obj; contents[key]) {
+ foreach (k; document_section_keys_sequenced["seg"]) {
+ foreach (obj; contents[k]) {
if (obj.is_a == "heading") {
writefln(
"%s~ [%s] %s %s",
@@ -348,8 +649,8 @@ debug(anchor) {
#+BEGIN_SRC d
debug(heading) { // heading
string spc;
- foreach (key; document_section_keys_sequenced["seg"]) {
- foreach (o; contents[key]) {
+ foreach (k; document_section_keys_sequenced["seg"]) {
+ foreach (o; contents[k]) {
if (o.is_a == "heading") {
switch (o.heading_attrib.lev_markup_number) {
case 0:
@@ -391,13 +692,6 @@ debug(heading) { // heading
o.heading_attrib.lev_collapsed_number
);
}
- writefln(
- "%s* %s\n (markup level: %s; collapsed level: %s)",
- spc,
- strip(o.object),
- o.heading_attrib.lev_markup_number,
- o.heading_attrib.lev_collapsed_number
- );
}
}
}
@@ -414,8 +708,8 @@ debug(headings) {
__FILE__,
__LINE__,
);
- foreach (key; document_section_keys_sequenced["seg"]) {
- foreach (obj; contents[key]) {
+ foreach (k; document_section_keys_sequenced["seg"]) {
+ foreach (obj; contents[k]) {
if (obj.is_a == "heading") {
writefln(
"%s~ [%s] %s",
@@ -443,8 +737,8 @@ debug(summary) {
#+name: ao_output_debugs_summary
#+BEGIN_SRC d
debug(checkdoc) {
- foreach (key; document_section_keys_sequenced["seg"]) {
- foreach (obj; contents[key]) {
+ foreach (k; document_section_keys_sequenced["seg"]) {
+ foreach (obj; contents[k]) {
if (obj.use == "content") {
if (!empty(obj.obj_cite_number)) {
check["last_obj_cite_number"] = obj.obj_cite_number;
@@ -638,6 +932,7 @@ template SiSUoutputDebugs() {
) {
mixin RgxInit;
auto rgx = Rgx();
+ <<initialize>>
<<book_index_sorted_report>>
<<ao_output_debugs>>
<<ao_output_debugs_summary>>