From 4ff01a81f048c0b496cc03627324b69b7aebd368 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 7 Sep 2017 16:54:23 -0400 Subject: 0.19.0 conf make meta, composite struct, instead of associative array * remove conf make meta associative arrays, including native doc header (which revisit) --- org/meta_read_source_files.org | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'org/meta_read_source_files.org') diff --git a/org/meta_read_source_files.org b/org/meta_read_source_files.org index c8355ae..c7fe354 100644 --- a/org/meta_read_source_files.org +++ b/org/meta_read_source_files.org @@ -44,13 +44,27 @@ module sdp.meta.read_config_files; #+name: meta_config_file_in #+BEGIN_SRC d -template configIn() { +static template configIn() { <> final string configIn(C,E)(C conf_sdl, E env) { + /+ FIX clean up conf paths ↓ +/ + string sisudoc_conf_pwd = chainPath(to!string(env["pwd"]), "sisudoc/conf").array; + string sisudoc_conf_pwd_a = chainPath(to!string(env["pwd"]), "conf").array; + string sisudoc_conf_pwd_b = chainPath(to!string(env["pwd"]), "../conf").array; + string sisudoc_conf_pwd_c = chainPath(to!string(env["pwd"]), "../../conf").array; + string sisudoc_conf_pwd_d = chainPath(to!string(env["pwd"]), "../../../conf").array; + /+ FIX clean up conf paths ↑ + (compare pwd to doc path location, and build config path) + +/ string dot_pwd = chainPath(to!string(env["pwd"]), ".sisu").array; string underscore_pwd = chainPath(to!string(env["pwd"]), "_sisu").array; string dot_home = chainPath(to!string(env["home"]), ".sisu").array; string[] possible_config_path_locations = [ + sisudoc_conf_pwd, + sisudoc_conf_pwd_a, + sisudoc_conf_pwd_b, + sisudoc_conf_pwd_c, + sisudoc_conf_pwd_d, dot_pwd, underscore_pwd, dot_home, @@ -63,6 +77,9 @@ template configIn() { pth, conf_sdl, ); + if (config_file_str.length > 0) { + break; + } try { if (exists(conf_file)) { debug(configfile) { @@ -89,7 +106,7 @@ template configIn() { /+ +/ -template ConfigSDLang() { +static template ConfigSDLang() { import sdlang; <> <> @@ -120,7 +137,7 @@ auto ConfigSDLang(string configuration, string conf_sdl_filename) { #+BEGIN_SRC d /+ +/ -template configRead() { +static template configRead() { <> <> <> @@ -156,7 +173,7 @@ final auto configRead(C,E)(C conf_sdl, E env) { - if master file scan for addional files to import/insert +/ module sdp.meta.read_source_files; -template SiSUrawMarkupContent() { +static template SiSUrawMarkupContent() { import sdp.meta.rgx; <> -- cgit v1.2.3