From 8757dfd0fd175698b2bdf61ae49875080b8e1612 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 21 Feb 2022 12:48:35 -0500 Subject: debug flags, narrow purpose --- org/spine.org | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) (limited to 'org/spine.org') diff --git a/org/spine.org b/org/spine.org index da5418d..ae78e86 100644 --- a/org/spine.org +++ b/org/spine.org @@ -334,6 +334,13 @@ bool[string] opts = [ "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, @@ -439,6 +446,13 @@ auto helpInfo = getopt(args, "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"], @@ -540,7 +554,42 @@ struct OptActions { 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"]; -- cgit v1.2.3