aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/meta')
-rw-r--r--src/doc_reform/meta/metadoc.d24
-rw-r--r--src/doc_reform/meta/metadoc_show_config.d109
-rw-r--r--src/doc_reform/meta/metadoc_show_make.d2
-rw-r--r--src/doc_reform/meta/metadoc_show_metadata.d2
-rw-r--r--src/doc_reform/meta/metadoc_show_summary.d2
-rw-r--r--src/doc_reform/meta/rgx.d4
6 files changed, 114 insertions, 29 deletions
diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d
index cf74e23..5c45c96 100644
--- a/src/doc_reform/meta/metadoc.d
+++ b/src/doc_reform/meta/metadoc.d
@@ -184,13 +184,31 @@ template spineAbstraction() {
@safe auto sqlite() {
struct SQLite_ {
@safe string filename() {
- return _opt_action.sqlite_filename;
+ string _fn = "";
+ if (_opt_action.sqlite_filename.length > 0) {
+ _fn = _opt_action.sqlite_filename;
+ } else if (_make_and_meta_struct.conf.w_srv_db_sqlite.length > 0) {
+ _fn = _make_and_meta_struct.conf.w_srv_db_sqlite;
+ }
+ return _fn;
}
@safe string cgi_filename() {
- return _opt_action.cgi_sqlite_search_filename;
+ string _fn = "";
+ if (_opt_action.cgi_sqlite_search_filename.length > 0) {
+ _fn = _opt_action.cgi_sqlite_search_filename;
+ } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script.length > 0) {
+ _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script;
+ }
+ return _fn;
}
@safe string cgi_filename_d() {
- return _opt_action.cgi_sqlite_search_filename_d;
+ string _fn = "";
+ if (_opt_action.cgi_sqlite_search_filename_d.length > 0) {
+ _fn = _opt_action.cgi_sqlite_search_filename_d;
+ } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d.length > 0) {
+ _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d;
+ }
+ return _fn;
}
}
return SQLite_();
diff --git a/src/doc_reform/meta/metadoc_show_config.d b/src/doc_reform/meta/metadoc_show_config.d
index 630fe0c..c642cb9 100644
--- a/src/doc_reform/meta/metadoc_show_config.d
+++ b/src/doc_reform/meta/metadoc_show_config.d
@@ -1,4 +1,89 @@
module doc_reform.meta.metadoc_show_config;
+template spineShowSiteConfig() {
+ @safe void spineShowSiteConfig(O,T)(
+ O opt_action,
+ T config,
+ ) {
+ import
+ doc_reform.meta.defaults,
+ doc_reform.meta.rgx;
+ import
+ std.array,
+ std.exception,
+ std.regex,
+ std.stdio,
+ std.string,
+ std.typecons,
+ std.uni,
+ std.utf,
+ std.conv : to;
+ mixin InternalMarkup;
+ auto markup = InlineMarkup();
+ auto char_repeat_number = 66;
+ if (opt_action.show_config) {
+ writefln(
+ "\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n",
+ markup.repeat_character_by_number_provided("-", char_repeat_number),
+ "- webserv domain name:",
+ config.conf.w_srv_domain,
+ "- webserv doc root (part):",
+ config.conf.w_srv_data_root_part,
+ "- webserv doc path:",
+ config.conf.w_srv_data_root_path,
+ "- webserv images (location):",
+ config.conf.w_srv_images_root_part,
+ "- webserv doc root url:",
+ config.conf.w_srv_data_root_url,
+ "- webserv cgi domain (host):",
+ config.conf.w_srv_cgi_domain,
+ "- webserv cgi host path:",
+ config.conf.w_srv_cgi_bin_path,
+ "- webserv cgi host (part):",
+ config.conf.w_srv_cgi_bin_part,
+ "- webserv cgi search script:",
+ config.conf.w_srv_cgi_search_script,
+ "- webserv cgi search script in d:",
+ config.conf.w_srv_cgi_search_script_raw_fn_d,
+ "- webserv cgi port:",
+ config.conf.w_srv_cgi_port,
+ "- webserv cgi user:",
+ config.conf.w_srv_cgi_user,
+ "- webserv cgi url:",
+ config.conf.w_srv_cgi_bin_url,
+ "- webserv cgi action:",
+ config.conf.w_srv_cgi_action,
+ // "- webserv cgi file links:",
+ // config.conf.w_srv_cgi_file_links,
+ "- webserv sqlite db:",
+ config.conf.w_srv_db_sqlite,
+ "- output path:",
+ config.conf.output_path,
+ "- processing concordance max:",
+ config.conf.processing_concord_max,
+ // "- flag act0:",
+ // config.conf.flag_act0,
+ "- default papersize:",
+ config.conf.default_papersize,
+ "- default text wrap:",
+ config.conf.default_text_wrap,
+ "- default emphasis markup symbol:",
+ config.conf.default_emphasis,
+ "- default language:",
+ config.conf.default_language,
+ "- default hash digest:",
+ config.conf.default_digest,
+ "- search flag:",
+ config.conf.search_flag,
+ "- search action:",
+ config.conf.search_action,
+ "- search db:",
+ config.conf.search_db,
+ "- search title:",
+ config.conf.search_title,
+ );
+ }
+ }
+}
template spineShowConfig() {
@safe void spineShowConfig(T)(
T doc_matters,
@@ -31,7 +116,7 @@ template spineShowConfig() {
}
if (doc_matters.opt.action.show_config) {
writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n",
+ "%s\n\"%s\", %s\n%s\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n",
markup.repeat_character_by_number_provided("-", char_repeat_number),
doc_matters.conf_make_meta.meta.title_full,
doc_matters.conf_make_meta.meta.creator_author,
@@ -73,26 +158,8 @@ template spineShowConfig() {
doc_matters.conf_make_meta.conf.output_path,
"- processing concordance max:",
doc_matters.conf_make_meta.conf.processing_concord_max,
- "- flag act0:",
- doc_matters.conf_make_meta.conf.flag_act0,
- "- flag act1:",
- doc_matters.conf_make_meta.conf.flag_act1,
- "- flag act2:",
- doc_matters.conf_make_meta.conf.flag_act2,
- "- flag act3:",
- doc_matters.conf_make_meta.conf.flag_act3,
- "- flag act4:",
- doc_matters.conf_make_meta.conf.flag_act4,
- "- flag act5:",
- doc_matters.conf_make_meta.conf.flag_act5,
- "- flag act6:",
- doc_matters.conf_make_meta.conf.flag_act6,
- "- flag act7:",
- doc_matters.conf_make_meta.conf.flag_act7,
- "- flag act8:",
- doc_matters.conf_make_meta.conf.flag_act8,
- "- flag act9:",
- doc_matters.conf_make_meta.conf.flag_act9,
+ // "- flag act0:",
+ // doc_matters.conf_make_meta.conf.flag_act0,
"- default papersize:",
doc_matters.conf_make_meta.conf.default_papersize,
"- default text wrap:",
diff --git a/src/doc_reform/meta/metadoc_show_make.d b/src/doc_reform/meta/metadoc_show_make.d
index 854552a..ea533d0 100644
--- a/src/doc_reform/meta/metadoc_show_make.d
+++ b/src/doc_reform/meta/metadoc_show_make.d
@@ -31,7 +31,7 @@ template spineShowMake() {
}
if (doc_matters.opt.action.show_make) {
writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n",
+ "%s\n\"%s\", %s\n%s\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n",
markup.repeat_character_by_number_provided("-", char_repeat_number),
doc_matters.conf_make_meta.meta.title_full,
doc_matters.conf_make_meta.meta.creator_author,
diff --git a/src/doc_reform/meta/metadoc_show_metadata.d b/src/doc_reform/meta/metadoc_show_metadata.d
index 05758b6..f7068c3 100644
--- a/src/doc_reform/meta/metadoc_show_metadata.d
+++ b/src/doc_reform/meta/metadoc_show_metadata.d
@@ -31,7 +31,7 @@ template spineShowMetaData() {
}
if (doc_matters.opt.action.show_metadata) {
writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n",
+ "%s\n\"%s\", %s\n%s\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n",
markup.repeat_character_by_number_provided("-", char_repeat_number),
doc_matters.conf_make_meta.meta.title_full,
doc_matters.conf_make_meta.meta.creator_author,
diff --git a/src/doc_reform/meta/metadoc_show_summary.d b/src/doc_reform/meta/metadoc_show_summary.d
index f774a6d..2c2202c 100644
--- a/src/doc_reform/meta/metadoc_show_summary.d
+++ b/src/doc_reform/meta/metadoc_show_summary.d
@@ -52,7 +52,7 @@ template spineMetaDocSummary() {
}
}
writefln(
- "%s\n\"%s\", %s\n%s [%s]\n%s\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%s",
+ "%s\n\"%s\", %s\n%s [%s]\n%s\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%40-s%10-d\n%s",
markup.repeat_character_by_number_provided("-", char_repeat_number),
doc_matters.conf_make_meta.meta.title_full,
doc_matters.conf_make_meta.meta.creator_author,
diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d
index d4dd201..a5a153e 100644
--- a/src/doc_reform/meta/rgx.d
+++ b/src/doc_reform/meta/rgx.d
@@ -217,8 +217,8 @@ static template spineRgxIn() {
static inline_link_number = ctRegex!(`┥(?P<text>.+?)┝┤(?P<num>[0-9]+)├`, "mg"); // not used
static inline_link_number_only = ctRegex!(`(?P<linked_text>┥.+?┝)┤(?P<num>[0-9]+)├`, "mg");
static inline_link_stow_uri = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>[^ 0-9#┥┝┤├][^ 0-9┥┝┤├]+)├`, "mg"); // will not stow (stowed links) or object number internal links
- static inline_link_hash = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>#(?P<segname>\S+?))├`, "mg");
- static inline_link_seg_and_hash = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>[^/]+?#(?P<segname>.+?))├`, "mg");
+ static inline_link_hash = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>#(?P<hash>\S+?))├`, "mg");
+ static inline_link_seg_and_hash = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>(?P<seg>[^/#├]*)#(?P<hash>.+?))├`, "mg");
static inline_link_clean = ctRegex!(`┤(?:.+?)├|[┥┝]`, "mg");
static inline_link_toc_to_backmatter = ctRegex!(`┤#(?P<link>endnotes|bibliography|bookindex|glossary|blurb)├`, "mg");
static url = ctRegex!(`https?://`, "mg");