From ae968985ebc6799f4fa08d671fbe52118bf9af0e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 11 Apr 2020 20:54:48 -0400 Subject: trust more, else minor --- org/spine.org | 158 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 86 insertions(+), 72 deletions(-) (limited to 'org/spine.org') diff --git a/org/spine.org b/org/spine.org index 8341b67..f6dd0b2 100644 --- a/org/spine.org +++ b/org/spine.org @@ -115,7 +115,9 @@ string program_name = "spine"; } } else { // note cannot parallelise sqlite shared db foreach(manifest; _manifests[1..$]) { - writeln("parallelisation off: actions include sqlite shared db"); + if (_opt_action.very_verbose) { + writeln("parallelisation off: actions include sqlite shared db"); + } if (!empty(manifest.src.filename)) { <> <> @@ -347,77 +349,84 @@ scope(failure) { *** getopt args for loop :args:getopt: **** set getopt options - set getopt options +***** initialize #+NAME: spine_args #+BEGIN_SRC d bool[string] opts = [ - "abstraction" : false, - "assertions" : false, - "cgi-search-form-codegen" : false, - "concordance" : false, - "dark" : false, - "debug" : false, - "digest" : false, - "epub" : false, - "harvest" : false, - "harvest-authors" : false, - "harvest-topics" : false, - "html" : false, - "html-link-harvest" : false, - "html-link-search" : false, - "html-seg" : false, - "html-scroll" : false, - "latex" : false, - "latex-color-links" : false, - "light" : false, - "manifest" : false, - "hide-ocn" : false, - "ocn-off" : false, - "odf" : false, - "odt" : false, - "parallel" : false, - "parallel-subprocesses" : false, - "pdf" : false, - "pdf-color-links" : false, - "quiet" : false, - "pod" : false, - "serial" : false, - "show-summary" : false, - "show-metadata" : false, - "show-make" : false, - "show-config" : false, - "source" : false, - "sqlite-discrete" : false, - "sqlite-db-create" : false, - "sqlite-db-drop" : false, - "sqlite-db-recreate" : false, - "sqlite-delete" : false, - "sqlite-insert" : false, - "sqlite-update" : false, - "text" : false, - "verbose" : false, - "very-verbose" : false, - "xhtml" : false, - "section_toc" : true, - "section_body" : true, - "section_endnotes" : true, - "section_glossary" : true, - "section_biblio" : true, - "section_bookindex" : true, - "section_blurb" : true, - "backmatter" : true, - "skip-output" : false, - "theme-dark" : false, - "theme-light" : false, - "workon" : false, + "abstraction" : false, + "assertions" : false, + "cgi-search-form-codegen" : false, + "concordance" : false, + "dark" : false, + "debug" : false, + "digest" : false, + "epub" : false, + "harvest" : false, + "harvest-authors" : false, + "harvest-topics" : false, + "html" : false, + "html-link-harvest" : false, + "html-link-search" : false, + "html-seg" : false, + "html-scroll" : false, + "latex" : false, + "latex-color-links" : false, + "light" : false, + "manifest" : false, + "hide-ocn" : false, + "ocn-off" : false, + "odf" : false, + "odt" : false, + "parallel" : false, + "parallel-subprocesses" : false, + "pdf" : false, + "pdf-color-links" : false, + "quiet" : false, + "pod" : false, + "serial" : false, + "show-summary" : false, + "show-metadata" : false, + "show-make" : false, + "show-config" : false, + "source" : false, + "sqlite-discrete" : false, + "sqlite-db-create" : false, + "sqlite-db-drop" : false, + "sqlite-db-recreate" : false, + "sqlite-delete" : false, + "sqlite-insert" : false, + "sqlite-update" : false, + "text" : false, + "verbose" : false, + "very-verbose" : false, + "xhtml" : false, + "section_toc" : true, + "section_body" : true, + "section_endnotes" : true, + "section_glossary" : true, + "section_biblio" : true, + "section_bookindex" : true, + "section_blurb" : true, + "backmatter" : true, + "skip-output" : false, + "theme-dark" : false, + "theme-light" : false, + "workon" : false, ]; string[string] settings = [ "cgi-sqlite-search-filename" : "", // "spine-search" - "config" : "", - "output" : "", - "lang" : "all", - "sqlite-db-filename" : "", // "spine-search.db" + "config" : "", + "output" : "", + "lang" : "all", + "sqlite-db-filename" : "", // "spine-search.db" ]; +#+END_SRC + +***** set & describe + +#+NAME: spine_args +#+BEGIN_SRC d auto helpInfo = getopt(args, std.getopt.config.passThrough, "abstraction", "document abstraction ", &opts["abstraction"], @@ -507,7 +516,7 @@ struct OptActions { @trusted bool concordance() { return opts["concordance"]; } - auto config_path_set() { + @trusted string config_path_set() { return settings["config"]; } @trusted bool css_theme_default() { @@ -665,23 +674,29 @@ struct OptActions { @trusted bool workon() { return opts["workon"]; } - auto languages_set() { + @trusted string[] languages_set() { return settings["lang"].split(","); } - auto output_dir_set() { + @trusted string output_dir_set() { return settings["output"]; } - auto sqlite_filename() { + @trusted string sqlite_filename() { return settings["sqlite-db-filename"]; } - auto cgi_sqlite_search_filename() { + @trusted string cgi_sqlite_search_filename() { return settings["cgi-sqlite-search-filename"]; } - auto cgi_sqlite_search_filename_d() { + @trusted string cgi_sqlite_search_filename_d() { return (settings["cgi-sqlite-search-filename"].length > 0) ? (settings["cgi-sqlite-search-filename"].translate(['-' : "_"]) ~ ".d") : ""; } + @trusted string latex_papersize() { + return settings["set-papersize"]; + } + @trusted string webserver_domain_name() { + return settings["webserv-domain"]; + } @trusted bool parallelise() { bool _is; if (opts["parallel"] == true) { @@ -797,7 +812,7 @@ struct OptActions { ) ? true : false; } } -auto _opt_action = OptActions(); +OptActions _opt_action = OptActions(); #+END_SRC **** env @@ -1270,7 +1285,6 @@ template spineAbstraction() { <> <> auto t = tuple(doc_abstraction, doc_matters); - static assert(t.length==2); return t; } } -- cgit v1.2.3