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.d28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d
index 6d6d543..1ddfca1 100755
--- a/src/doc_reform/spine.d
+++ b/src/doc_reform/spine.d
@@ -86,7 +86,6 @@ string project_name = "spine";
string program_name = "spine";
@system void main(string[] args) {
mixin spineRgxIn;
- mixin contentJSONtoSpineStruct;
mixin spineBiblio;
mixin spineRgxDocStructFlags;
mixin outputHub;
@@ -113,6 +112,7 @@ string program_name = "spine";
}
bool[string] opts = [
"abstraction" : false,
+ "allow-downloads" : false,
"assertions" : false,
"cgi-search-form-codegen" : false,
"concordance" : false,
@@ -173,11 +173,13 @@ string program_name = "spine";
"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
];
auto helpInfo = getopt(args,
std.getopt.config.passThrough,
@@ -185,9 +187,7 @@ string program_name = "spine";
"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"],
@@ -201,7 +201,6 @@ string program_name = "spine";
"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"],
@@ -209,14 +208,13 @@ string program_name = "spine";
"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"],
@@ -236,7 +234,6 @@ string program_name = "spine";
"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"],
@@ -247,6 +244,13 @@ string program_name = "spine";
"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);
@@ -603,7 +607,7 @@ string program_name = "spine";
_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;
}
}
@@ -611,7 +615,7 @@ string program_name = "spine";
} 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;