aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_output_debugs.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-11-09 17:52:33 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commit2301a8251d111ca2e020f524ce036c11e4306a14 (patch)
treeaed462b441e64efe989dca5c5d5eee306d9d53be /org/ao_output_debugs.org
parenta bit of naming and tidying (diff)
0.9.0 document sections
Diffstat (limited to 'org/ao_output_debugs.org')
-rw-r--r--org/ao_output_debugs.org169
1 files changed, 96 insertions, 73 deletions
diff --git a/org/ao_output_debugs.org b/org/ao_output_debugs.org
index 4b5af0c..b13bdce 100644
--- a/org/ao_output_debugs.org
+++ b/org/ao_output_debugs.org
@@ -55,17 +55,18 @@ debug(parent) {
__FILE__,
__LINE__,
);
- foreach (obj; contents) {
- if (obj.use == "content") {
- if (obj.is_a == "heading") {
- writefln(
- "%s node: %s heading: %s %s",
- obj.obj_cite_number,
- obj.node,
- obj.lev_markup_number,
- obj.object,
- );
- } else {
+ foreach (key; document_section_keys_sequenced["seg"]) {
+ foreach (obj; contents[key]) {
+ if (obj.use == "content") {
+ if (obj.is_a == "heading") {
+ writefln(
+ "%s node: %s heading: %s %s",
+ obj.obj_cite_number,
+ obj.node,
+ obj.lev_markup_number,
+ obj.object,
+ );
+ }
}
}
}
@@ -324,59 +325,71 @@ debug(anchor) {
__FILE__,
__LINE__,
);
- foreach (obj; contents) {
- if (obj.is_a == "heading") {
- writefln(
- "%s~ [%s] %s %s",
- obj.heading_attrib.lev,
- obj.obj_cite_number,
- obj.anchor_tags,
- obj.object
- );
+ foreach (key; document_section_keys_sequenced["seg"]) {
+ foreach (obj; contents[key]) {
+ if (obj.is_a == "heading") {
+ writefln(
+ "%s~ [%s] %s %s",
+ obj.heading_attrib.lev,
+ obj.obj_cite_number,
+ obj.anchor_tags,
+ // "[", obj["is"], "] ",
+ obj.object
+ );
+ }
}
}
}
#+END_SRC
-** (headings) :headings:
+** (headings) :headings:
#+name: ao_output_debugs
#+BEGIN_SRC d
debug(heading) { // heading
string spc;
- foreach (o; contents) {
- if (o.is_a == "heading") {
- switch (o.heading_attrib.lev_markup_number) {
- case 0:
- spc="";
- break;
- case 1:
- spc=" ";
- break;
- case 2:
- spc=" ";
- break;
- case 3:
- spc=" ";
- break;
- case 4:
- spc=" ";
- break;
- case 5:
- spc=" ";
- break;
- case 6:
- spc=" ";
- break;
- case 7:
- spc=" ";
- break;
- case 8:
- spc=" ";
- break;
- default:
- spc="";
- break;
+ foreach (key; document_section_keys_sequenced["seg"]) {
+ foreach (o; contents[key]) {
+ if (o.is_a == "heading") {
+ switch (o.heading_attrib.lev_markup_number) {
+ case 0:
+ spc="";
+ break;
+ case 1:
+ spc=" ";
+ break;
+ case 2:
+ spc=" ";
+ break;
+ case 3:
+ spc=" ";
+ break;
+ case 4:
+ spc=" ";
+ break;
+ case 5:
+ spc=" ";
+ break;
+ case 6:
+ spc=" ";
+ break;
+ case 7:
+ spc=" ";
+ break;
+ case 8:
+ spc=" ";
+ break;
+ default:
+ spc="";
+ break;
+ }
+ 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
+ );
}
writefln(
"%s* %s\n (markup level: %s; collapsed level: %s)",
@@ -401,14 +414,17 @@ debug(headings) {
__FILE__,
__LINE__,
);
- foreach (obj; contents) {
- if (obj.is_a == "heading") {
- writefln(
- "%s~ [%s] %s",
- obj.heading_attrib.lev,
- obj.obj_cite_number,
- obj.object
- );
+ foreach (key; document_section_keys_sequenced["seg"]) {
+ foreach (obj; contents[key]) {
+ if (obj.is_a == "heading") {
+ writefln(
+ "%s~ [%s] %s",
+ obj.heading_attrib.lev,
+ obj.obj_cite_number,
+ // "[", obj["is"], "] ",
+ obj.object
+ );
+ }
}
}
}
@@ -427,10 +443,12 @@ debug(summary) {
#+name: ao_output_debugs_summary
#+BEGIN_SRC d
debug(checkdoc) {
- foreach (obj; contents) {
- if (obj.use == "content") {
- if (!empty(obj.obj_cite_number)) {
- check["last_obj_cite_number"] = obj.obj_cite_number;
+ foreach (key; document_section_keys_sequenced["seg"]) {
+ foreach (obj; contents[key]) {
+ if (obj.use == "content") {
+ if (!empty(obj.obj_cite_number)) {
+ check["last_obj_cite_number"] = obj.obj_cite_number;
+ }
}
}
}
@@ -442,20 +460,24 @@ debug(checkdoc) {
#+name: ao_output_debugs_summary
#+BEGIN_SRC d
writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%s%s\n%s%s\n%s%s\n%s:%s",
+ "%s\n\"%s\", %s\n%s\n%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s:%s\n",
"-------------------------------",
dochead_meta["title"]["full"],
dochead_meta["creator"]["author"],
"-------------------------------",
fn_src,
"length contents array: ",
- contents.length,
+ contents["body"].length,
"last obj_cite_number: ",
check["last_obj_cite_number"],
- "length bookindex: ",
- bookindex_unordered_hashes.length,
+ "length glossary: ",
+ contents["glossary"].length,
"length biblio: ",
- biblio.length,
+ contents["bibliography"].length,
+ "length bookindex: ",
+ contents["bookindex_seg"].length,
+ "length blurb: ",
+ contents["blurb"].length,
__FILE__,
__LINE__,
);
@@ -606,8 +628,9 @@ template SiSUoutputDebugs() {
struct SDPoutputDebugs {
auto abstract_doc_source_debugs(S)(
auto ref const S contents,
- string[][string][string] bookindex_unordered_hashes,
- JSONValue[] biblio,
+ string[][string] document_section_keys_sequenced,
+ string[][string][string] bookindex_unordered_hashes, // redundant, consider
+ JSONValue[] biblio, // redundant, consider
string[string][string] dochead_make,
string[string][string] dochead_meta,
string fn_src,