diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2020-04-15 20:05:56 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2020-05-20 11:27:26 -0400 |
commit | 0b484b0a1a6405a53616416aaaa6512a602b6072 (patch) | |
tree | e9737b80ad9fd83254510368198f3fb6dfb8926c /org/spine.org | |
parent | cgi search form: path; theme; download remote src (diff) |
cli precedence over config file settings
- cli precedence over config file settings
- latex papersize settings sorted
Diffstat (limited to 'org/spine.org')
-rw-r--r-- | org/spine.org | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/org/spine.org b/org/spine.org index bd8437a..e5752ca 100644 --- a/org/spine.org +++ b/org/spine.org @@ -301,7 +301,6 @@ mixin CompileTimeInfo; #+NAME: spine_mixin #+BEGIN_SRC d mixin spineRgxIn; -mixin contentJSONtoSpineStruct; mixin spineBiblio; mixin spineRgxDocStructFlags; mixin outputHub; @@ -355,6 +354,7 @@ scope(failure) { #+BEGIN_SRC d bool[string] opts = [ "abstraction" : false, + "allow-downloads" : false, "assertions" : false, "cgi-search-form-codegen" : false, "concordance" : false, @@ -415,11 +415,13 @@ bool[string] opts = [ "workon" : false, ]; string[string] settings = [ - "cgi-sqlite-search-filename" : "", // "spine-search" + "cgi-sqlite-search-filename" : "", // config default: "spine-search" "config" : "", "output" : "", - "lang" : "all", - "sqlite-db-filename" : "", // "spine-search.db" + "lang" : "all", // which language to process + "set-papersize" : "", // config default: a4 + "sqlite-db-filename" : "", // config default: "spine-search.db" + "webserv-domain" : "", // config default: localhost ]; #+END_SRC @@ -433,9 +435,7 @@ auto helpInfo = getopt(args, "allow-downloads", "allow downloads (includes cgi.d from github)", &opts["allow-downloads"], "assert", "set optional assertions on", &opts["assertions"], "cgi-search-form-codegen", "generates (pre-compiled) d code for search of specified db", &opts["cgi-search-form-codegen"], - "cgi-sqlite-search-filename", "=[filename]", &settings["cgi-sqlite-search-filename"], "concordance", "file for document", &opts["concordance"], - "config", "=/path/to/config/file/including/filename", &settings["config"], "dark", "alternative dark theme", &opts["dark"], "debug", "debug", &opts["debug"], "digest", "hash digest for each object", &opts["digest"], @@ -449,7 +449,6 @@ auto helpInfo = getopt(args, "html-link-search", "html embedded search submission", &opts["html-link-search"], "html-seg", "process html output", &opts["html-seg"], "html-scroll", "process html output", &opts["html-scroll"], - "lang", "=[lang code e.g. =en or =en,es]", &settings["lang"], "latex", "output for pdfs", &opts["latex"], "latex-color-links", "mono or color links for pdfs", &opts["latex-color-links"], "light", "default light theme", &opts["light"], @@ -457,14 +456,13 @@ auto helpInfo = getopt(args, "ocn-off", "object cite numbers", &opts["ocn-off"], "odf", "open document format text (--odt)", &opts["odf"], "odt", "open document format text", &opts["odt"], - "output", "=/path/to/output/dir specify where to place output", &settings["output"], "parallel", "parallelisation", &opts["parallel"], "parallel-subprocesses", "nested parallelisation", &opts["parallel-subprocesses"], "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"], - "section-backmatter", "document backmatter (default)", &opts["backmatter"], + "section-backmatter", "document backmatter (default)" , &opts["backmatter"], "section-biblio", "document biblio (default)", &opts["section_biblio"], "section-blurb", "document blurb (default)", &opts["section_blurb"], "section-body", "document body (default)", &opts["section_body"], @@ -484,7 +482,6 @@ auto helpInfo = getopt(args, "sqlite-db-drop", "drop tables & db", &opts["sqlite-db-drop"], "sqlite-db-recreate", "create db, create tables", &opts["sqlite-db-recreate"], "sqlite-delete", "sqlite output", &opts["sqlite-delete"], - "sqlite-db-filename", "=[filename].sql.db", &settings["sqlite-db-filename"], "sqlite-insert", "sqlite output", &opts["sqlite-insert"], "sqlite-update", "sqlite output", &opts["sqlite-update"], "text", "text output", &opts["text"], @@ -495,6 +492,13 @@ auto helpInfo = getopt(args, "very-verbose", "output to terminal", &opts["very-verbose"], "workon", "(reserved for some matters under development & testing)", &opts["workon"], "xhtml", "xhtml output", &opts["xhtml"], + "cgi-sqlite-search-filename", "=[filename] default is spine-search", &settings["cgi-sqlite-search-filename"], + "config", "=/path/to/config/file/including/filename", &settings["config"], + "lang", "=[lang code e.g. =en or =en,es]", &settings["lang"], + "output", "=/path/to/output/dir specify where to place output", &settings["output"], + "set-papersize", "=\"a4,a5,b4,letter\"", &settings["set-papersize"], + "sqlite-db-filename", "=[filename].sql.db", &settings["sqlite-db-filename"], + "webserv-domain", "=[web-server.domain.name]", &settings["webserv-domain"], ); if (helpInfo.helpWanted) { defaultGetoptPrinter("Some information about the program.", helpInfo.options); @@ -871,7 +875,7 @@ if ( _conf_file_details = configFilePaths!()(_manifested, _env, _opt_action.config_path_set); auto _config_local_site_struct = readConfigSite!()(_conf_file_details, _opt_action); import doc_reform.meta.conf_make_meta_yaml; - _config = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_config, _manifested); // - get local site config + _config = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_config, _manifested, _opt_action); // - get local site config break; } } @@ -879,7 +883,7 @@ if ( } else { /+ local site config +/ auto _config_local_site_struct = readConfigSite!()(_conf_file_details, _opt_action); import doc_reform.meta.conf_make_meta_yaml; - _config = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_config, _manifested); // - get local site config + _config = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_config, _manifested, _opt_action); // - get local site config } if (_opt_action.show_config) { import doc_reform.meta.metadoc_show_config; @@ -1074,7 +1078,7 @@ foreach(arg; args[1..$]) { { /+ document config/make file +/ auto _config_document_struct = readConfigDoc!()(_manifest, _env); import doc_reform.meta.conf_make_meta_yaml; - _make_and_meta_struct = _config_document_struct.configParseYAMLreturnSpineStruct!()(_make_and_meta_struct, _manifest); + _make_and_meta_struct = _config_document_struct.configParseYAMLreturnSpineStruct!()(_make_and_meta_struct, _manifest, _opt_action); } #+END_SRC @@ -1373,6 +1377,7 @@ _make_and_meta_struct = _header_body_insertfilelist_imagelist[headBody.header], _make_and_meta_struct, _manifest, + _opt_action, ); if ((_opt_action.debug_do) || (_opt_action.very_verbose) @@ -1529,7 +1534,7 @@ struct DocumentMatters { @safe auto action() { /+ getopt options, commandline instructions, raw - processing instructions --epub --html etc. - - command line config instructions --output-path + - command line config instructions --output +/ return _opt_action; } |