From 2e852762085122d1b36641a04bcc63d5235139cd Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 15 Dec 2017 14:06:16 -0500 Subject: 0.23.2 config paths for pod --- src/sdp/meta/metadoc.d | 12 ++++++------ src/sdp/meta/read_config_files.d | 8 ++++---- src/sdp/meta/read_source_files.d | 6 +++--- src/sdp/meta/rgx.d | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/sdp/meta') diff --git a/src/sdp/meta/metadoc.d b/src/sdp/meta/metadoc.d index e3947e5..8fafc24 100644 --- a/src/sdp/meta/metadoc.d +++ b/src/sdp/meta/metadoc.d @@ -31,14 +31,14 @@ template SiSUabstraction() { enum makeMeta { make, meta } enum docAbst { doc_abstraction, section_keys, segnames, segnames_0_4, images } static auto rgx = Rgx(); - auto SiSUabstraction(M,O,E)( - M _manifest, - O _opt_action, + auto SiSUabstraction(E,O,M)( E _env, + O _opt_action, + M _manifest, ){ - auto sdl_root_config_share = configRead!()("config_share", _env); - auto sdl_root_config_local = configRead!()("config_local", _env); - auto conf_files_composite_make = confFilesSDLtoStruct!()(sdl_root_config_share, sdl_root_config_local); + auto sdl_root_config_document = configRead!()(_manifest, _env, "config_document"); // document config file + auto sdl_root_config_local_site = configRead!()(_manifest, _env, "config_local_site"); // 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 +/ debug(steps) { diff --git a/src/sdp/meta/read_config_files.d b/src/sdp/meta/read_config_files.d index 369d9c2..b3c7f1b 100644 --- a/src/sdp/meta/read_config_files.d +++ b/src/sdp/meta/read_config_files.d @@ -10,8 +10,8 @@ static template configIn() { sdp.output.paths_source, std.file, std.path; - final string configIn(C,E)(C conf_sdl, E env) { - auto possible_config_path_locations = ConfigFilePaths!()(env).possible_config_path_locations; + final string configIn(M,E,C)(M manifest, E env, C conf_sdl) { + auto possible_config_path_locations = ConfigFilePaths!()(manifest, env).possible_config_path_locations; string config_file_str; foreach(pth; possible_config_path_locations) { auto conf_file = format( @@ -70,8 +70,8 @@ static template configRead() { std.file, std.path; - final auto configRead(C,E)(C conf_sdl, E env) { - auto configuration = configIn!()(conf_sdl, env); + final auto configRead(M,E,C)(M manifest, E env, C conf_sdl) { + auto configuration = configIn!()(manifest, env, conf_sdl); auto sdl_root = ConfigSDLang!()(configuration, conf_sdl); return sdl_root; } diff --git a/src/sdp/meta/read_source_files.d b/src/sdp/meta/read_source_files.d index 2fce0be..95a9dbe 100644 --- a/src/sdp/meta/read_source_files.d +++ b/src/sdp/meta/read_source_files.d @@ -115,7 +115,7 @@ static template SiSUrawMarkupContent() { auto markupSourceReadIn(in string fn_src) { static auto rgx = Rgx(); enforce( - fn_src.match(rgx.src_pth), + fn_src.match(rgx.src_pth_sst_or_ssm), "not a sisu markup filename: «" ~ fn_src ~ "»" ); @@ -161,7 +161,7 @@ static template SiSUrawMarkupContent() { mixin SiSUrgxInitFlags; char[][] contents_insert; auto type1 = flags_type_init; - auto fn_pth_full = fn_src.match(rgx.src_pth); + auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; foreach (line; markup_sourcefile_insert_content) { if (type1["curly_code"] == 1) { @@ -260,7 +260,7 @@ static template SiSUrawMarkupContent() { mixin SiSUrgxInitFlags; char[][] contents; auto type = flags_type_init; - auto fn_pth_full = fn_src.match(rgx.src_pth); + auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; char[][] contents_insert; string[] _images =[]; diff --git a/src/sdp/meta/rgx.d b/src/sdp/meta/rgx.d index 73f7bfe..37db8e7 100644 --- a/src/sdp/meta/rgx.d +++ b/src/sdp/meta/rgx.d @@ -196,7 +196,7 @@ static template SiSUrgxInit() { static nbsp_chars_line_start = ctRegex!(`^░+`, "mg"); static nbsp_and_space = ctRegex!(` [ ]`, "mg"); static nbsp_char_and_space = ctRegex!(`░[ ]`, "mg"); - static src_pth = ctRegex!(`^(?P[/]?(?:[a-zA-Z0-9._-]+/)*)(?P[a-zA-Z0-9._-]+[.]ss[tm])$`); + static src_pth_sst_or_ssm = ctRegex!(`^(?P[/]?(?:[a-zA-Z0-9._-]+/)*)(?P[a-zA-Z0-9._-]+[.]ss[tm])$`); static src_pth_contents = ctRegex!(`^(?P[/]?(?:[a-zA-Z0-9._-]+/)*)(?P[a-zA-Z0-9._-]+)/sisupod[.]manifest$`); static src_pth_zip = ctRegex!(`^(?P[/]?(?:[a-zA-Z0-9._-]+/)*)(?P[a-zA-Z0-9._-]+[.]zip)$`); static src_pth_unzip_pod = ctRegex!(`^(?Pmedia/text/[a-z]{2}/)*(?P[a-zA-Z0-9._-]+[.]ss[im])$`); -- cgit v1.2.3