aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/spine.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/spine.d')
-rwxr-xr-xsrc/doc_reform/spine.d65
1 files changed, 34 insertions, 31 deletions
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"); }
}