From b1c43b3f554a3bb9b82a62fddc392f8829e24552 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 27 Jul 2017 12:07:34 -0400 Subject: meta doc abstraction summary --- org/sdp.org | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'org') diff --git a/org/sdp.org b/org/sdp.org index 5eb1364..eed2bbc 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -704,12 +704,21 @@ auto markup = InlineMarkup(); #+BEGIN_SRC d string[string] check = [ "last_obj_cite_number" : "NA [debug \"checkdoc\" not run]", + "last_obj_cite_number_body" : "0", + "last_obj_cite_number_bkidx" : "0", ]; 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; + if (k == "body") { + check["last_obj_cite_number_body"] = obj.obj_cite_number; + } + if ((k != "bookindex_seg") && (k != "blurb")) { + check["last_obj_cite_number"] = obj.obj_cite_number; + } else if (k == "bookindex_seg") { + check["last_obj_cite_number_bkidx"] = obj.obj_cite_number; + } } } } @@ -727,7 +736,7 @@ char_repeat_number = (char_repeat_number > min_repeat_number) ? char_repeat_number : min_repeat_number; writefln( - "%s\n\"%s\", %s\n%s\n%s\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n(%s: %s)\n%s", + "%s\n\"%s\", %s\n%s\n%s\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\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"], @@ -737,11 +746,13 @@ writefln( to!int(doc_abstraction["toc_seg"].length), "length doc_abstraction arr:", to!int(doc_abstraction["body"].length), + "last doc body ocn:", + to!int(check["last_obj_cite_number_body"]), "last obj_cite_number:", to!int(check["last_obj_cite_number"]), - "length endnotes:", - (doc_abstraction["endnotes"].length > 1) - ? (to!int(doc_abstraction["endnotes"].length)) + "length endnotes:", // subtract headings + (doc_abstraction["endnotes"].length > 2) + ? (to!int(doc_abstraction["endnotes"].length - 2)) : 0, "length glossary:", (doc_abstraction["glossary"].length > 1) @@ -755,6 +766,8 @@ writefln( (doc_abstraction["bookindex_seg"].length > 1) ? (to!int(doc_abstraction["bookindex_seg"].length)) : 0, + " last book idx ocn:", + to!int(check["last_obj_cite_number_bkidx"]), "length blurb:", (doc_abstraction["blurb"].length > 1) ? (to!int(doc_abstraction["blurb"].length)) -- cgit v1.2.3