aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/meta
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/meta')
-rw-r--r--src/sdp/meta/metadoc.d6
-rw-r--r--src/sdp/meta/read_config_files.d36
2 files changed, 21 insertions, 21 deletions
diff --git a/src/sdp/meta/metadoc.d b/src/sdp/meta/metadoc.d
index eed9f55..44807b2 100644
--- a/src/sdp/meta/metadoc.d
+++ b/src/sdp/meta/metadoc.d
@@ -36,8 +36,8 @@ template SiSUabstraction() {
O _opt_action,
M _manifest,
){
- auto sdl_root_config_document = configReadDoc!()(_manifest, _env, "config_document"); // document config file
- auto sdl_root_config_local_site = configReadSite!()(_manifest, _env, "config_local_site"); // local site config
+ auto sdl_root_config_document = configReadDoc!()(_manifest, _env); // document config file
+ auto sdl_root_config_local_site = configReadSite!()(_manifest, _env); // local site config
auto conf_files_composite_make = confFilesSDLtoStruct!()(sdl_root_config_document, sdl_root_config_local_site);
/+ ↓ read file (filename with path) +/
/+ ↓ file tuple of header and content +/
@@ -47,7 +47,7 @@ template SiSUabstraction() {
);
}
auto _header_body_insertfilelist_imagelist =
- SiSUrawMarkupContent!()(_opt_action, _manifest.src_fn);
+ SiSUrawMarkupContent!()(_opt_action, _manifest.src_path_and_fn);
static assert(!isTypeTuple!(_header_body_insertfilelist_imagelist));
static assert(_header_body_insertfilelist_imagelist.length==4);
debug(steps) {
diff --git a/src/sdp/meta/read_config_files.d b/src/sdp/meta/read_config_files.d
index d816619..57aba7f 100644
--- a/src/sdp/meta/read_config_files.d
+++ b/src/sdp/meta/read_config_files.d
@@ -10,15 +10,13 @@ static template configInSite() {
sdp.output.paths_source,
std.file,
std.path;
- final string configInSite(M,E,C)(M manifest, E env, C conf_sdl) {
- auto possible_config_path_locations = ConfigFilePaths!()(manifest, env).possible_config_path_locations_local_site;
+ final string configInSite(M,E)(M manifest, E env) {
+ auto conf_file_details = ConfigFilePaths!()(manifest, env);
+ string conf_sdl = conf_file_details.config_filename_site;
+ auto possible_config_path_locations = conf_file_details.possible_config_path_locations_local_site;
string config_file_str;
foreach(pth; possible_config_path_locations) {
- auto conf_file = format(
- "%s/%s",
- pth,
- conf_sdl,
- );
+ auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array;
if (config_file_str.length > 0) {
break;
}
@@ -45,15 +43,13 @@ static template configInDoc() {
sdp.output.paths_source,
std.file,
std.path;
- final string configInDoc(M,E,C)(M manifest, E env, C conf_sdl) {
- auto possible_config_path_locations = ConfigFilePaths!()(manifest, env).possible_config_path_locations_document;
+ final string configInDoc(M,E)(M manifest, E env) {
+ auto conf_file_details = ConfigFilePaths!()(manifest, env);
+ string conf_sdl = conf_file_details.config_filename_document;
+ auto possible_config_path_locations = conf_file_details.possible_config_path_locations_document;
string config_file_str;
foreach(pth; possible_config_path_locations) {
- auto conf_file = format(
- "%s/%s",
- pth,
- conf_sdl,
- );
+ auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array;
if (config_file_str.length > 0) {
break;
}
@@ -105,8 +101,10 @@ static template configReadSite() {
std.file,
std.path;
- final auto configReadSite(M,E,C)(M manifest, E env, C conf_sdl) {
- auto configuration = configInSite!()(manifest, env, conf_sdl);
+ final auto configReadSite(M,E)(M manifest, E env) {
+ auto configuration = configInSite!()(manifest, env);
+ auto conf_file_details = ConfigFilePaths!()(manifest, env);
+ string conf_sdl = conf_file_details.config_filename_site;
auto sdl_root = ConfigSDLang!()(configuration, conf_sdl);
return sdl_root;
}
@@ -118,8 +116,10 @@ static template configReadDoc() {
std.file,
std.path;
- final auto configReadDoc(M,E,C)(M manifest, E env, C conf_sdl) {
- auto configuration = configInDoc!()(manifest, env, conf_sdl);
+ final auto configReadDoc(M,E)(M manifest, E env) {
+ auto configuration = configInDoc!()(manifest, env);
+ auto conf_file_details = ConfigFilePaths!()(manifest, env);
+ string conf_sdl = conf_file_details.config_filename_document;
auto sdl_root = ConfigSDLang!()(configuration, conf_sdl);
return sdl_root;
}