diff options
| -rw-r--r-- | org/ao_defaults.org | 4 | ||||
| -rw-r--r-- | org/ao_output_debugs.org | 14 | ||||
| -rw-r--r-- | org/output.org | 69 | ||||
| -rw-r--r-- | org/sdp.org | 2 | ||||
| -rwxr-xr-x | src/sdp.d | 2 | ||||
| -rw-r--r-- | src/sdp/ao_defaults.d | 4 | ||||
| -rw-r--r-- | src/sdp/ao_output_debugs.d | 12 | ||||
| -rw-r--r-- | src/sdp/output_epub.d | 12 | ||||
| -rw-r--r-- | src/sdp/output_html.d | 40 | ||||
| -rw-r--r-- | src/sdp/output_hub.d | 17 | 
10 files changed, 137 insertions, 39 deletions
| 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 ~", -      "-------------------------------", +      "------------------------------------------------------------------",      );    }  } @@ -165,7 +165,7 @@ void main(string[] args) {            writefln(              "%s\n%s",              "~ document complete, ok ~", -            "-------------------------------", +            "------------------------------------------------------------------",            );          }        } diff --git a/src/sdp/ao_defaults.d b/src/sdp/ao_defaults.d index f7a4e7b..346c0c7 100644 --- a/src/sdp/ao_defaults.d +++ b/src/sdp/ao_defaults.d @@ -495,6 +495,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; +    }    }  }  template SiSUlanguageCodes() { diff --git a/src/sdp/ao_output_debugs.d b/src/sdp/ao_output_debugs.d index 414e851..aff30e8 100644 --- a/src/sdp/ao_output_debugs.d +++ b/src/sdp/ao_output_debugs.d @@ -660,13 +660,18 @@ template SiSUdebugs() {              }            }          } +        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: ", @@ -695,6 +700,7 @@ template SiSUdebugs() {            : 0,            __FILE__,            __LINE__, +          markup.repeat_character_by_number_provided("-", min_repeat_number),          );        }      } diff --git a/src/sdp/output_epub.d b/src/sdp/output_epub.d index 07b2cb9..076265c 100644 --- a/src/sdp/output_epub.d +++ b/src/sdp/output_epub.d @@ -215,7 +215,9 @@ template outputEPub() {              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") { @@ -269,7 +271,9 @@ template outputEPub() {                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; @@ -302,7 +306,9 @@ template outputEPub() {              }              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/src/sdp/output_html.d b/src/sdp/output_html.d index fca6f1f..7b99f4e 100644 --- a/src/sdp/output_html.d +++ b/src/sdp/output_html.d @@ -66,12 +66,16 @@ template outputHTML() {                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") { @@ -85,7 +89,9 @@ template outputHTML() {                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; @@ -112,12 +118,16 @@ template outputHTML() {                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") { @@ -143,12 +153,16 @@ template outputHTML() {                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;            }          } @@ -237,7 +251,9 @@ template outputHTML() {              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") { @@ -291,7 +307,9 @@ template outputHTML() {                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; @@ -324,7 +342,9 @@ template outputHTML() {              }              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/src/sdp/output_hub.d b/src/sdp/output_hub.d index 2ec11fe..c5c5510 100644 --- a/src/sdp/output_hub.d +++ b/src/sdp/output_hub.d @@ -32,30 +32,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; +/ | 
