diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2022-02-23 15:11:39 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2022-02-25 19:41:09 -0500 |
commit | 20a36744ada25bf063199a24fe3eebe85f056235 (patch) | |
tree | 1f00bcdb4137ce2eb0030f4f44fb0c57053aed58 | |
parent | rethink verbose & debug flags, introduce show (diff) |
verbosity level, "vox_gt[lv]" (voice greater than)
-rw-r--r-- | org/default_paths.org | 2 | ||||
-rw-r--r-- | org/default_shared.org | 4 | ||||
-rw-r--r-- | org/in_source_files.org | 2 | ||||
-rw-r--r-- | org/out_latex.org | 6 | ||||
-rw-r--r-- | org/out_metadata.org | 10 | ||||
-rw-r--r-- | org/out_odt.org | 4 | ||||
-rw-r--r-- | org/out_sqlite.org | 10 | ||||
-rw-r--r-- | org/out_src_pod.org | 20 | ||||
-rw-r--r-- | org/out_xmls.org | 12 | ||||
-rw-r--r-- | org/output_hub.org | 10 | ||||
-rw-r--r-- | org/output_show.org | 2 | ||||
-rw-r--r-- | org/spine.org | 59 | ||||
-rw-r--r-- | src/doc_reform/io_in/paths_source.d | 2 | ||||
-rw-r--r-- | src/doc_reform/io_in/read_config_files.d | 2 | ||||
-rw-r--r-- | src/doc_reform/io_out/epub3.d | 4 | ||||
-rw-r--r-- | src/doc_reform/io_out/html.d | 6 | ||||
-rw-r--r-- | src/doc_reform/io_out/hub.d | 10 | ||||
-rw-r--r-- | src/doc_reform/io_out/latex.d | 6 | ||||
-rw-r--r-- | src/doc_reform/io_out/metadata.d | 10 | ||||
-rw-r--r-- | src/doc_reform/io_out/odt.d | 4 | ||||
-rw-r--r-- | src/doc_reform/io_out/source_pod.d | 20 | ||||
-rw-r--r-- | src/doc_reform/io_out/sqlite.d | 10 | ||||
-rw-r--r-- | src/doc_reform/io_out/xmls.d | 2 | ||||
-rw-r--r-- | src/doc_reform/meta/metadoc_show_summary.d | 2 | ||||
-rw-r--r-- | src/doc_reform/share/defaults.d | 4 | ||||
-rwxr-xr-x | src/doc_reform/spine.d | 65 |
26 files changed, 147 insertions, 141 deletions
diff --git a/org/default_paths.org b/org/default_paths.org index b9c9ce6..4b996bc 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -78,7 +78,7 @@ template PodManifest() { _manifest_path = m.captures["podpath"]; } } else { - if (_opt_action.verbose || _opt_action.very_verbose || _opt_action.debug_do) { + if (_opt_action.vox_gt1 || _opt_action.debug_do) { writeln("WARNING, src is not a pod, issue with manifest_path: ", _pth); // remove? unless can distinguish pod } _manifest_path = ""; diff --git a/org/default_shared.org b/org/default_shared.org index 6c99d61..af850a0 100644 --- a/org/default_shared.org +++ b/org/default_shared.org @@ -39,12 +39,12 @@ template Msg() { @safe auto Msg(I)(I doc_matters) { struct Msg_ { void v()(string message) { - if (!(doc_matters.opt.action.quiet) && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.vox_gt1) { writeln(message); } } void vv()(string message) { - if (!(doc_matters.opt.action.quiet) && doc_matters.opt.action.very_verbose) { + if (doc_matters.opt.action.vox_gt2) { writeln(message); } } diff --git a/org/in_source_files.org b/org/in_source_files.org index ef4cafd..6916f52 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -141,7 +141,7 @@ webserv: try { if (exists(conf_file)) { if (conf_file.getLinkAttributes.attrIsFile) { - if (_opt_action.verbose || _opt_action.very_verbose || _opt_action.debug_do) { + if (_opt_action.vox_gt1 || _opt_action.debug_do) { writeln("config file used: \"", conf_file, "\" (cli flag settings override config file's individual settings)"); } config_file_str = conf_file.readText; diff --git a/org/out_latex.org b/org/out_latex.org index fcd5061..d24dc31 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -133,7 +133,7 @@ void writeOutputLaTeX(T,M)( try { { /+ debug +/ if (doc_matters.opt.action.debug_do_latex - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln(latex_content.head); writeln(latex_content.content); writeln(latex_content.tail); @@ -142,7 +142,7 @@ void writeOutputLaTeX(T,M)( if (!exists(pth_latex.latex_path_stuff)) { (pth_latex.latex_path_stuff).mkdirRecurse; } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_latex.latex_file_with_path(paper_size_orientation)); } auto f = File(pth_latex.latex_file_with_path(paper_size_orientation), "w"); @@ -1905,7 +1905,7 @@ case "backmatter": default: { /+ debug +/ if (doc_matters.opt.action.debug_do_latex - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); diff --git a/org/out_metadata.org b/org/out_metadata.org index c5eddc5..3662700 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -96,7 +96,7 @@ if (doc_matters.opt.action.html_curate_link) { metadata_ ~= "</div>" ~ inline_search_form(doc_matters) ~ "</div><hr />"; if (!(doc_matters.conf_make_meta.meta.title_full.empty)) { metadata_ ~= "<p class=\"lev0\">Title: <b><a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">" ~ doc_matters.conf_make_meta.meta.title_full ~ "</a></b></p>"; -} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { +} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("ERROR no Title information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.creator_author.empty)) { @@ -107,18 +107,18 @@ if (!(doc_matters.conf_make_meta.meta.creator_author.empty)) { metadata_ ~= "<p class=\"lev1\">Author: <b>" ~ doc_matters.conf_make_meta.meta.creator_author ~ "</b></p>"; } -} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { +} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("ERROR no Author information provided in document header ", doc_matters.src.filename_base); } metadata_ ~= "<p class=\"lev1\">Published: " ~ doc_matters.conf_make_meta.meta.date_published ~ "</p>"; if (!(doc_matters.conf_make_meta.meta.rights_copyright.empty)) { metadata_ ~= "<p class=\"lev1\">Copyright: " ~ doc_matters.conf_make_meta.meta.rights_copyright ~ "</p>"; -} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { +} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("WARNING no Copyright information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.rights_license.empty)) { metadata_ ~= "<p class=\"lev1\">License: " ~ doc_matters.conf_make_meta.meta.rights_license ~ "</p>"; -} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { +} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("WARNING no License information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.notes_summary.empty)) { @@ -254,7 +254,7 @@ metadata_write_output(doc_matters, metadata_); } catch (ErrnoException ex) { // Handle error } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_html.fn_scroll("metadata." ~ doc_matters.src.filename)); } } diff --git a/org/out_odt.org b/org/out_odt.org index 4ec4166..a7f490a 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -962,7 +962,7 @@ void writeOutputODT(W,I)( } } } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_odt.odt_file); } } catch (ErrnoException ex) { @@ -2413,7 +2413,7 @@ void dirtree(I)( default: { /+ debug +/ if (doc_matters.opt.action.debug_do - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 113a7c6..cfe7892 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -92,7 +92,7 @@ template SQLiteHubBuildTablesAndPopulate() { M doc_matters, ) { <<sqlite_db_statement_composite_collection>> - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file); } } @@ -122,7 +122,7 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { M doc_matters, ) { <<sqlite_db_statement_composite_discrete>> - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file(doc_matters.src.filename)); } } @@ -160,7 +160,7 @@ template SQLiteDbRun() { { /+ debug +/ if (opt_action.debug_do_sqlite) { writeln(note); - if (opt_action.very_verbose) { + if (opt_action.vox_gt2) { writeln(db_statement); } } @@ -350,7 +350,7 @@ template SQLiteTablesCreate() { ? config.conf.w_srv_db_sqlite_path : ""; if (db_filename.length > 0 && db_path.length > 0) { - if ((opt_action.verbose)) { + if ((opt_action.vox_gt1)) { writeln("db name & path: ", db_path, db_filename); } auto pth_sqlite = spinePathsSQLite!()(db_filename, db_path); @@ -774,7 +774,7 @@ string inline_links(M,O)( ); } } else { - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln( "WARNING on internal document links, anchor to link <<" ~ m.captures["hash"] diff --git a/org/out_src_pod.org b/org/out_src_pod.org index a63bdba..3536687 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -119,7 +119,7 @@ if (!exists(pths_pod.pod_dir_())) { pths_pod.pod_dir_().mkdirRecurse; } if (doc_matters.opt.action.source_or_pod) { - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pths_pod.fn_pod_filelist(doc_matters.src.filename).filesystem_open_zpod); } if (!exists(pths_pod.text_root(doc_matters.src.filename).filesystem_open_zpod)) { @@ -148,7 +148,7 @@ if (doc_matters.opt.action.source_or_pod) { #+NAME: source_pod_archive_prepare_for_zip #+BEGIN_SRC d if (doc_matters.opt.action.debug_do_pod -&& doc_matters.opt.action.verbose) { +&& doc_matters.opt.action.vox_gt1) { writeln(__LINE__, ": ", doc_matters.src.filename, " -> ", pths_pod.fn_doc(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod @@ -183,7 +183,7 @@ auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src out NOT found (image): ", fn_src_in); } } @@ -210,7 +210,7 @@ auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src out NOT found (document make): ", fn_src_in); } } @@ -237,7 +237,7 @@ auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; 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_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { try { _pmy = Loader.fromString(_pm).load(); } catch (ErrnoException ex) { @@ -300,7 +300,7 @@ auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src in NOT found (markup source): ", fn_src_in); } } @@ -343,7 +343,7 @@ auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src out NOT found (insert file): ", _pth_mkup_src_in); } } @@ -375,7 +375,7 @@ auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src out NOT found (insert file): ", fn_src_in); } } @@ -403,10 +403,10 @@ auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; #+BEGIN_SRC d if (exists(fn_pod)) { try { - if (!(doc_matters.opt.action.quiet) + if (doc_matters.opt.action.vox_gt0 && doc_matters.opt.action.pod) { auto data = (cast(byte[]) (fn_pod).read); - if (doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.vox_gt1) { writeln(" ", doc_matters.src.filename, " > "); } if (doc_matters.opt.action.pod) { diff --git a/org/out_xmls.org b/org/out_xmls.org index b017bf7..c082a76 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -667,7 +667,7 @@ import ); } } else { - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln( "WARNING on internal document links, anchor to link <<" ~ m.captures["hash"] @@ -1951,7 +1951,7 @@ default: } catch (ErrnoException ex) { // Handle error } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_html.fn_scroll(doc_matters.src.filename)); } } @@ -2288,7 +2288,7 @@ default: } catch (ErrnoException ex) { // handle error } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_html.fn_seg(doc_matters.src.filename, "toc")); } } @@ -2336,7 +2336,7 @@ default: if (exists(fn_src_in)) { fn_src_in.copy(fn_src_out); } else { - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln("WARNING image not found: ", fn_src_in); } } @@ -3156,7 +3156,7 @@ zip -0 file.epub mimetype && zip -r -9 file.epub META-INF OEBPS foreach (image; doc_matters.srcs.image_list) { { /+ debug +/ if (doc_matters.opt.action.debug_do_epub) { - if (doc_matters.opt.action.very_verbose) { + if (doc_matters.opt.action.vox_gt2) { writeln( doc_matters.src.image_dir_path, "/", image, " -> ", pth_epub3.dbg_doc_oebps_image(doc_matters.src.filename), "/", image @@ -3203,7 +3203,7 @@ zip -0 file.epub mimetype && zip -r -9 file.epub META-INF OEBPS } catch (ErrnoException ex) { // Handle error } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", fn_epub); } #+END_SRC diff --git a/org/output_hub.org b/org/output_hub.org index e9088b3..7aa7fa3 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -52,7 +52,7 @@ template outputHub() { <<output_scheduled_task_odt>> <<output_scheduled_task_sqlite>> } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", doc_matters.src.filename_base); } if (!(doc_matters.opt.action.parallelise_subprocesses)) { @@ -234,12 +234,12 @@ if (doc_matters.opt.action.sqlite_update) { #+NAME: output_options_op_sqlite_db_drop #+BEGIN_SRC d if ((opt_action.sqlite_db_drop)) { - if ((opt_action.verbose)) { + if ((opt_action.vox_gt1)) { writeln("sqlite drop db..."); } import doc_reform.io_out.sqlite; SQLiteDbDrop!()(opt_action, config); - if ((opt_action.very_verbose)) { + if ((opt_action.vox_gt2)) { writeln("sqlite drop db done"); } } @@ -250,13 +250,13 @@ if ((opt_action.sqlite_db_drop)) { #+NAME: output_options_op_sqlite_db_create #+BEGIN_SRC d if ((opt_action.sqlite_db_create)) { - if ((opt_action.verbose)) { + if ((opt_action.vox_gt1)) { auto pth_sqlite_db = spinePathsSQLite!()(opt_action.cgi_sqlite_search_filename, opt_action.output_dir_set); writeln("sqlite create table..."); } import doc_reform.io_out.sqlite; SQLiteTablesCreate!()(env, opt_action, config); - if ((opt_action.very_verbose)) { + if ((opt_action.vox_gt2)) { writeln("sqlite create table done"); } } diff --git a/org/output_show.org b/org/output_show.org index 0452b1b..6cd0328 100644 --- a/org/output_show.org +++ b/org/output_show.org @@ -33,7 +33,7 @@ template spineMetaDocSummary() { <<metadoc_show_imports_shared>> mixin InternalMarkup; <<metadoc_show_initialize>> - if (doc_matters.opt.action.verbose + if (doc_matters.opt.action.vox_gt1 || doc_matters.opt.action.show_summary) { <<meta_metadoc_show_summary_document_check_counts>> <<meta_metadoc_show_summary_document>> 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, diff --git a/src/doc_reform/io_in/paths_source.d b/src/doc_reform/io_in/paths_source.d index a50f386..c34ac43 100644 --- a/src/doc_reform/io_in/paths_source.d +++ b/src/doc_reform/io_in/paths_source.d @@ -90,7 +90,7 @@ template PodManifest() { _manifest_path = m.captures["podpath"]; } } else { - if (_opt_action.verbose || _opt_action.very_verbose || _opt_action.debug_do) { + if (_opt_action.vox_gt1 || _opt_action.debug_do) { writeln("WARNING, src is not a pod, issue with manifest_path: ", _pth); // remove? unless can distinguish pod } _manifest_path = ""; diff --git a/src/doc_reform/io_in/read_config_files.d b/src/doc_reform/io_in/read_config_files.d index c112d1e..8813e16 100644 --- a/src/doc_reform/io_in/read_config_files.d +++ b/src/doc_reform/io_in/read_config_files.d @@ -139,7 +139,7 @@ webserv: try { if (exists(conf_file)) { if (conf_file.getLinkAttributes.attrIsFile) { - if (_opt_action.verbose || _opt_action.very_verbose || _opt_action.debug_do) { + if (_opt_action.vox_gt1 || _opt_action.debug_do) { writeln("config file used: \"", conf_file, "\" (cli flag settings override config file's individual settings)"); } config_file_str = conf_file.readText; diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d index eb5e46a..0444aed 100644 --- a/src/doc_reform/io_out/epub3.d +++ b/src/doc_reform/io_out/epub3.d @@ -723,7 +723,7 @@ template outputEPub3() { foreach (image; doc_matters.srcs.image_list) { { /+ debug +/ if (doc_matters.opt.action.debug_do_epub) { - if (doc_matters.opt.action.very_verbose) { + if (doc_matters.opt.action.vox_gt2) { writeln( doc_matters.src.image_dir_path, "/", image, " -> ", pth_epub3.dbg_doc_oebps_image(doc_matters.src.filename), "/", image @@ -770,7 +770,7 @@ template outputEPub3() { } catch (ErrnoException ex) { // Handle error } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", fn_epub); } debug(epub_archive) { diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d index 2e6d0ad..26636ba 100644 --- a/src/doc_reform/io_out/html.d +++ b/src/doc_reform/io_out/html.d @@ -248,7 +248,7 @@ template outputHTML() { } catch (ErrnoException ex) { // Handle error } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_html.fn_scroll(doc_matters.src.filename)); } } @@ -530,7 +530,7 @@ template outputHTML() { } catch (ErrnoException ex) { // handle error } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_html.fn_seg(doc_matters.src.filename, "toc")); } } @@ -566,7 +566,7 @@ template outputHTML() { if (exists(fn_src_in)) { fn_src_in.copy(fn_src_out); } else { - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln("WARNING image not found: ", fn_src_in); } } diff --git a/src/doc_reform/io_out/hub.d b/src/doc_reform/io_out/hub.d index 5ecaf0e..55dce8e 100644 --- a/src/doc_reform/io_out/hub.d +++ b/src/doc_reform/io_out/hub.d @@ -131,7 +131,7 @@ template outputHub() { msg.vv("sqlite done"); } } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", doc_matters.src.filename_base); } if (!(doc_matters.opt.action.parallelise_subprocesses)) { @@ -167,23 +167,23 @@ template outputHubOp() { mixin spineRgxOut; static auto rgx = RgxO(); if ((opt_action.sqlite_db_drop)) { - if ((opt_action.verbose)) { + if ((opt_action.vox_gt1)) { writeln("sqlite drop db..."); } import doc_reform.io_out.sqlite; SQLiteDbDrop!()(opt_action, config); - if ((opt_action.very_verbose)) { + if ((opt_action.vox_gt2)) { writeln("sqlite drop db done"); } } if ((opt_action.sqlite_db_create)) { - if ((opt_action.verbose)) { + if ((opt_action.vox_gt1)) { auto pth_sqlite_db = spinePathsSQLite!()(opt_action.cgi_sqlite_search_filename, opt_action.output_dir_set); writeln("sqlite create table..."); } import doc_reform.io_out.sqlite; SQLiteTablesCreate!()(env, opt_action, config); - if ((opt_action.very_verbose)) { + if ((opt_action.vox_gt2)) { writeln("sqlite create table done"); } } diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d index e876eab..68ac2f9 100644 --- a/src/doc_reform/io_out/latex.d +++ b/src/doc_reform/io_out/latex.d @@ -1276,7 +1276,7 @@ string table(O,M)( default: { /+ debug +/ if (doc_matters.opt.action.debug_do_latex - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -1314,7 +1314,7 @@ string table(O,M)( try { { /+ debug +/ if (doc_matters.opt.action.debug_do_latex - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln(latex_content.head); writeln(latex_content.content); writeln(latex_content.tail); @@ -1323,7 +1323,7 @@ string table(O,M)( if (!exists(pth_latex.latex_path_stuff)) { (pth_latex.latex_path_stuff).mkdirRecurse; } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_latex.latex_file_with_path(paper_size_orientation)); } auto f = File(pth_latex.latex_file_with_path(paper_size_orientation), "w"); diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d index 6eab92e..9d6d57a 100644 --- a/src/doc_reform/io_out/metadata.d +++ b/src/doc_reform/io_out/metadata.d @@ -319,7 +319,7 @@ string theme_light_1 = format(q"┃ } catch (ErrnoException ex) { // Handle error } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_html.fn_scroll("metadata." ~ doc_matters.src.filename)); } } @@ -363,7 +363,7 @@ string theme_light_1 = format(q"┃ metadata_ ~= "</div>" ~ inline_search_form(doc_matters) ~ "</div><hr />"; if (!(doc_matters.conf_make_meta.meta.title_full.empty)) { metadata_ ~= "<p class=\"lev0\">Title: <b><a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">" ~ doc_matters.conf_make_meta.meta.title_full ~ "</a></b></p>"; - } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { + } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("ERROR no Title information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.creator_author.empty)) { @@ -374,18 +374,18 @@ string theme_light_1 = format(q"┃ metadata_ ~= "<p class=\"lev1\">Author: <b>" ~ doc_matters.conf_make_meta.meta.creator_author ~ "</b></p>"; } - } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { + } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("ERROR no Author information provided in document header ", doc_matters.src.filename_base); } metadata_ ~= "<p class=\"lev1\">Published: " ~ doc_matters.conf_make_meta.meta.date_published ~ "</p>"; if (!(doc_matters.conf_make_meta.meta.rights_copyright.empty)) { metadata_ ~= "<p class=\"lev1\">Copyright: " ~ doc_matters.conf_make_meta.meta.rights_copyright ~ "</p>"; - } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { + } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("WARNING no Copyright information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.rights_license.empty)) { metadata_ ~= "<p class=\"lev1\">License: " ~ doc_matters.conf_make_meta.meta.rights_license ~ "</p>"; - } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { + } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("WARNING no License information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.notes_summary.empty)) { diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d index 2c0ae66..b80b9f0 100644 --- a/src/doc_reform/io_out/odt.d +++ b/src/doc_reform/io_out/odt.d @@ -877,7 +877,7 @@ template outputODT() { default: { /+ debug +/ if (doc_matters.opt.action.debug_do - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -2079,7 +2079,7 @@ template outputODT() { } } } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_odt.odt_file); } } catch (ErrnoException ex) { diff --git a/src/doc_reform/io_out/source_pod.d b/src/doc_reform/io_out/source_pod.d index 4b59116..14d63d7 100644 --- a/src/doc_reform/io_out/source_pod.d +++ b/src/doc_reform/io_out/source_pod.d @@ -105,7 +105,7 @@ template spinePod() { pths_pod.pod_dir_().mkdirRecurse; } if (doc_matters.opt.action.source_or_pod) { - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pths_pod.fn_pod_filelist(doc_matters.src.filename).filesystem_open_zpod); } if (!exists(pths_pod.text_root(doc_matters.src.filename).filesystem_open_zpod)) { @@ -128,7 +128,7 @@ template spinePod() { } } if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln(__LINE__, ": ", doc_matters.src.filename, " -> ", pths_pod.fn_doc(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod @@ -163,7 +163,7 @@ template spinePod() { } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src out NOT found (image): ", fn_src_in); } } @@ -190,7 +190,7 @@ template spinePod() { } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src out NOT found (document make): ", fn_src_in); } } @@ -217,7 +217,7 @@ template spinePod() { 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_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { try { _pmy = Loader.fromString(_pm).load(); } catch (ErrnoException ex) { @@ -280,7 +280,7 @@ template spinePod() { } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src in NOT found (markup source): ", fn_src_in); } } @@ -323,7 +323,7 @@ template spinePod() { } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src out NOT found (insert file): ", _pth_mkup_src_in); } } @@ -355,7 +355,7 @@ template spinePod() { } } else { if (doc_matters.opt.action.debug_do_pod - && doc_matters.opt.action.verbose) { + && doc_matters.opt.action.vox_gt1) { writeln("WARNING (io) src out NOT found (insert file): ", fn_src_in); } } @@ -377,10 +377,10 @@ template spinePod() { } if (exists(fn_pod)) { try { - if (!(doc_matters.opt.action.quiet) + if (doc_matters.opt.action.vox_gt0 && doc_matters.opt.action.pod) { auto data = (cast(byte[]) (fn_pod).read); - if (doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.vox_gt1) { writeln(" ", doc_matters.src.filename, " > "); } if (doc_matters.opt.action.pod) { diff --git a/src/doc_reform/io_out/sqlite.d b/src/doc_reform/io_out/sqlite.d index 7e4d605..06a764f 100644 --- a/src/doc_reform/io_out/sqlite.d +++ b/src/doc_reform/io_out/sqlite.d @@ -108,7 +108,7 @@ template SQLiteHubBuildTablesAndPopulate() { } db.close; } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file); } } @@ -142,7 +142,7 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { } db.close; } - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file(doc_matters.src.filename)); } } @@ -174,7 +174,7 @@ template SQLiteDbRun() { { /+ debug +/ if (opt_action.debug_do_sqlite) { writeln(note); - if (opt_action.very_verbose) { + if (opt_action.vox_gt2) { writeln(db_statement); } } @@ -425,7 +425,7 @@ template SQLiteFormatAndLoadObject() { ); } } else { - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln( "WARNING on internal document links, anchor to link <<" ~ m.captures["hash"] @@ -1611,7 +1611,7 @@ template SQLiteTablesCreate() { ? config.conf.w_srv_db_sqlite_path : ""; if (db_filename.length > 0 && db_path.length > 0) { - if ((opt_action.verbose)) { + if ((opt_action.vox_gt1)) { writeln("db name & path: ", db_path, db_filename); } auto pth_sqlite = spinePathsSQLite!()(db_filename, db_path); diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d index 5ad5724..b9d5a1b 100644 --- a/src/doc_reform/io_out/xmls.d +++ b/src/doc_reform/io_out/xmls.d @@ -521,7 +521,7 @@ template outputXHTMLs() { ); } } else { - if (!(doc_matters.opt.action.quiet)) { + if (doc_matters.opt.action.vox_gt0) { writeln( "WARNING on internal document links, anchor to link <<" ~ m.captures["hash"] diff --git a/src/doc_reform/meta/metadoc_show_summary.d b/src/doc_reform/meta/metadoc_show_summary.d index 5fd9655..6bd4a48 100644 --- a/src/doc_reform/meta/metadoc_show_summary.d +++ b/src/doc_reform/meta/metadoc_show_summary.d @@ -75,7 +75,7 @@ template spineMetaDocSummary() { char_repeat_number = (char_repeat_number > min_repeat_number) ? char_repeat_number : min_repeat_number; - if (doc_matters.opt.action.verbose + if (doc_matters.opt.action.vox_gt1 || doc_matters.opt.action.show_summary) { string[string] check = [ "last_object_number" : "NA [debug \"checkdoc\" not run]", diff --git a/src/doc_reform/share/defaults.d b/src/doc_reform/share/defaults.d index 05f2bd1..d7825e8 100644 --- a/src/doc_reform/share/defaults.d +++ b/src/doc_reform/share/defaults.d @@ -57,12 +57,12 @@ template Msg() { @safe auto Msg(I)(I doc_matters) { struct Msg_ { void v()(string message) { - if (!(doc_matters.opt.action.quiet) && doc_matters.opt.action.verbose) { + if (doc_matters.opt.action.vox_gt1) { writeln(message); } } void vv()(string message) { - if (!(doc_matters.opt.action.quiet) && doc_matters.opt.action.very_verbose) { + if (doc_matters.opt.action.vox_gt2) { writeln(message); } } diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d index 91184dc..6f6f168 100755 --- a/src/doc_reform/spine.d +++ b/src/doc_reform/spine.d @@ -150,7 +150,6 @@ string program_name = "spine"; "parallel-subprocesses" : false, "pdf" : false, "pdf-color-links" : false, - "quiet" : false, "pod" : false, "serial" : false, "show-config" : false, @@ -175,8 +174,9 @@ string program_name = "spine"; "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, @@ -223,9 +223,9 @@ string program_name = "spine"; "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"], @@ -249,7 +249,7 @@ string program_name = "spine"; "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"], @@ -294,8 +294,8 @@ string program_name = "spine"; "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"], @@ -439,9 +439,6 @@ string program_name = "spine"; @trusted bool ocn_off() { return opts["ocn-off"]; } - @trusted bool quiet() { - return opts["quiet"]; - } @trusted bool pod() { return opts["pod"]; } @@ -452,10 +449,10 @@ string program_name = "spine"; 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"]; @@ -479,10 +476,10 @@ string program_name = "spine"; 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"]; @@ -514,14 +511,20 @@ string program_name = "spine"; || 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"]; @@ -964,7 +967,7 @@ string program_name = "spine"; foreach(manifest; parallel(_manifests[1..$])) { if (!empty(manifest.src.filename)) { scope(success) { - if (!(_opt_action.quiet)) { + if (_opt_action.vox_gt0) { writefln( "%s", "-- ~ document complete, ok ~ ------------------------------------", @@ -1030,7 +1033,7 @@ string program_name = "spine"; } 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); } @@ -1055,7 +1058,7 @@ string program_name = "spine"; } } scope(exit) { - if (!(_opt_action.quiet)) { + if (_opt_action.vox_gt0) { writefln( "processed file: %s [%s]", manifest.src.filename, @@ -1072,12 +1075,12 @@ 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)) { scope(success) { - if (!(_opt_action.quiet)) { + if (_opt_action.vox_gt0) { writefln( "%s", "-- ~ document complete, ok ~ ------------------------------------", @@ -1143,7 +1146,7 @@ string program_name = "spine"; } 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); } @@ -1168,7 +1171,7 @@ string program_name = "spine"; } } scope(exit) { - if (!(_opt_action.quiet)) { + if (_opt_action.vox_gt0) { writefln( "processed file: %s [%s]", manifest.src.filename, @@ -1192,7 +1195,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) { @@ -1202,5 +1205,5 @@ string program_name = "spine"; writeln("- ", out_pth.curate("topics.html")); } } - } else { writeln("NO HARVESTS"); } + } else { writeln("NO METADATA CURATED"); } } |