aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-02-21 12:48:35 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-02-21 14:05:24 -0500
commit8757dfd0fd175698b2bdf61ae49875080b8e1612 (patch)
treef3afdbc0bfb2902b4ba826e90e67c7cac1641307 /src/doc_reform
parentcgi search housekeeping, sync & remove redundancy (diff)
debug flags, narrow purpose
Diffstat (limited to 'src/doc_reform')
-rw-r--r--src/doc_reform/io_out/epub3.d38
-rw-r--r--src/doc_reform/io_out/html.d36
-rw-r--r--src/doc_reform/io_out/latex.d10
-rw-r--r--src/doc_reform/io_out/source_pod.d12
-rw-r--r--src/doc_reform/io_out/sqlite.d38
-rw-r--r--src/doc_reform/io_out/xmls.d2
-rwxr-xr-xsrc/doc_reform/spine.d51
7 files changed, 118 insertions, 69 deletions
diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d
index 8a8b9e4..39fcafe 100644
--- a/src/doc_reform/io_out/epub3.d
+++ b/src/doc_reform/io_out/epub3.d
@@ -365,7 +365,7 @@ template outputEPub3() {
break;
case 8: .. case 9:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
@@ -374,7 +374,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup);
}
@@ -396,7 +396,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -406,7 +406,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -425,7 +425,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -466,7 +466,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -476,7 +476,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -520,7 +520,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -530,7 +530,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -542,7 +542,7 @@ template outputEPub3() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_epub
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
}
@@ -626,7 +626,7 @@ template outputEPub3() {
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
- (doc_matters.opt.action.debug_do)
+ (doc_matters.opt.action.debug_do_epub)
? zip_data.write(contents.dup)
: zip_data.write(contents.dup
.replaceAll(rgx.spaces_line_start, "")
@@ -642,7 +642,7 @@ template outputEPub3() {
pth_epub3.base.mkdirRecurse;
}
{ /+ debug +/
- if (doc_matters.opt.action.debug_do) {
+ if (doc_matters.opt.action.debug_do_epub) {
if (!exists(pth_epub3.dbg_doc_meta_inf(doc_matters.src.filename))) {
pth_epub3.dbg_doc_meta_inf(doc_matters.src.filename).mkdirRecurse;
}
@@ -661,7 +661,7 @@ template outputEPub3() {
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
{ /+ debug +/
- if (doc_matters.opt.action.debug_do) {
+ if (doc_matters.opt.action.debug_do_epub) {
string fn_dbg = pth_epub3.dbg_fn_oebps_content_xhtml(doc_matters.src.filename, seg_filename);
auto f = File(fn_dbg, "w");
foreach (docseg; epub_write.doc_epub3[seg_filename]) {
@@ -691,7 +691,7 @@ template outputEPub3() {
File f;
{ /+ mimetypes (identify zip file type) +/
{ /+ debug +/
- if (doc_matters.opt.action.debug_do) {
+ if (doc_matters.opt.action.debug_do_epub) {
fn_dbg = pth_epub3.dbg_fn_mimetypes(doc_matters.src.filename);
File(fn_dbg, "w").writeln(epub_write.mimetypes);
}
@@ -701,7 +701,7 @@ template outputEPub3() {
}
{ /+ META-INF/container.xml (identify doc root) +/
{ /+ debug +/
- if (doc_matters.opt.action.debug_do) {
+ if (doc_matters.opt.action.debug_do_epub) {
fn_dbg = pth_epub3.dbg_fn_dmi_container_xml(doc_matters.src.filename);
File(fn_dbg, "w").writeln(epub_write.meta_inf_container_xml);
}
@@ -711,7 +711,7 @@ template outputEPub3() {
}
{ /+ OEBPS/toc_nav.xhtml (navigation toc epub3) +/
{ /+ debug +/
- if (doc_matters.opt.action.debug_do) {
+ if (doc_matters.opt.action.debug_do_epub) {
fn_dbg = pth_epub3.dbg_fn_oebps_toc_nav_xhtml(doc_matters.src.filename);
File(fn_dbg, "w").writeln(epub_write.oebps_toc_nav_xhtml);
}
@@ -721,7 +721,7 @@ template outputEPub3() {
}
{ /+ OEBPS/content.opf (doc manifest) +/
{ /+ debug +/
- if (doc_matters.opt.action.debug_do) {
+ if (doc_matters.opt.action.debug_do_epub) {
fn_dbg = pth_epub3.dbg_fn_oebps_content_opf(doc_matters.src.filename);
File(fn_dbg, "w").writeln(epub_write.oebps_content_opf);
}
@@ -732,7 +732,7 @@ template outputEPub3() {
{ /+ OEBPS/_dr/image (images) +/
foreach (image; doc_matters.srcs.image_list) {
{ /+ debug +/
- if (doc_matters.opt.action.debug_do) {
+ if (doc_matters.opt.action.debug_do_epub) {
if (doc_matters.opt.action.very_verbose) {
writeln(
doc_matters.src.image_dir_path, "/", image, " -> ",
@@ -763,7 +763,7 @@ template outputEPub3() {
{ /+ OEBPS/epub.css +/
auto css = spineCss(doc_matters);
{ /+ debug +/
- if (doc_matters.opt.action.debug_do) {
+ if (doc_matters.opt.action.debug_do_epub) {
fn_dbg = pth_epub3.dbg_fn_oebps_css(doc_matters.src.filename);
File(fn_dbg, "w").writeln(css.epub);
}
diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d
index 4efc91d..0227de0 100644
--- a/src/doc_reform/io_out/html.d
+++ b/src/doc_reform/io_out/html.d
@@ -90,7 +90,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -100,7 +100,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -120,7 +120,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -152,7 +152,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -162,7 +162,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -198,7 +198,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -208,7 +208,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -220,7 +220,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
@@ -331,7 +331,7 @@ template outputHTML() {
break;
case 8: .. case 9:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
@@ -340,7 +340,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup);
}
@@ -361,7 +361,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -371,7 +371,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -390,7 +390,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -430,7 +430,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
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -440,7 +440,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -484,7 +484,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -494,7 +494,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -506,7 +506,7 @@ template outputHTML() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_html
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
}
diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d
index 088ffbd..e876eab 100644
--- a/src/doc_reform/io_out/latex.d
+++ b/src/doc_reform/io_out/latex.d
@@ -1110,9 +1110,9 @@ string table(O,M)(
stringstyle=\color[rgb]{0.627,0.126,0.941},
}
┃",
- doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.name_and_version.strip,
- doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.compiler.strip,
- doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.stime.strip,
+ doc_matters.opt.action.debug_do_latex ? "" : doc_matters.generator_program.name_and_version.strip,
+ doc_matters.opt.action.debug_do_latex ? "" : doc_matters.generator_program.compiler.strip,
+ doc_matters.opt.action.debug_do_latex ? "" : doc_matters.generator_program.stime.strip,
doc_matters.generator_program.project_name.strip,
doc_matters.generator_program.url_home.strip,
paper_size_orientation_latex.strip,
@@ -1275,7 +1275,7 @@ string table(O,M)(
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_latex
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
@@ -1313,7 +1313,7 @@ string table(O,M)(
auto pth_latex = spinePathsLaTeX(doc_matters);
try {
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_latex
&& doc_matters.opt.action.verbose) {
writeln(latex_content.head);
writeln(latex_content.content);
diff --git a/src/doc_reform/io_out/source_pod.d b/src/doc_reform/io_out/source_pod.d
index ed819fe..5da5a0a 100644
--- a/src/doc_reform/io_out/source_pod.d
+++ b/src/doc_reform/io_out/source_pod.d
@@ -161,7 +161,7 @@ template spinePod() {
zip = pod_archive("file_path_bin", fn_src_in, fn_src_out_pod_zip_base, zip);
}
} else {
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_pod
&& doc_matters.opt.action.verbose) {
writeln("WARNING (io) src out NOT found (image): ", fn_src_in);
}
@@ -188,7 +188,7 @@ template spinePod() {
zip = pod_archive("file_path_text", fn_src_in, fn_src_out_pod_zip_base, zip);
}
} else {
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_pod
&& doc_matters.opt.action.verbose) {
writeln("WARNING (io) src out NOT found (document make): ", fn_src_in);
}
@@ -215,7 +215,7 @@ template spinePod() {
= File(pths_pod.fn_pod_filelist(doc_matters.src.filename).filesystem_open_zpod, "w");
Node _pmy;
string _pm = "doc:\n filename: " ~ doc_matters.src.filename ~ "\n language: " ~ doc_matters.pod.manifest_list_of_languages.to!string ~ "\n";
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_pod
&& doc_matters.opt.action.verbose) {
try {
_pmy = Loader.fromString(_pm).load();
@@ -278,7 +278,7 @@ template spinePod() {
}
}
} else {
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_pod
&& doc_matters.opt.action.verbose) {
writeln("WARNING (io) src in NOT found (markup source): ", fn_src_in);
}
@@ -321,7 +321,7 @@ template spinePod() {
zip = pod_archive("file_path_text", _pth_mkup_src_in, _pth_mkup_src_out, zip);
}
} else {
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_pod
&& doc_matters.opt.action.verbose) {
writeln("WARNING (io) src out NOT found (insert file): ", _pth_mkup_src_in);
}
@@ -353,7 +353,7 @@ template spinePod() {
zip = pod_archive("file_path_text", fn_src_in, fn_src_out_pod_zip_base, zip);
}
} else {
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_pod
&& doc_matters.opt.action.verbose) {
writeln("WARNING (io) src out NOT found (insert file): ", fn_src_in);
}
diff --git a/src/doc_reform/io_out/sqlite.d b/src/doc_reform/io_out/sqlite.d
index f79a66e..3acd39e 100644
--- a/src/doc_reform/io_out/sqlite.d
+++ b/src/doc_reform/io_out/sqlite.d
@@ -172,7 +172,7 @@ template SQLiteDbRun() {
writeln("ERROR SQLite : ", ex);
}
{ /+ debug +/
- if (opt_action.debug_do
+ if (opt_action.debug_do_sqlite
&& opt_action.verbose) {
writeln(note);
if (opt_action.very_verbose) {
@@ -221,7 +221,7 @@ template SQLiteFormatAndLoadObject() {
_txt ~= _urls;
}
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(_txt, "\n");
}
@@ -265,7 +265,7 @@ template SQLiteFormatAndLoadObject() {
string _urls;
string _txt = _html_font_face(_html_special_characters(obj.text));
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(_txt, "\n");
}
@@ -755,7 +755,7 @@ template SQLiteFormatAndLoadObject() {
"html": html_heading(doc_matters, obj)
];
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
debug(sql_txt) {
writeln(obj_txt["text"]);
@@ -778,7 +778,7 @@ template SQLiteFormatAndLoadObject() {
"html": html_para(doc_matters, obj)
];
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
debug(sql_txt) {
writeln(obj_txt["text"]);
@@ -801,7 +801,7 @@ template SQLiteFormatAndLoadObject() {
"html": html_quote(doc_matters, obj)
];
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
debug(sql_txt) {
writeln(obj_txt["text"]);
@@ -824,7 +824,7 @@ template SQLiteFormatAndLoadObject() {
"html": html_group(doc_matters, obj)
];
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
debug(sql_txt) {
writeln(obj_txt["text"]);
@@ -847,7 +847,7 @@ template SQLiteFormatAndLoadObject() {
"html": html_block(doc_matters, obj)
];
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
debug(sql_txt) {
writeln(obj_txt["text"]);
@@ -870,7 +870,7 @@ template SQLiteFormatAndLoadObject() {
"html": html_verse(doc_matters, obj)
];
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
debug(sql_txt) {
writeln(obj_txt["text"]);
@@ -893,7 +893,7 @@ template SQLiteFormatAndLoadObject() {
"html": html_code(obj)
];
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
debug(sql_txt) {
writeln(obj_txt["text"]);
@@ -916,7 +916,7 @@ template SQLiteFormatAndLoadObject() {
"html": html_table(doc_matters, obj)
];
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
debug(sql_txt) {
writeln(obj_txt["text"]);
@@ -1297,7 +1297,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -1307,7 +1307,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -1332,7 +1332,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -1364,7 +1364,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -1374,7 +1374,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -1404,7 +1404,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
}
@@ -1414,7 +1414,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type);
}
@@ -1426,7 +1426,7 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
{ /+ debug +/
- if (doc_matters.opt.action.debug_do
+ if (doc_matters.opt.action.debug_do_sqlite
&& doc_matters.opt.action.verbose) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d
index 86d012a..5ad5724 100644
--- a/src/doc_reform/io_out/xmls.d
+++ b/src/doc_reform/io_out/xmls.d
@@ -219,7 +219,7 @@ template outputXHTMLs() {
special_characters_text(doc_matters.conf_make_meta.meta.date_modified),
doc_matters.src.language,
special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright),
- doc_matters.opt.action.debug_do ? "" : special_characters_text(doc_matters.generator_program.name_and_version),
+ doc_matters.opt.action.debug_do_xmls ? "" : special_characters_text(doc_matters.generator_program.name_and_version),
special_characters_text(doc_matters.generator_program.url_home),
);
return o;
diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d
index aacdaab..97cc6b0 100755
--- a/src/doc_reform/spine.d
+++ b/src/doc_reform/spine.d
@@ -116,6 +116,13 @@ string program_name = "spine";
"concordance" : false,
"dark" : false,
"debug" : false,
+ "debug-pod" : false,
+ "debug-epub" : false,
+ "debug-harvest" : false,
+ "debug-html" : false,
+ "debug-latex" : false,
+ "debug-manifest" : false,
+ "debug-sqlite" : false,
"digest" : false,
"epub" : false,
"curate" : false,
@@ -207,6 +214,13 @@ string program_name = "spine";
"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"],
@@ -301,7 +315,42 @@ string program_name = "spine";
return _is_light;
}
@trusted bool debug_do() {
- return opts["debug"];
+ bool _dbg;
+ if (opts["debug"]
+ ||opts["debug-epub"]
+ ||opts["debug-harvest"]
+ ||opts["debug-html"]
+ ||opts["debug-latex"]
+ ||opts["debug-manifest"]
+ ||opts["debug-sqlite"]
+ ) {
+ _dbg = true;
+ } else { _dbg = false; }
+ return _dbg;
+ }
+ @trusted bool debug_do_pod() {
+ return (opts["debug"] || opts["debug-pod"]) ? true : false;
+ }
+ @trusted bool debug_do_epub() {
+ return (opts["debug"] || opts["debug-epub"]) ? true : false;
+ }
+ @trusted bool debug_do_harvest() {
+ return (opts["debug"] || opts["debug-harvest"]) ? true : false;
+ }
+ @trusted bool debug_do_html() {
+ return (opts["debug"] || opts["debug-html"]) ? true : false;
+ }
+ @trusted bool debug_do_latex() {
+ return (opts["debug"] || opts["debug-latex"]) ? true : false;
+ }
+ @trusted bool debug_do_manifest() {
+ return (opts["debug"] || opts["debug-manifest"]) ? true : false;
+ }
+ @trusted bool debug_do_sqlite() {
+ return (opts["debug"] || opts["debug-sqlite"]) ? true : false;
+ }
+ @trusted bool debug_do_xmls() {
+ return (opts["debug"] || opts["debug-html"] || opts["debug-epub"]) ? true : false;
}
@trusted bool digest() {
return opts["digest"];