aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/spine.org')
-rw-r--r--org/spine.org75
1 files changed, 51 insertions, 24 deletions
diff --git a/org/spine.org b/org/spine.org
index 74fe0a0..cfc9722 100644
--- a/org/spine.org
+++ b/org/spine.org
@@ -84,7 +84,7 @@ string program_name = "spine";
}
} else { // note cannot parallelise sqlite shared db
foreach(manifest; _manifests[1..$]) {
- if (_opt_action.vox_gt2) { writeln("parallelisation off: actions include sqlite shared db"); }
+ if (_opt_action.vox_gt_3) { writeln("parallelisation off: actions include sqlite shared db"); }
if (!empty(manifest.src.filename)) {
<<spine_each_file_do_scope>>
<<spine_each_file_do_abstraction>>
@@ -104,7 +104,7 @@ string program_name = "spine";
if (_opt_action.curate_authors) {
spineMetaDocCuratesAuthors!()(hvst.curates, _make_and_meta_struct, _opt_action);
}
- if (_opt_action.vox_gt0) {
+ if (_opt_action.vox_gt_1) {
import sisudoc.io_out.paths_output;
auto out_pth = spinePathsHTML!()(_make_and_meta_struct.conf.output_path, "");
if (_opt_action.curate_authors) {
@@ -352,9 +352,11 @@ bool[string] opts = [
"sqlite-insert" : false,
"sqlite-update" : false,
"text" : false,
- "vox_is0" : false,
- "vox_gt1" : false,
- "vox_gt2" : false,
+ "vox_is0" : false, // silent
+ "vox_is1" : false, // quiet
+ "vox_is2" : false, // default (unset)
+ "vox_is3" : false, // verbose
+ "vox_is4" : false, // very verbose
"xhtml" : false,
"section_toc" : true,
"section_body" : true,
@@ -449,7 +451,7 @@ auto helpInfo = getopt(args,
"pdf-color-links", "mono or color links for pdfs", &opts["pdf-color-links"],
"pdf-init", "initialise latex shared files (see latex-header-sty)", &opts["pdf-init"],
"pod", "spine (doc reform) pod source content bundled", &opts["pod"],
- "quiet|q", "output to terminal", &opts["vox_is0"],
+ "quiet|q", "output to terminal", &opts["vox_is1"],
"section-backmatter", "document backmatter (default)" , &opts["backmatter"],
"section-biblio", "document biblio (default)", &opts["section_biblio"],
"section-blurb", "document blurb (default)", &opts["section_blurb"],
@@ -474,6 +476,7 @@ auto helpInfo = getopt(args,
"show-sqlite", "show sqlite", &opts["show-sqlite"],
"show-summary", "show summary", &opts["show-summary"],
"source", "document markup source", &opts["source"],
+ "silent", "output to terminal", &opts["vox_is0"],
"set-digest", "default hash digest type (e.g. sha256)", &settings["set-digest"],
"set-papersize", "default papersize (latex pdf eg. a4 or a5 or b4 or letter)", &settings["set-papersize"],
"set-textwrap", "default textwrap (e.g. 80 (characters)", &settings["set-textwrap"],
@@ -486,16 +489,16 @@ auto helpInfo = getopt(args,
"sqlite-delete", "sqlite output", &opts["sqlite-delete"],
"sqlite-insert", "sqlite output", &opts["sqlite-insert"],
"sqlite-update", "sqlite output", &opts["sqlite-update"],
+ "text", "text output", &opts["text"],
+ "txt", "text output", &opts["text"],
"www-http", "http or https", &settings["www-http"],
"www-host", "web server host (domain) name", &settings["www-host"],
"www-host-doc-root", "web host host (domain) name with path to doc root", &settings["www-host-doc-root"],
"www-url-doc-root", "e.g. http://localhost", &settings["www-url-doc-root"],
- "text", "text output", &opts["text"],
"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["vox_gt1"],
- "very-verbose", "output to terminal", &opts["vox_gt2"],
+ "verbose|v", "output to terminal", &opts["vox_is3"],
+ "very-verbose", "output to terminal", &opts["vox_is4"],
"workon", "(reserved for some matters under development & testing)", &opts["workon"],
"xhtml", "xhtml output", &opts["xhtml"],
"config", "=/path/to/config/file/including/filename", &settings["config"],
@@ -674,10 +677,10 @@ struct OptActions {
return opts["show-curate"];
}
@trusted bool show_curate_authors() {
- return (opts["show-curate"] || opts["show-curate-authors"] || opts["vox_gt1"] || opts["vox_gt2"]) ? true : false;
+ return (opts["show-curate"] || opts["show-curate-authors"] || vox_gt_2) ? true : false;
}
@trusted bool show_curate_topics() {
- return (opts["show-curate"] || opts["show-curate-topics"] || opts["vox_gt2"]) ? true : false;
+ return (opts["show-curate"] || opts["show-curate-topics"] || vox_gt_3) ? true : false;
}
@trusted bool show_epub() {
return opts["show-epub"];
@@ -701,10 +704,10 @@ struct OptActions {
return opts["show-pod"];
}
@trusted bool show_sqlite() {
- return (opts["show-sqlite"] || opts["vox_gt2"]) ? true : false;
+ return (opts["show-sqlite"] || vox_gt_3) ? true : false;
}
@trusted bool show_summary() {
- return (opts["show-summary"] || opts["vox_gt1"] || opts["vox_gt2"]) ? true : false;
+ return (opts["show-summary"] || vox_gt_2) ? true : false;
}
@trusted bool source() {
return opts["source"];
@@ -736,18 +739,42 @@ struct OptActions {
|| opts["sqlite-update"]
) ? true : false;
}
- @trusted bool vox_is0() { // --quiet -q
+ @trusted bool vox_0() { // --silent
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 vox_1() { // --quiet -q
+ return opts["vox_is1"];
+ }
+ @trusted bool vox_2() { // normal, minimal, without flag
+ bool _vox_default = true;
+ if (opts["vox_is0"] || opts["vox_is1"] || opts["vox_is3"] || opts["vox_is4"]) { _vox_default = false;
+ } else { _vox_default = true;
+ }
+ return _vox_default;
+ }
+ @trusted bool vox_3() { // --verbose -v
+ return opts["vox_is3"];
+ }
+ @trusted bool vox_4() { // --very-verbose
+ return opts["vox_is4"];
+ }
+ @trusted bool vox_gt_0() { // --quiet -q and above
+ return ( vox_1 || vox_2 || vox_3 || vox_4) ? true : false;
+ }
+ @trusted bool vox_gt_1() { // normal, and above
+ return (vox_2 || vox_3 || vox_4) ? true : false;
}
- @trusted bool vox_gt1() { // -- verbose -v
- return (opts["vox_gt1"] || opts["vox_gt2"]) ? true : false;
+ @trusted bool vox_gt_2() { // --verbose -v and above
+ return ( vox_3 || vox_4) ? true : false;
}
- @trusted bool vox_gt2() { // --very-verbose
- return opts["vox_gt2"];
+ @trusted bool vox_gt_3() { // --very-verbose
+ return (vox_4) ? true : false;
}
+ @trusted bool vox_silent() { return vox_0; } // --silent
+ @trusted bool vox_quiet() { return vox_gt_0; } // --quiet -q & above
+ @trusted bool vox_default() { return vox_gt_1; } // defalt, & above
+ @trusted bool vox_verbose() { return vox_gt_2; } // --verbose -v & above
+ @trusted bool vox_very_verbose() { return vox_gt_3; } // --very-verbose
@trusted bool text() {
return opts["text"];
}
@@ -1234,7 +1261,7 @@ foreach(arg; args[1..$]) {
#+NAME: spine_each_file_do_scope
#+BEGIN_SRC d
scope(success) {
- if (_opt_action.vox_gt0) { writeln("-- ~ document complete, ok ~ ------------------------------------"); }
+ if (_opt_action.vox_gt_1) { writeln("-- ~ document complete, ok ~ ------------------------------------"); }
}
scope(failure) {
debug(checkdoc) {
@@ -1351,7 +1378,7 @@ if (doc.matters.opt.action.curate) {
} else {
if ((doc.matters.opt.action.debug_do)
|| (_opt_action.debug_do_curate)
- || (doc.matters.opt.action.vox_gt2)
+ || (doc.matters.opt.action.vox_gt_3)
) {
writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc);
}
@@ -1400,7 +1427,7 @@ if (!(doc.matters.opt.action.skip_output)) {
#+NAME: spine_each_file_do_scope_exit
#+BEGIN_SRC d
scope(exit) {
- if (_opt_action.vox_gt0) {
+ if (_opt_action.vox_gt_1) {
writefln(
"processed file: %s [%s]",
manifest.src.filename,