diff options
Diffstat (limited to 'src')
| -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 | 
6 files changed, 68 insertions, 19 deletions
| @@ -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; +/ | 
