From 648492549fc290c416d870040c9097cc53335d44 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 30 Jan 2017 14:19:27 -0500 Subject: screen output --- org/ao_defaults.org | 4 +++ org/ao_output_debugs.org | 14 +++++++--- org/output.org | 69 +++++++++++++++++++++++++++++++++++++----------- org/sdp.org | 2 +- 4 files changed, 69 insertions(+), 20 deletions(-) (limited to 'org') diff --git a/org/ao_defaults.org b/org/ao_defaults.org index 908a449..b2604ac 100644 --- a/org/ao_defaults.org +++ b/org/ao_defaults.org @@ -744,6 +744,10 @@ template InternalMarkup() { _indent_spaces = replicate(_indent_spaces, indent); return _indent_spaces; } + string repeat_character_by_number_provided(C,N)(C _character ="-", N number=10) { + _character = replicate(_character, number); + return _character; + } } } #+END_SRC diff --git a/org/ao_output_debugs.org b/org/ao_output_debugs.org index 07a4dfe..7a7a8c7 100644 --- a/org/ao_output_debugs.org +++ b/org/ao_output_debugs.org @@ -737,7 +737,7 @@ debug(summary) { ]; #+END_SRC -*** (checkdoc) :checkdoc: +*** (last ocn) :checkdoc: #+name: ao_output_debugs_summary_doc #+BEGIN_SRC d @@ -758,13 +758,18 @@ if ((doc_matters.opt_action_bool["verbose"])) { #+name: ao_output_debugs_summary_doc #+BEGIN_SRC d +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; 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)", - "---------------------------------", + "%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: ", @@ -793,6 +798,7 @@ writefln( : 0, __FILE__, __LINE__, + markup.repeat_character_by_number_provided("-", min_repeat_number), ); #+END_SRC diff --git a/org/output.org b/org/output.org index c0dfe5b..2d15db3 100644 --- a/org/output.org +++ b/org/output.org @@ -50,30 +50,43 @@ template outputHub() { void outputHub(C,D)(C contents, D doc_matters) { mixin SiSUrgxInit; auto rgx = Rgx(); + if ((doc_matters.opt_action_bool["verbose"])) { + writeln(doc_matters.keys_seq_seg); + } if (doc_matters.opt_action_bool["source"]) { /+ mixin outputSource; +/ writeln("source"); } if (doc_matters.opt_action_bool["sisupod"]) { + if ((doc_matters.opt_action_bool["verbose"])) {write("sisupod source processing... ");} SiSUpod!()(doc_matters.source_filename); - writeln("sisupod source"); + if ((doc_matters.opt_action_bool["verbose"])) {writeln("sisupod done");} } if (doc_matters.opt_action_bool["text"]) { /+ mixin outputText; +/ writeln("text processing"); } if (doc_matters.opt_action_bool["html"]) { + if ((doc_matters.opt_action_bool["verbose"])) {write("html scroll processing... ");} outputHTML!().scroll(contents,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); + if ((doc_matters.opt_action_bool["verbose"])) {writeln("html seg done");} } 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); + if ((doc_matters.opt_action_bool["verbose"])) {writeln("html seg done");} } 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); + 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); // epub.css_write; - // writeln("epub processing"); + if ((doc_matters.opt_action_bool["verbose"])) {writeln("epub done");} } if (doc_matters.opt_action_bool["pdf"]) { /+ mixin outputPDF; +/ @@ -589,12 +602,16 @@ void scroll(C,T)( doc_html ~= xhtml_format.toc(obj); break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } } else if (obj.use == "body") { @@ -608,7 +625,9 @@ void scroll(C,T)( doc_html ~= xhtml_format.para(obj); break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } break; @@ -635,12 +654,16 @@ void scroll(C,T)( doc_html ~= xhtml_format.code(obj); break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); + } break; } } else if (obj.use == "backmatter") { @@ -666,12 +689,16 @@ void scroll(C,T)( doc_html ~= xhtml_format.para(obj); break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } } @@ -773,7 +800,9 @@ void seg(C,M)( doc_html[segment_filename] ~= xhtml_format.heading(obj); break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } } else if (obj.use == "frontmatter") { @@ -827,7 +856,9 @@ void seg(C,M)( doc_html[segment_filename] ~= xhtml_format.code(obj); break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } break; @@ -860,7 +891,9 @@ void seg(C,M)( } break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } } @@ -2417,7 +2450,9 @@ void outputEPub(C,T)( doc_epub[segment_filename] ~= xhtml_format.heading(obj); break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } } else if (obj.use == "frontmatter") { @@ -2471,7 +2506,9 @@ void outputEPub(C,T)( doc_epub[segment_filename] ~= xhtml_format.code(obj); break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } break; @@ -2504,7 +2541,9 @@ void outputEPub(C,T)( } break; default: - writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + if ((doc_matters.opt_action_bool["debug"])) { + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + } break; } } diff --git a/org/sdp.org b/org/sdp.org index 10511cc..9cd8265 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -345,7 +345,7 @@ scope(success) { writefln( "%s\n%s", "~ document complete, ok ~", - "-------------------------------", + "------------------------------------------------------------------", ); } } -- cgit v1.2.3