diff options
author | Ralph Amissah <ralph@amissah.com> | 2017-06-06 17:58:10 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | e280a374991a3a6db3c40fd1fa03a2d9c6fa66eb (patch) | |
tree | 730441b0371f6f65794a5e598000e89c06127bed /org/ao_read_source_files.org | |
parent | getopt, fixes, & naming command line options related (diff) |
naming mostly
Diffstat (limited to 'org/ao_read_source_files.org')
-rw-r--r-- | org/ao_read_source_files.org | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/org/ao_read_source_files.org b/org/ao_read_source_files.org index 930d3f8..7bbaca9 100644 --- a/org/ao_read_source_files.org +++ b/org/ao_read_source_files.org @@ -25,7 +25,7 @@ import std.path; #+END_SRC -* 1. get config file (read in) :module:sdp:ao_read_config_files: +* 1. get _config file_ (read in) :module:sdp:ao_read_config_files: ** 0. module template #+BEGIN_SRC d :tangle ../src/sdp/ao/read_config_files.d @@ -44,9 +44,9 @@ module sdp.ao.read_config_files; #+name: ao_config_file_in #+BEGIN_SRC d -template ConfigIn() { +template configIn() { <<imports_std>> - final string ConfigIn(C,E)(C conf_sdl, E env) { + final string configIn(C,E)(C conf_sdl, E env) { 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; @@ -109,13 +109,6 @@ auto ConfigSDLang(string configuration, string conf_sdl_filename) { stderr.writeln("SDLang problem with content for ", conf_sdl_filename); stderr.writeln(e.msg); } - debug(sdlang) { - Value output_dir_structure_by = sdl_root_conf.tags["output_dir_structure_by"][0].values[0]; - assert(output_dir_structure_by.type == typeid(string)); - writeln(output_dir_structure_by); - writeln("conf SDL:"); - writeln(sdl_root_conf.toSDLDocument()); - } return sdl_root_conf; } #+END_SRC @@ -127,7 +120,7 @@ auto ConfigSDLang(string configuration, string conf_sdl_filename) { #+BEGIN_SRC d /+ +/ -template ConfigHub() { +template configRead() { <<imports_std>> <<ao_config_file_import_sdlang>> <<ao_config_file_sdlang_hub>> @@ -142,16 +135,18 @@ import sdlang; *** config hub function +Read in sdl config file name given, and return sdl root + #+name: ao_config_file_sdlang_hub #+BEGIN_SRC d -final auto ConfigHub(C,E)(C conf_sdl, E env) { - auto configuration = ConfigIn!()(conf_sdl, env); +final auto configRead(C,E)(C conf_sdl, E env) { + auto configuration = configIn!()(conf_sdl, env); auto sdl_root = ConfigSDLang!()(configuration, conf_sdl); return sdl_root; } #+END_SRC -* 2. get markup source, read file :module:sdp:ao_read_source_files: +* 2. get _markup source_, read file :module:sdp:ao_read_source_files: ** 0. module template #+BEGIN_SRC d :tangle ../src/sdp/ao/read_source_files.d @@ -352,14 +347,14 @@ auto markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) { #+name: ao_markup_source_raw_get_insert_source_line_array #+BEGIN_SRC d final char[][] getInsertMarkupSourceContentRawLineArray( - in char[] fn_src, + in char[] fn_src_insert, Regex!(char) rgx_file ) { enforce( - fn_src.match(rgx_file), + fn_src_insert.match(rgx_file), "not a sisu markup filename" ); - auto source_txt_str = readInMarkupSource(fn_src); + auto source_txt_str = readInMarkupSource(fn_src_insert); auto source_line_arr = markupSourceLineArray(source_txt_str); return source_line_arr; } |