From 20a36744ada25bf063199a24fe3eebe85f056235 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 23 Feb 2022 15:11:39 -0500 Subject: verbosity level, "vox_gt[lv]" (voice greater than) --- org/spine.org | 59 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) (limited to 'org/spine.org') diff --git a/org/spine.org b/org/spine.org index 1e382e3..59e178c 100644 --- a/org/spine.org +++ b/org/spine.org @@ -83,7 +83,7 @@ string program_name = "spine"; } } else { // note cannot parallelise sqlite shared db foreach(manifest; _manifests[1..$]) { - if (_opt_action.very_verbose) { + if (_opt_action.vox_gt2) { writeln("parallelisation off: actions include sqlite shared db"); } if (!empty(manifest.src.filename)) { @@ -105,7 +105,7 @@ string program_name = "spine"; if (_opt_action.curate_authors) { spineMetaDocCuratesAuthors!()(hvst.curates, _make_and_meta_struct, _opt_action); } - if (!(_opt_action.quiet)) { + if (_opt_action.vox_gt0) { import doc_reform.io_out.paths_output; auto out_pth = spinePathsHTML!()(_make_and_meta_struct.conf.output_path, ""); if (_opt_action.curate_authors) { @@ -115,7 +115,7 @@ string program_name = "spine"; writeln("- ", out_pth.curate("topics.html")); } } - } else { writeln("NO HARVESTS"); } + } else { writeln("NO METADATA CURATED"); } } #+END_SRC @@ -368,7 +368,6 @@ bool[string] opts = [ "parallel-subprocesses" : false, "pdf" : false, "pdf-color-links" : false, - "quiet" : false, "pod" : false, "serial" : false, "show-config" : false, @@ -393,8 +392,9 @@ bool[string] opts = [ "sqlite-insert" : false, "sqlite-update" : false, "text" : false, - "verbose" : false, - "very-verbose" : false, + "vox_is0" : false, + "vox_gt1" : false, + "vox_gt2" : false, "xhtml" : false, "section_toc" : true, "section_body" : true, @@ -455,9 +455,9 @@ auto helpInfo = getopt(args, "cgi-search-title", "if generating a cgi search form the title to use for it", &settings["cgi-search-title"], "cgi-sqlite-search-filename", "=[filename] default is spine-search", &settings["cgi-sqlite-search-filename"], "concordance", "file for document", &opts["concordance"], - "curate", "extract info on authors & topics from document header metadata", &opts["curate"], - "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"], + "curate", "extract info on authors & topics from document header metadata", &opts["curate"], + "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"], "digest", "hash digest for each object", &opts["digest"], "epub", "process epub output", &opts["epub"], @@ -481,7 +481,7 @@ auto helpInfo = getopt(args, "pdf", "latex output for pdfs", &opts["pdf"], "pdf-color-links", "mono or color links for pdfs", &opts["pdf-color-links"], "pod", "spine (doc reform) pod source content bundled", &opts["pod"], - "quiet|q", "output to terminal", &opts["quiet"], + "quiet|q", "output to terminal", &opts["vox_is0"], "section-backmatter", "document backmatter (default)" , &opts["backmatter"], "section-biblio", "document biblio (default)", &opts["section_biblio"], "section-blurb", "document blurb (default)", &opts["section_blurb"], @@ -526,8 +526,8 @@ auto helpInfo = getopt(args, "theme-dark", "alternative dark theme", &opts["theme-dark"], "theme-light", "default light theme", &opts["theme-light"], "txt", "text output", &opts["text"], - "verbose|v", "output to terminal", &opts["verbose"], - "very-verbose", "output to terminal", &opts["very-verbose"], + "verbose|v", "output to terminal", &opts["vox_gt1"], + "very-verbose", "output to terminal", &opts["vox_gt2"], "workon", "(reserved for some matters under development & testing)", &opts["workon"], "xhtml", "xhtml output", &opts["xhtml"], "config", "=/path/to/config/file/including/filename", &settings["config"], @@ -678,9 +678,6 @@ struct OptActions { @trusted bool ocn_off() { return opts["ocn-off"]; } - @trusted bool quiet() { - return opts["quiet"]; - } @trusted bool pod() { return opts["pod"]; } @@ -691,10 +688,10 @@ struct OptActions { return opts["show-curate"]; } @trusted bool show_curate_authors() { - return (opts["show-curate"] || opts["show-curate-authors"] || opts["verbose"] || opts["very-verbose"]) ? true : false; + return (opts["show-curate"] || opts["show-curate-authors"] || opts["vox_gt1"] || opts["vox_gt2"]) ? true : false; } @trusted bool show_curate_topics() { - return (opts["show-curate"] || opts["show-curate-topics"] || opts["very-verbose"]) ? true : false; + return (opts["show-curate"] || opts["show-curate-topics"] || opts["vox_gt2"]) ? true : false; } @trusted bool show_epub() { return opts["show-epub"]; @@ -718,10 +715,10 @@ struct OptActions { return opts["show-pod"]; } @trusted bool show_sqlite() { - return (opts["show-sqlite"] || opts["very-verbose"]) ? true : false; + return (opts["show-sqlite"] || opts["vox_gt2"]) ? true : false; } @trusted bool show_summary() { - return (opts["show-summary"] || opts["verbose"] || opts["very-verbose"]) ? true : false; + return (opts["show-summary"] || opts["vox_gt1"] || opts["vox_gt2"]) ? true : false; } @trusted bool source() { return opts["source"]; @@ -753,14 +750,20 @@ struct OptActions { || opts["sqlite-update"] ) ? true : false; } - @trusted bool text() { - return opts["text"]; + @trusted bool vox_is0() { // --quiet -q + return opts["vox_is0"]; + } + @trusted bool vox_gt0() { // normal, minimal, without flag + return (!(opts["vox_is0"]) || opts["vox_gt1"] || opts["vox_gt2"]) ? true : false; } - @trusted bool verbose() { - return (opts["verbose"] || opts["very-verbose"]) ? true : false; + @trusted bool vox_gt1() { // -- verbose -v + return (opts["vox_gt1"] || opts["vox_gt2"]) ? true : false; } - @trusted bool very_verbose() { - return opts["very-verbose"]; + @trusted bool vox_gt2() { // --very-verbose + return opts["vox_gt2"]; + } + @trusted bool text() { + return opts["text"]; } @trusted bool xhtml() { return opts["xhtml"]; @@ -1240,7 +1243,7 @@ foreach(arg; args[1..$]) { #+NAME: spine_each_file_do_scope #+BEGIN_SRC d scope(success) { - if (!(_opt_action.quiet)) { + if (_opt_action.vox_gt0) { writefln( "%s", "-- ~ document complete, ok ~ ------------------------------------", @@ -1364,7 +1367,7 @@ if (doc_matters.opt.action.curate) { } else { if ((doc_matters.opt.action.debug_do) || (_opt_action.debug_do_curate) - || (doc_matters.opt.action.very_verbose) + || (doc_matters.opt.action.vox_gt2) ) { writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc); } @@ -1409,7 +1412,7 @@ if (!(doc_matters.opt.action.skip_output)) { #+NAME: spine_each_file_do_scope_exit #+BEGIN_SRC d scope(exit) { - if (!(_opt_action.quiet)) { + if (_opt_action.vox_gt0) { writefln( "processed file: %s [%s]", manifest.src.filename, -- cgit v1.2.3