aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/in_source_files.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-04-04 17:25:56 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2020-05-20 11:27:25 -0400
commitdb96528baa55151826442f61ddfea2cd006ef68d (patch)
tree1325fd983b466d8157248648b6ef8a33beee5a93 /org/in_source_files.org
parentsql, sqlite internal site links (diff)
config, where used without document processing
Diffstat (limited to 'org/in_source_files.org')
-rw-r--r--org/in_source_files.org13
1 files changed, 8 insertions, 5 deletions
diff --git a/org/in_source_files.org b/org/in_source_files.org
index eb813db..05e9889 100644
--- a/org/in_source_files.org
+++ b/org/in_source_files.org
@@ -56,7 +56,7 @@ import
#+NAME: meta_config_file_hub
#+BEGIN_SRC d
template readConfigSite() {
- @system final auto readConfigSite(C)(C _conf_file_details) {
+ @system final auto readConfigSite(C,O)(C _conf_file_details, O _opt_action) {
mixin spineRgxIn;
static auto rgx = RgxI();
string conf_filename = "NONE";
@@ -114,6 +114,9 @@ webserv:
try {
if (exists(conf_file)) {
if (conf_file.getLinkAttributes.attrIsFile) {
+ if (_opt_action.verbose || _opt_action.very_verbose || _opt_action.debug_do) {
+ writeln("config file used: \"", conf_file, "\" (cli flag settings override config file's individual settings)");
+ }
config_file_str = conf_file.readText;
break;
}
@@ -137,7 +140,7 @@ webserv:
config_file_str = default_config_file_str;
}
}
- if (config_file_str.length == 0) { /+ create dummy default config file +/
+ if (config_file_str.length == 0) { /+ use dummy default config file +/
writeln("WARNING config file NOT found, default provided");
conf_filename = "VIRTUAL";
config_file_str = default_config_file_str;
@@ -176,7 +179,7 @@ static template readConfigDoc() {
static auto rgx = RgxI();
string config_file_str;
string conf_filename = "NONE";
- auto _conf_file_details = ConfigFilePaths!()(_manifested, _env);
+ auto _conf_file_details = configFilePaths!()(_manifested, _env);
string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.dr_document_make;
foreach(conf_fn; [_conf_file_details.config_filename_document]) {
foreach(pth; possible_config_path_locations) {
@@ -228,7 +231,7 @@ static template configReadSiteYAML() {
<<imports_spine>>;
@safe final YAMLDocument configReadSiteYAML(M,E)(M _manifested, E _env) {
string _configuration = configReadInSiteYAML!()(_manifested, _env);
- auto _conf_file_details = ConfigFilePaths!()(_manifested, _env);
+ auto _conf_file_details = configFilePaths!()(_manifested, _env);
string _conf_yaml_fn = _conf_file_details.config_filename_site;
YAMLDocument _yaml_conf = configYAML!()(_configuration, _conf_yaml_fn);
return _yaml_conf;
@@ -240,7 +243,7 @@ static template configReadDocYAML() {
<<imports_spine>>;
@safe final YAMLDocument configReadDocYAML(M,E)(M _manifested, E _env) {
string _configuration = configReadInDocYAML!()(_manifested, _env);
- auto _conf_file_details = ConfigFilePaths!()(_manifested, _env);
+ auto _conf_file_details = configFilePaths!()(_manifested, _env);
string _conf_yaml_fn = _conf_file_details.config_filename_document;
YAMLDocument _yaml_conf = configYAML!()(_configuration, _conf_yaml_fn);
return _yaml_conf;