diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2022-02-22 14:23:35 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2022-02-23 11:00:55 -0500 |
commit | 614e44ad155e693f82a8228897bba2f4869167dd (patch) | |
tree | 4ba674ba60fb3b00460c37bf7b3f30d3cc9da49d | |
parent | pod org file, minor (diff) |
rethink verbose & debug flags, introduce show
-rw-r--r-- | org/out_curate_metadata.org | 22 | ||||
-rw-r--r-- | org/out_sqlite.org | 62 | ||||
-rw-r--r-- | org/out_src_pod.org | 3 | ||||
-rw-r--r-- | org/out_xmls.org | 84 | ||||
-rw-r--r-- | org/spine.org | 175 | ||||
-rw-r--r-- | src/doc_reform/io_out/epub3.d | 30 | ||||
-rw-r--r-- | src/doc_reform/io_out/html.d | 54 | ||||
-rw-r--r-- | src/doc_reform/io_out/source_pod.d | 3 | ||||
-rw-r--r-- | src/doc_reform/io_out/sqlite.d | 62 | ||||
-rw-r--r-- | src/doc_reform/meta/metadoc.d | 33 | ||||
-rw-r--r-- | src/doc_reform/meta/metadoc_curate_authors.d | 6 | ||||
-rw-r--r-- | src/doc_reform/meta/metadoc_curate_topics.d | 16 | ||||
-rwxr-xr-x | src/doc_reform/spine.d | 165 |
13 files changed, 373 insertions, 342 deletions
diff --git a/org/out_curate_metadata.org b/org/out_curate_metadata.org index 1c84bec..a9fc096 100644 --- a/org/out_curate_metadata.org +++ b/org/out_curate_metadata.org @@ -272,7 +272,7 @@ foreach(k0; if (k0 != "_a") { topics ~= format(q"┃<p class="lev0"><a name="%s" class="lev0">%s</a></p>┃", k0.translate([' ' : "_"]), k0,) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln("", k0); } if ("_a" in hvst.subject_trees[k0]) { @@ -301,7 +301,7 @@ foreach(k0; t_a_.path_html_metadata, t_a_.language, ) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln("- ", t_a_.title, " - ", t_a_.author); } } @@ -314,7 +314,7 @@ foreach(k0; topics ~= format(q"┃<p class="lev1"><a name="%s.%s" class="lev1">%s</a></p>┃", k0.translate([' ' : "_"]), k1.translate([' ' : "_"]), k1,) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" ", k1); } if ("_a" in hvst.subject_trees[k0][k1]) { @@ -343,7 +343,7 @@ foreach(k0; t_a_.path_html_metadata, t_a_.language, ) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" - ", t_a_.title, " - ", t_a_.author); } } @@ -357,7 +357,7 @@ foreach(k0; topics ~= format(q"┃<p class="lev2"><a name="%s.%s.%s" class="lev2">%s</a></p>┃", k0.translate([' ' : "_"]), k1.translate([' ' : "_"]), k2.translate([' ' : "_"]), k2,) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" ", k2); } if ("_a" in hvst.subject_trees[k0][k1][k2]) { @@ -386,7 +386,7 @@ foreach(k0; t_a_.path_html_metadata, t_a_.language, ) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" - ", t_a_.title, " - ", t_a_.author); } } @@ -400,7 +400,7 @@ foreach(k0; topics ~= format(q"┃<p class="lev3"><a name="%s.%s.%s.%s" class="lev3">%s</a></p>┃", k0.translate([' ' : "_"]), k1.translate([' ' : "_"]), k2.translate([' ' : "_"]), k3.translate([' ' : "_"]), k3,) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" ", k3); } { @@ -429,7 +429,7 @@ foreach(k0; t_a_.path_html_metadata, t_a_.language, ) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" - ", t_a_.title, " - ", t_a_.author); } } @@ -589,7 +589,7 @@ template spineMetaDocCuratesAuthors() { doc_curate.title, doc_curate.path_html_metadata, doc_curate.language, - (_opt_action.very_verbose) ? "\n " ~ doc_curate.path_abs_html_scroll : "", + (_opt_action.show_curate_authors) ? "\n " ~ doc_curate.path_abs_html_scroll : "", ); } foreach (k; _au.keys.sort) { @@ -618,9 +618,7 @@ try { } catch (ErrnoException ex) { // Handle error } -if (_opt_action.verbose - || _opt_action.very_verbose -) { +if (_opt_action.show_curate_authors) { foreach(_adt; _author_date_title.sort) { writeln(_adt); } diff --git a/org/out_sqlite.org b/org/out_sqlite.org index d5fbe7b..113a7c6 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -158,8 +158,7 @@ template SQLiteDbRun() { writeln("ERROR SQLite : ", ex); } { /+ debug +/ - if (opt_action.debug_do_sqlite - && opt_action.verbose) { + if (opt_action.debug_do_sqlite) { writeln(note); if (opt_action.very_verbose) { writeln(db_statement); @@ -519,8 +518,7 @@ string generic_munge_sanitize_text_for_search( _txt ~= _urls; } { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(_txt, "\n"); } } @@ -576,8 +574,7 @@ string munge_html(M,O)( string _urls; string _txt = _html_font_face(_html_special_characters(obj.text)); { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(_txt, "\n"); } } @@ -1205,8 +1202,7 @@ string[string] heading(M,O)( "html": html_heading(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1234,8 +1230,7 @@ string[string] para(M,O)( "html": html_para(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1263,8 +1258,7 @@ string[string] quote(M,O)( "html": html_quote(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1291,8 +1285,7 @@ string[string] group(M,O)( "html": html_group(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1320,8 +1313,7 @@ string[string] block(M,O)( "html": html_block(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1349,8 +1341,7 @@ string[string] verse(M,O)( "html": html_verse(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1378,8 +1369,7 @@ string[string] code(M,O)( "html": html_code(obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1407,8 +1397,7 @@ string[string] table(M,O)( "html": html_table(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1443,8 +1432,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1453,8 +1441,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1478,8 +1465,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1510,8 +1496,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1520,8 +1505,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1550,8 +1534,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1560,8 +1543,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1572,8 +1554,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from @@ -1582,7 +1563,10 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; } if (obj.metainfo.is_a == "heading") { - if ((doc_matters.opt.action.very_verbose)) { + if (doc_matters.opt.action.show_sqlite) { + if (obj.metainfo.heading_lev_markup == 0) { + writeln(doc_matters.src.filename); + } writeln( "markup: ", obj.metainfo.heading_lev_markup, "> ", obj.metainfo.dom_structure_markedup_tags_status, diff --git a/org/out_src_pod.org b/org/out_src_pod.org index 9d6e54d..a63bdba 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -147,7 +147,8 @@ if (doc_matters.opt.action.source_or_pod) { #+NAME: source_pod_archive_prepare_for_zip #+BEGIN_SRC d -debug(pod) { +if (doc_matters.opt.action.debug_do_pod +&& doc_matters.opt.action.verbose) { writeln(__LINE__, ": ", doc_matters.src.filename, " -> ", pths_pod.fn_doc(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod diff --git a/org/out_xmls.org b/org/out_xmls.org index fdb64d9..b017bf7 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -1769,8 +1769,7 @@ case "frontmatter": assert(part == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1779,8 +1778,7 @@ case "frontmatter": assert(part == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1805,8 +1803,7 @@ case "body": assert(part == "body" || "head"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1837,8 +1834,7 @@ case "body": assert(part == "body" || "head"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1847,8 +1843,7 @@ case "body": assert(part == "body" || "head"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1889,8 +1884,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1899,8 +1893,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1911,8 +1904,7 @@ case "comment": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -2053,8 +2045,7 @@ if (obj.metainfo.is_a == "heading") { break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -2062,8 +2053,7 @@ if (obj.metainfo.is_a == "heading") { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -2095,8 +2085,7 @@ case "frontmatter": assert(part == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2105,8 +2094,7 @@ case "frontmatter": assert(part == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2130,8 +2118,7 @@ case "body": assert(part == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2170,8 +2157,7 @@ case "body": assert(part == "body"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; } else { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2180,8 +2166,7 @@ case "body": assert(part == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2230,8 +2215,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2240,8 +2224,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2252,8 +2235,7 @@ case "comment": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -2765,8 +2747,7 @@ if (obj.metainfo.is_a == "heading") { break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -2774,8 +2755,7 @@ if (obj.metainfo.is_a == "heading") { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -2808,8 +2788,7 @@ case "frontmatter": assert(part == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2818,8 +2797,7 @@ case "frontmatter": assert(part == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2843,8 +2821,7 @@ case "body": assert(part == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2884,8 +2861,7 @@ case "body": assert(part == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2894,8 +2870,7 @@ case "body": assert(part == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2944,8 +2919,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2954,8 +2928,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2972,8 +2945,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } diff --git a/org/spine.org b/org/spine.org index ae78e86..1e382e3 100644 --- a/org/spine.org +++ b/org/spine.org @@ -334,13 +334,18 @@ bool[string] opts = [ "concordance" : false, "dark" : false, "debug" : false, - "debug-pod" : false, + "debug-curate" : false, + "debug-curate-authors" : false, + "debug-curate-topics" : false, "debug-epub" : false, "debug-harvest" : false, "debug-html" : false, "debug-latex" : false, "debug-manifest" : false, + "debug-metadata" : false, + "debug-pod" : false, "debug-sqlite" : false, + "debug-stages" : false, "digest" : false, "epub" : false, "curate" : false, @@ -366,10 +371,19 @@ bool[string] opts = [ "quiet" : false, "pod" : false, "serial" : false, - "show-summary" : false, - "show-metadata" : false, - "show-make" : false, "show-config" : false, + "show-curate" : false, + "show-curate-authors" : false, + "show-curate-topics" : false, + "show-epub" : false, + "show-html" : false, + "show-latex" : false, + "show-make" : false, + "show-manifest" : false, + "show-metadata" : false, + "show-pod" : false, + "show-sqlite" : false, + "show-summary" : false, "source" : false, "sqlite-discrete" : false, "sqlite-db-create" : false, @@ -445,14 +459,6 @@ auto helpInfo = getopt(args, "curate-authors", "extract info on authors from document header metadata", &opts["curate-authors"], "curate-topics", "extract info on topics from document header metadata", &opts["curate-topics"], "dark", "alternative dark theme", &opts["dark"], - "debug", "debug", &opts["debug"], - "debug-pod", "debug pod", &opts["debug-pod"], - "debug-epub", "debug epub", &opts["debug-epub"], - "debug-harvest", "debug harvest", &opts["debug-harvest"], - "debug-html", "debug html", &opts["debug-html"], - "debug-latex", "debug latex", &opts["debug-latex"], - "debug-manifest", "debug manifest", &opts["debug-manifest"], - "debug-sqlite", "debug sqlite", &opts["debug-sqlite"], "digest", "hash digest for each object", &opts["digest"], "epub", "process epub output", &opts["epub"], "hide-ocn", "object cite numbers", &opts["hide-ocn"], @@ -487,8 +493,17 @@ auto helpInfo = getopt(args, "serial", "serial processing", &opts["serial"], "skip-output", "skip output", &opts["skip-output"], "show-config", "show config", &opts["show-config"], + "show-curate", "show curate", &opts["show-curate"], + "show-curate-authors", "show curate authors", &opts["show-curate-authors"], + "show-curate-topics", "show curate topics", &opts["show-curate-topics"], + "show-epub", "show epub", &opts["show-epub"], + "show-html", "show html", &opts["show-html"], + "show-latex", "show latex", &opts["show-latex"], "show-make", "show make", &opts["show-make"], + "show-manifest", "show manifest", &opts["show-manifest"], "show-metadata", "show metadata", &opts["show-metadata"], + "show-pod", "show pod", &opts["show-pod"], + "show-sqlite", "show sqlite", &opts["show-sqlite"], "show-summary", "show summary", &opts["show-summary"], "source", "document markup source", &opts["source"], "set-digest", "default hash digest type (e.g. sha256)", &settings["set-digest"], @@ -516,6 +531,19 @@ auto helpInfo = getopt(args, "workon", "(reserved for some matters under development & testing)", &opts["workon"], "xhtml", "xhtml output", &opts["xhtml"], "config", "=/path/to/config/file/including/filename", &settings["config"], + "debug", "debug", &opts["debug"], + "debug-curate", "debug curate", &opts["debug-curate"], + "debug-curate-authors", "debug curate authors", &opts["debug-curate-authors"], + "debug-curate-topics", "debug curate topics", &opts["debug-curate-topics"], + "debug-epub", "debug epub", &opts["debug-epub"], + "debug-harvest", "debug harvest", &opts["debug-harvest"], + "debug-html", "debug html", &opts["debug-html"], + "debug-latex", "debug latex", &opts["debug-latex"], + "debug-manifest", "debug manifest", &opts["debug-manifest"], + "debug-metadata", "debug metadata", &opts["debug-metadata"], + "debug-pod", "debug pod", &opts["debug-pod"], + "debug-sqlite", "debug sqlite", &opts["debug-sqlite"], + "debug-stages", "debug stages", &opts["debug-stages"], // "sqlite-db-filename", "=[filename].sql.db", &settings["sqlite-db-filename"], ); if (helpInfo.helpWanted) { @@ -555,20 +583,19 @@ struct OptActions { } @trusted bool debug_do() { bool _dbg; - if (opts["debug"] - ||opts["debug-epub"] - ||opts["debug-harvest"] - ||opts["debug-html"] - ||opts["debug-latex"] - ||opts["debug-manifest"] - ||opts["debug-sqlite"] - ) { + if (opts["debug"]) { _dbg = true; } else { _dbg = false; } return _dbg; } - @trusted bool debug_do_pod() { - return (opts["debug"] || opts["debug-pod"]) ? true : false; + @trusted bool debug_do_curate() { + return (opts["debug"] || opts["debug-curate"]) ? true : false; + } + @trusted bool debug_do_curate_authors() { + return (opts["debug"] || opts["debug-curate"] || opts["debug-curate-authors"]) ? true : false; + } + @trusted bool debug_do_curate_topics() { + return (opts["debug"] || opts["debug-curate"] || opts["debug-curate-topics"]) ? true : false; } @trusted bool debug_do_epub() { return (opts["debug"] || opts["debug-epub"]) ? true : false; @@ -585,9 +612,18 @@ struct OptActions { @trusted bool debug_do_manifest() { return (opts["debug"] || opts["debug-manifest"]) ? true : false; } + @trusted bool debug_do_metadata() { + return (opts["debug"] || opts["debug-metadata"]) ? true : false; + } + @trusted bool debug_do_pod() { + return (opts["debug"] || opts["debug-pod"]) ? true : false; + } @trusted bool debug_do_sqlite() { return (opts["debug"] || opts["debug-sqlite"]) ? true : false; } + @trusted bool debug_do_stages() { + return (opts["debug"] || opts["debug-stages"]) ? true : false; + } @trusted bool debug_do_xmls() { return (opts["debug"] || opts["debug-html"] || opts["debug-epub"]) ? true : false; } @@ -648,17 +684,44 @@ struct OptActions { @trusted bool pod() { return opts["pod"]; } - @trusted bool show_summary() { - return opts["show-summary"]; + @trusted bool show_config() { + return opts["show-config"]; + } + @trusted bool show_curate() { + return opts["show-curate"]; + } + @trusted bool show_curate_authors() { + return (opts["show-curate"] || opts["show-curate-authors"] || opts["verbose"] || opts["very-verbose"]) ? true : false; + } + @trusted bool show_curate_topics() { + return (opts["show-curate"] || opts["show-curate-topics"] || opts["very-verbose"]) ? true : false; + } + @trusted bool show_epub() { + return opts["show-epub"]; + } + @trusted bool show_html() { + return opts["show-html"]; + } + @trusted bool show_latex() { + return opts["show-latex"]; } @trusted bool show_make() { return opts["show-make"]; } + @trusted bool show_manifest() { + return opts["show-manifest"]; + } @trusted bool show_metadata() { return opts["show-metadata"]; } - @trusted bool show_config() { - return opts["show-config"]; + @trusted bool show_pod() { + return opts["show-pod"]; + } + @trusted bool show_sqlite() { + return (opts["show-sqlite"] || opts["very-verbose"]) ? true : false; + } + @trusted bool show_summary() { + return (opts["show-summary"] || opts["verbose"] || opts["very-verbose"]) ? true : false; } @trusted bool source() { return opts["source"]; @@ -978,13 +1041,13 @@ if (_opt_action.show_config) { #+BEGIN_SRC d if (!(_opt_action.skip_output)) { if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { writeln("step0 commence → (without processing files)"); } outputHubOp!()(_env, _opt_action, _siteConfig); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { writeln("- step0 complete"); } @@ -1210,18 +1273,18 @@ enforce( #+NAME: spine_each_file_do_abstraction #+BEGIN_SRC d if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("--->\nstepX commence → (document abstraction)"); + writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } auto t = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); static assert(t.length==2); auto doc_abstraction = t[dAM.abstraction]; auto doc_matters = t[dAM.matters]; if ((doc_matters.opt.action.debug_do) -|| (doc_matters.opt.action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- stepX complete"); + writeln("- stepX complete for [", manifest.src.filename, "]"); } #+END_SRC @@ -1244,9 +1307,7 @@ if ((doc_matters.opt.action.debug_do) #+NAME: spine_each_file_do_debugs_checkdoc_0 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.verbose - || doc_matters.opt.action.show_summary -) { +if (doc_matters.opt.action.show_summary) { import doc_reform.meta.metadoc_show_summary; spineMetaDocSummary!()(doc_abstraction, doc_matters); } @@ -1302,7 +1363,8 @@ if (doc_matters.opt.action.curate) { hvst.curates ~= _hvst; } else { if ((doc_matters.opt.action.debug_do) - || (doc_matters.opt.action.very_verbose) + || (_opt_action.debug_do_curate) + || (doc_matters.opt.action.very_verbose) ) { writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc); } @@ -1329,15 +1391,15 @@ if (doc_matters.opt.action.debug_do) { /+ ↓ output hub +/ if (!(doc_matters.opt.action.skip_output)) { if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step5 commence → (process outputs)"); + writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } doc_abstraction.outputHub!()(doc_matters); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step5 complete"); + writeln("- step5 complete for [", manifest.src.filename, "]"); } } #+END_SRC @@ -1440,18 +1502,17 @@ if build source pod requested all information needed to build it available at th /+ ↓ read file (filename with path) +/ /+ ↓ file tuple of header and content +/ if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step1 commence → (get document header & body & insert file list & if needed image list)" - ); + writeln("step1 commence → (get document header & body & insert file list & if needed image list) [", _manifest.src.filename, "]"); } auto _header_body_insertfilelist_imagelist = spineRawMarkupContent!()(_opt_action, _manifest.src.path_and_fn); static assert(_header_body_insertfilelist_imagelist.length==4); if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step1 complete"); + writeln("- step1 complete for [", _manifest.src.filename, "]"); } debug(header_and_body) { writeln(header); @@ -1477,9 +1538,9 @@ debug(header_and_body) { #+BEGIN_SRC d /+ ↓ split header into make and meta +/ if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step2 commence → (read document header (yaml) return struct)"); + writeln("step2 commence → (read document header (yaml) return struct) [", _manifest.src.filename, "]"); } import doc_reform.meta.conf_make_meta_yaml; _make_and_meta_struct = @@ -1491,9 +1552,9 @@ _make_and_meta_struct = _cfg, ); if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step2 complete"); + writeln("- step2 complete for [", _manifest.src.filename, "]"); } #+END_SRC @@ -1514,9 +1575,9 @@ if ((_opt_action.debug_do) #+BEGIN_SRC d /+ ↓ document abstraction: process document, return abstraction as tuple +/ if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step3 commence → (document abstraction (da); da keys; segnames; doc_matters)"); + writeln("step3 commence → (document abstraction (da); da keys; segnames; doc_matters) [", _manifest.src.filename, "]"); } auto da = docAbstraction!()( _header_body_insertfilelist_imagelist[headBody.body_content], @@ -1529,9 +1590,9 @@ static assert(da.length==2); auto doc_abstraction = da[docAbst.doc_abstract_obj]; /+ head ~ toc ~ body ~ endnotes_seg ~ glossary ~ bibliography ~ bookindex ~ blurb; +/ auto _doc_has_struct = da[docAbst.doc_has]; if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step3 complete"); + writeln("- step3 complete for [", _manifest.src.filename, "]"); } #+END_SRC @@ -1545,9 +1606,9 @@ if ((_opt_action.debug_do) #+NAME: spine_each_file_do_document_matters_msg_step4_start #+BEGIN_SRC d if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step4 commence → (doc_matters)"); + writeln("step4 commence → (doc_matters) [", _manifest.src.filename, "]"); } #+END_SRC @@ -1738,9 +1799,9 @@ auto doc_matters = DocumentMatters(); #+NAME: spine_each_file_do_document_matters_msg_step4_end #+BEGIN_SRC d if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step4 complete"); + writeln("- step4 complete for [", _manifest.src.filename, "]"); } #+END_SRC diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d index 39fcafe..eb5e46a 100644 --- a/src/doc_reform/io_out/epub3.d +++ b/src/doc_reform/io_out/epub3.d @@ -365,8 +365,7 @@ template outputEPub3() { break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -374,8 +373,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -396,8 +394,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -406,8 +403,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -425,8 +421,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -466,8 +461,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -476,8 +470,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -520,8 +513,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -530,8 +522,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -542,8 +533,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d index 0227de0..2e6d0ad 100644 --- a/src/doc_reform/io_out/html.d +++ b/src/doc_reform/io_out/html.d @@ -90,8 +90,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -100,8 +99,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -120,8 +118,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -152,8 +149,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -162,8 +158,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -198,8 +193,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -208,8 +202,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -220,8 +213,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -331,8 +323,7 @@ template outputHTML() { break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -340,8 +331,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -361,8 +351,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -371,8 +360,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -390,8 +378,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -430,8 +417,7 @@ template outputHTML() { doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; } else { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -440,8 +426,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -484,8 +469,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -494,8 +478,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -506,8 +489,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } diff --git a/src/doc_reform/io_out/source_pod.d b/src/doc_reform/io_out/source_pod.d index 3b21000..4b59116 100644 --- a/src/doc_reform/io_out/source_pod.d +++ b/src/doc_reform/io_out/source_pod.d @@ -127,7 +127,8 @@ template spinePod() { pths_pod.doc_lng(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod.mkdirRecurse; } } - debug(pod) { + if (doc_matters.opt.action.debug_do_pod + && doc_matters.opt.action.verbose) { writeln(__LINE__, ": ", doc_matters.src.filename, " -> ", pths_pod.fn_doc(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod diff --git a/src/doc_reform/io_out/sqlite.d b/src/doc_reform/io_out/sqlite.d index 3acd39e..7e4d605 100644 --- a/src/doc_reform/io_out/sqlite.d +++ b/src/doc_reform/io_out/sqlite.d @@ -172,8 +172,7 @@ template SQLiteDbRun() { writeln("ERROR SQLite : ", ex); } { /+ debug +/ - if (opt_action.debug_do_sqlite - && opt_action.verbose) { + if (opt_action.debug_do_sqlite) { writeln(note); if (opt_action.very_verbose) { writeln(db_statement); @@ -221,8 +220,7 @@ template SQLiteFormatAndLoadObject() { _txt ~= _urls; } { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(_txt, "\n"); } } @@ -265,8 +263,7 @@ template SQLiteFormatAndLoadObject() { string _urls; string _txt = _html_font_face(_html_special_characters(obj.text)); { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(_txt, "\n"); } } @@ -755,8 +752,7 @@ template SQLiteFormatAndLoadObject() { "html": html_heading(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -778,8 +774,7 @@ template SQLiteFormatAndLoadObject() { "html": html_para(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -801,8 +796,7 @@ template SQLiteFormatAndLoadObject() { "html": html_quote(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -824,8 +818,7 @@ template SQLiteFormatAndLoadObject() { "html": html_group(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -847,8 +840,7 @@ template SQLiteFormatAndLoadObject() { "html": html_block(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -870,8 +862,7 @@ template SQLiteFormatAndLoadObject() { "html": html_verse(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -893,8 +884,7 @@ template SQLiteFormatAndLoadObject() { "html": html_code(obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -916,8 +906,7 @@ template SQLiteFormatAndLoadObject() { "html": html_table(doc_matters, obj) ]; { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1297,8 +1286,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1307,8 +1295,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1332,8 +1319,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1364,8 +1350,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1374,8 +1359,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1404,8 +1388,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1414,8 +1397,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1426,8 +1408,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite - && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from @@ -1436,7 +1417,10 @@ template SQLiteInsertDocObjectsLoop() { break; } if (obj.metainfo.is_a == "heading") { - if ((doc_matters.opt.action.very_verbose)) { + if (doc_matters.opt.action.show_sqlite) { + if (obj.metainfo.heading_lev_markup == 0) { + writeln(doc_matters.src.filename); + } writeln( "markup: ", obj.metainfo.heading_lev_markup, "> ", obj.metainfo.dom_structure_markedup_tags_status, diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d index d8b252e..b912c24 100644 --- a/src/doc_reform/meta/metadoc.d +++ b/src/doc_reform/meta/metadoc.d @@ -36,18 +36,17 @@ template spineAbstraction() { /+ ↓ read file (filename with path) +/ /+ ↓ file tuple of header and content +/ if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step1 commence → (get document header & body & insert file list & if needed image list)" - ); + writeln("step1 commence → (get document header & body & insert file list & if needed image list) [", _manifest.src.filename, "]"); } auto _header_body_insertfilelist_imagelist = spineRawMarkupContent!()(_opt_action, _manifest.src.path_and_fn); static assert(_header_body_insertfilelist_imagelist.length==4); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step1 complete"); + writeln("- step1 complete for [", _manifest.src.filename, "]"); } debug(header_and_body) { writeln(header); @@ -56,9 +55,9 @@ template spineAbstraction() { } /+ ↓ split header into make and meta +/ if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step2 commence → (read document header (yaml) return struct)"); + writeln("step2 commence → (read document header (yaml) return struct) [", _manifest.src.filename, "]"); } import doc_reform.meta.conf_make_meta_yaml; _make_and_meta_struct = @@ -70,15 +69,15 @@ template spineAbstraction() { _cfg, ); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step2 complete"); + writeln("- step2 complete for [", _manifest.src.filename, "]"); } /+ ↓ document abstraction: process document, return abstraction as tuple +/ if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step3 commence → (document abstraction (da); da keys; segnames; doc_matters)"); + writeln("step3 commence → (document abstraction (da); da keys; segnames; doc_matters) [", _manifest.src.filename, "]"); } auto da = docAbstraction!()( _header_body_insertfilelist_imagelist[headBody.body_content], @@ -91,14 +90,14 @@ template spineAbstraction() { auto doc_abstraction = da[docAbst.doc_abstract_obj]; /+ head ~ toc ~ body ~ endnotes_seg ~ glossary ~ bibliography ~ bookindex ~ blurb; +/ auto _doc_has_struct = da[docAbst.doc_has]; if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step3 complete"); + writeln("- step3 complete for [", _manifest.src.filename, "]"); } if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step4 commence → (doc_matters)"); + writeln("step4 commence → (doc_matters) [", _manifest.src.filename, "]"); } struct DocumentMatters { @safe auto generator_program() { @@ -241,9 +240,9 @@ template spineAbstraction() { } auto doc_matters = DocumentMatters(); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step4 complete"); + writeln("- step4 complete for [", _manifest.src.filename, "]"); } auto t = tuple(doc_abstraction, doc_matters); return t; diff --git a/src/doc_reform/meta/metadoc_curate_authors.d b/src/doc_reform/meta/metadoc_curate_authors.d index f3c1138..16669b2 100644 --- a/src/doc_reform/meta/metadoc_curate_authors.d +++ b/src/doc_reform/meta/metadoc_curate_authors.d @@ -454,7 +454,7 @@ string theme_light_1 = format(q"┃ doc_curate.title, doc_curate.path_html_metadata, doc_curate.language, - (_opt_action.very_verbose) ? "\n " ~ doc_curate.path_abs_html_scroll : "", + (_opt_action.show_curate_authors) ? "\n " ~ doc_curate.path_abs_html_scroll : "", ); } foreach (k; _au.keys.sort) { @@ -489,9 +489,7 @@ string theme_light_1 = format(q"┃ } catch (ErrnoException ex) { // Handle error } - if (_opt_action.verbose - || _opt_action.very_verbose - ) { + if (_opt_action.show_curate_authors) { foreach(_adt; _author_date_title.sort) { writeln(_adt); } diff --git a/src/doc_reform/meta/metadoc_curate_topics.d b/src/doc_reform/meta/metadoc_curate_topics.d index a8b0db0..07e1a56 100644 --- a/src/doc_reform/meta/metadoc_curate_topics.d +++ b/src/doc_reform/meta/metadoc_curate_topics.d @@ -466,7 +466,7 @@ string theme_light_1 = format(q"┃ if (k0 != "_a") { topics ~= format(q"┃<p class="lev0"><a name="%s" class="lev0">%s</a></p>┃", k0.translate([' ' : "_"]), k0,) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln("", k0); } if ("_a" in hvst.subject_trees[k0]) { @@ -495,7 +495,7 @@ string theme_light_1 = format(q"┃ t_a_.path_html_metadata, t_a_.language, ) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln("- ", t_a_.title, " - ", t_a_.author); } } @@ -508,7 +508,7 @@ string theme_light_1 = format(q"┃ topics ~= format(q"┃<p class="lev1"><a name="%s.%s" class="lev1">%s</a></p>┃", k0.translate([' ' : "_"]), k1.translate([' ' : "_"]), k1,) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" ", k1); } if ("_a" in hvst.subject_trees[k0][k1]) { @@ -537,7 +537,7 @@ string theme_light_1 = format(q"┃ t_a_.path_html_metadata, t_a_.language, ) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" - ", t_a_.title, " - ", t_a_.author); } } @@ -551,7 +551,7 @@ string theme_light_1 = format(q"┃ topics ~= format(q"┃<p class="lev2"><a name="%s.%s.%s" class="lev2">%s</a></p>┃", k0.translate([' ' : "_"]), k1.translate([' ' : "_"]), k2.translate([' ' : "_"]), k2,) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" ", k2); } if ("_a" in hvst.subject_trees[k0][k1][k2]) { @@ -580,7 +580,7 @@ string theme_light_1 = format(q"┃ t_a_.path_html_metadata, t_a_.language, ) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" - ", t_a_.title, " - ", t_a_.author); } } @@ -594,7 +594,7 @@ string theme_light_1 = format(q"┃ topics ~= format(q"┃<p class="lev3"><a name="%s.%s.%s.%s" class="lev3">%s</a></p>┃", k0.translate([' ' : "_"]), k1.translate([' ' : "_"]), k2.translate([' ' : "_"]), k3.translate([' ' : "_"]), k3,) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" ", k3); } { @@ -623,7 +623,7 @@ string theme_light_1 = format(q"┃ t_a_.path_html_metadata, t_a_.language, ) ~ "\n"; - if (_opt_action.very_verbose) { + if (_opt_action.show_curate_topics) { writeln(" - ", t_a_.title, " - ", t_a_.author); } } diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d index 97cc6b0..91184dc 100755 --- a/src/doc_reform/spine.d +++ b/src/doc_reform/spine.d @@ -116,13 +116,18 @@ string program_name = "spine"; "concordance" : false, "dark" : false, "debug" : false, - "debug-pod" : false, + "debug-curate" : false, + "debug-curate-authors" : false, + "debug-curate-topics" : false, "debug-epub" : false, "debug-harvest" : false, "debug-html" : false, "debug-latex" : false, "debug-manifest" : false, + "debug-metadata" : false, + "debug-pod" : false, "debug-sqlite" : false, + "debug-stages" : false, "digest" : false, "epub" : false, "curate" : false, @@ -148,10 +153,19 @@ string program_name = "spine"; "quiet" : false, "pod" : false, "serial" : false, - "show-summary" : false, - "show-metadata" : false, - "show-make" : false, "show-config" : false, + "show-curate" : false, + "show-curate-authors" : false, + "show-curate-topics" : false, + "show-epub" : false, + "show-html" : false, + "show-latex" : false, + "show-make" : false, + "show-manifest" : false, + "show-metadata" : false, + "show-pod" : false, + "show-sqlite" : false, + "show-summary" : false, "source" : false, "sqlite-discrete" : false, "sqlite-db-create" : false, @@ -213,14 +227,6 @@ string program_name = "spine"; "curate-authors", "extract info on authors from document header metadata", &opts["curate-authors"], "curate-topics", "extract info on topics from document header metadata", &opts["curate-topics"], "dark", "alternative dark theme", &opts["dark"], - "debug", "debug", &opts["debug"], - "debug-pod", "debug pod", &opts["debug-pod"], - "debug-epub", "debug epub", &opts["debug-epub"], - "debug-harvest", "debug harvest", &opts["debug-harvest"], - "debug-html", "debug html", &opts["debug-html"], - "debug-latex", "debug latex", &opts["debug-latex"], - "debug-manifest", "debug manifest", &opts["debug-manifest"], - "debug-sqlite", "debug sqlite", &opts["debug-sqlite"], "digest", "hash digest for each object", &opts["digest"], "epub", "process epub output", &opts["epub"], "hide-ocn", "object cite numbers", &opts["hide-ocn"], @@ -255,8 +261,17 @@ string program_name = "spine"; "serial", "serial processing", &opts["serial"], "skip-output", "skip output", &opts["skip-output"], "show-config", "show config", &opts["show-config"], + "show-curate", "show curate", &opts["show-curate"], + "show-curate-authors", "show curate authors", &opts["show-curate-authors"], + "show-curate-topics", "show curate topics", &opts["show-curate-topics"], + "show-epub", "show epub", &opts["show-epub"], + "show-html", "show html", &opts["show-html"], + "show-latex", "show latex", &opts["show-latex"], "show-make", "show make", &opts["show-make"], + "show-manifest", "show manifest", &opts["show-manifest"], "show-metadata", "show metadata", &opts["show-metadata"], + "show-pod", "show pod", &opts["show-pod"], + "show-sqlite", "show sqlite", &opts["show-sqlite"], "show-summary", "show summary", &opts["show-summary"], "source", "document markup source", &opts["source"], "set-digest", "default hash digest type (e.g. sha256)", &settings["set-digest"], @@ -284,6 +299,19 @@ string program_name = "spine"; "workon", "(reserved for some matters under development & testing)", &opts["workon"], "xhtml", "xhtml output", &opts["xhtml"], "config", "=/path/to/config/file/including/filename", &settings["config"], + "debug", "debug", &opts["debug"], + "debug-curate", "debug curate", &opts["debug-curate"], + "debug-curate-authors", "debug curate authors", &opts["debug-curate-authors"], + "debug-curate-topics", "debug curate topics", &opts["debug-curate-topics"], + "debug-epub", "debug epub", &opts["debug-epub"], + "debug-harvest", "debug harvest", &opts["debug-harvest"], + "debug-html", "debug html", &opts["debug-html"], + "debug-latex", "debug latex", &opts["debug-latex"], + "debug-manifest", "debug manifest", &opts["debug-manifest"], + "debug-metadata", "debug metadata", &opts["debug-metadata"], + "debug-pod", "debug pod", &opts["debug-pod"], + "debug-sqlite", "debug sqlite", &opts["debug-sqlite"], + "debug-stages", "debug stages", &opts["debug-stages"], // "sqlite-db-filename", "=[filename].sql.db", &settings["sqlite-db-filename"], ); if (helpInfo.helpWanted) { @@ -316,20 +344,19 @@ string program_name = "spine"; } @trusted bool debug_do() { bool _dbg; - if (opts["debug"] - ||opts["debug-epub"] - ||opts["debug-harvest"] - ||opts["debug-html"] - ||opts["debug-latex"] - ||opts["debug-manifest"] - ||opts["debug-sqlite"] - ) { + if (opts["debug"]) { _dbg = true; } else { _dbg = false; } return _dbg; } - @trusted bool debug_do_pod() { - return (opts["debug"] || opts["debug-pod"]) ? true : false; + @trusted bool debug_do_curate() { + return (opts["debug"] || opts["debug-curate"]) ? true : false; + } + @trusted bool debug_do_curate_authors() { + return (opts["debug"] || opts["debug-curate"] || opts["debug-curate-authors"]) ? true : false; + } + @trusted bool debug_do_curate_topics() { + return (opts["debug"] || opts["debug-curate"] || opts["debug-curate-topics"]) ? true : false; } @trusted bool debug_do_epub() { return (opts["debug"] || opts["debug-epub"]) ? true : false; @@ -346,9 +373,18 @@ string program_name = "spine"; @trusted bool debug_do_manifest() { return (opts["debug"] || opts["debug-manifest"]) ? true : false; } + @trusted bool debug_do_metadata() { + return (opts["debug"] || opts["debug-metadata"]) ? true : false; + } + @trusted bool debug_do_pod() { + return (opts["debug"] || opts["debug-pod"]) ? true : false; + } @trusted bool debug_do_sqlite() { return (opts["debug"] || opts["debug-sqlite"]) ? true : false; } + @trusted bool debug_do_stages() { + return (opts["debug"] || opts["debug-stages"]) ? true : false; + } @trusted bool debug_do_xmls() { return (opts["debug"] || opts["debug-html"] || opts["debug-epub"]) ? true : false; } @@ -409,17 +445,44 @@ string program_name = "spine"; @trusted bool pod() { return opts["pod"]; } - @trusted bool show_summary() { - return opts["show-summary"]; + @trusted bool show_config() { + return opts["show-config"]; + } + @trusted bool show_curate() { + return opts["show-curate"]; + } + @trusted bool show_curate_authors() { + return (opts["show-curate"] || opts["show-curate-authors"] || opts["verbose"] || opts["very-verbose"]) ? true : false; + } + @trusted bool show_curate_topics() { + return (opts["show-curate"] || opts["show-curate-topics"] || opts["very-verbose"]) ? true : false; + } + @trusted bool show_epub() { + return opts["show-epub"]; + } + @trusted bool show_html() { + return opts["show-html"]; + } + @trusted bool show_latex() { + return opts["show-latex"]; } @trusted bool show_make() { return opts["show-make"]; } + @trusted bool show_manifest() { + return opts["show-manifest"]; + } @trusted bool show_metadata() { return opts["show-metadata"]; } - @trusted bool show_config() { - return opts["show-config"]; + @trusted bool show_pod() { + return opts["show-pod"]; + } + @trusted bool show_sqlite() { + return (opts["show-sqlite"] || opts["very-verbose"]) ? true : false; + } + @trusted bool show_summary() { + return (opts["show-summary"] || opts["verbose"] || opts["very-verbose"]) ? true : false; } @trusted bool source() { return opts["source"]; @@ -720,13 +783,13 @@ string program_name = "spine"; } if (!(_opt_action.skip_output)) { if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { writeln("step0 commence → (without processing files)"); } outputHubOp!()(_env, _opt_action, _siteConfig); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { writeln("- step0 complete"); } @@ -924,23 +987,21 @@ string program_name = "spine"; manifest.src.filename ~ "»" ); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("--->\nstepX commence → (document abstraction)"); + writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } auto t = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); static assert(t.length==2); auto doc_abstraction = t[dAM.abstraction]; auto doc_matters = t[dAM.matters]; if ((doc_matters.opt.action.debug_do) - || (doc_matters.opt.action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- stepX complete"); + writeln("- stepX complete for [", manifest.src.filename, "]"); } /+ ↓ debugs +/ - if (doc_matters.opt.action.verbose - || doc_matters.opt.action.show_summary - ) { + if (doc_matters.opt.action.show_summary) { import doc_reform.meta.metadoc_show_summary; spineMetaDocSummary!()(doc_abstraction, doc_matters); } @@ -968,7 +1029,8 @@ string program_name = "spine"; hvst.curates ~= _hvst; } else { if ((doc_matters.opt.action.debug_do) - || (doc_matters.opt.action.very_verbose) + || (_opt_action.debug_do_curate) + || (doc_matters.opt.action.very_verbose) ) { writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc); } @@ -981,15 +1043,15 @@ string program_name = "spine"; /+ ↓ output hub +/ if (!(doc_matters.opt.action.skip_output)) { if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step5 commence → (process outputs)"); + writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } doc_abstraction.outputHub!()(doc_matters); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step5 complete"); + writeln("- step5 complete for [", manifest.src.filename, "]"); } } scope(exit) { @@ -1038,23 +1100,21 @@ string program_name = "spine"; manifest.src.filename ~ "»" ); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("--->\nstepX commence → (document abstraction)"); + writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } auto t = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); static assert(t.length==2); auto doc_abstraction = t[dAM.abstraction]; auto doc_matters = t[dAM.matters]; if ((doc_matters.opt.action.debug_do) - || (doc_matters.opt.action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- stepX complete"); + writeln("- stepX complete for [", manifest.src.filename, "]"); } /+ ↓ debugs +/ - if (doc_matters.opt.action.verbose - || doc_matters.opt.action.show_summary - ) { + if (doc_matters.opt.action.show_summary) { import doc_reform.meta.metadoc_show_summary; spineMetaDocSummary!()(doc_abstraction, doc_matters); } @@ -1082,7 +1142,8 @@ string program_name = "spine"; hvst.curates ~= _hvst; } else { if ((doc_matters.opt.action.debug_do) - || (doc_matters.opt.action.very_verbose) + || (_opt_action.debug_do_curate) + || (doc_matters.opt.action.very_verbose) ) { writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc); } @@ -1095,15 +1156,15 @@ string program_name = "spine"; /+ ↓ output hub +/ if (!(doc_matters.opt.action.skip_output)) { if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("step5 commence → (process outputs)"); + writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } doc_abstraction.outputHub!()(doc_matters); if ((_opt_action.debug_do) - || (_opt_action.very_verbose) + || (_opt_action.debug_do_stages) ) { - writeln("- step5 complete"); + writeln("- step5 complete for [", manifest.src.filename, "]"); } } scope(exit) { |