From cf2fd4660ed50da2fbccec7912e429f1d5e37377 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 27 Feb 2018 15:40:05 -0500 Subject: 0.25.0 remove sdlang (headers, conf, make doc) --- org/meta_read_source_files.org | 139 ++--------------------------------------- 1 file changed, 4 insertions(+), 135 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 b97eb36..0879ab5 100644 --- a/org/meta_read_source_files.org +++ b/org/meta_read_source_files.org @@ -37,12 +37,11 @@ import +/ module sdp.meta.read_config_files; <> -<> <> <> #+END_SRC -*** 0. read config files (config_local_site & sisu_document_make) toml or sdlang +*** 0. read config files (config_local_site & sisu_document_make) toml **** 1. site configuration #+name: meta_config_file_hub @@ -54,7 +53,7 @@ static template readConfigSite() { string conf_filename = "NONE"; auto _conf_file_details = ConfigFilePaths!()(_manifest, _env); auto possible_config_path_locations = _conf_file_details.possible_config_path_locations.config_local_site; - foreach(conf_fn; [_conf_file_details.config_filename_site_toml, _conf_file_details.config_filename_site_sdl]) { + foreach(conf_fn; [_conf_file_details.config_filename_site_toml]) { foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_fn)).array; conf_filename = conf_fn; @@ -106,7 +105,7 @@ static template readConfigDoc() { string conf_filename = "NONE"; auto _conf_file_details = ConfigFilePaths!()(_manifest, _env); auto possible_config_path_locations = _conf_file_details.possible_config_path_locations.sisu_document_make; - foreach(conf_fn; [_conf_file_details.config_filename_document_toml, _conf_file_details.config_filename_document_sdl]) { + foreach(conf_fn; [_conf_file_details.config_filename_document_toml]) { foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_fn)).array; conf_filename = conf_fn; @@ -146,136 +145,7 @@ static template readConfigDoc() { } #+END_SRC -** A. SDLang -*** 1. SDLang read config files (config_local_site & sisu_document_make) :file:config: -**** SDLang config_local_site - -#+name: meta_config_file_in -#+BEGIN_SRC d -static template configReadInSiteSDL() { - <> - final string configReadInSiteSDL(M,E)(M manifest, E env) { - auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_site_sdl; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations.config_local_site; - string config_file_str; - debug(io) { - writeln("WARNING (io debug) in config filename: ", conf_sdl); - writeln("WARNING (io debug) in config possible path locations: ", possible_config_path_locations); - } - foreach(pth; possible_config_path_locations) { - auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; - if (config_file_str.length > 0) { - break; - } - try { - if (exists(conf_file)) { - debug(io) { - writeln("WARNING (io debug) in config file found: ", conf_file); - } - config_file_str = conf_file.readText; - break; - } - } - catch (ErrnoException ex) { - } - catch (FileException ex) { - } - } - return config_file_str; - } -} -#+END_SRC - -**** SDLang sisu_document_make - -#+name: meta_config_file_in -#+BEGIN_SRC d -static template configReadInDocSDL() { - <> - final string configReadInDocSDL(M,E)(M manifest, E env) { - auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_document_sdl; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations.sisu_document_make; - string config_file_str; - debug(io) { - writeln("WARNING (io debug) in config filename: ", conf_sdl); - writeln("WARNING (io debug) in config possible path locations: ", possible_config_path_locations); - } - foreach(pth; possible_config_path_locations) { - auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; - if (config_file_str.length > 0) { - break; - } - try { - if (exists(conf_file)) { - debug(io) { - writeln("WARNING (io debug) in config file found: ", conf_file); - } - config_file_str = conf_file.readText; - break; - } - } - catch (ErrnoException ex) { - } - catch (FileException ex) { - } - } - return config_file_str; - } -} -#+END_SRC - -*** 2. SDLang config files get (sdlang root tag) - -#+name: meta_config_file_sdl -#+BEGIN_SRC d -static template configSDLang() { - import sdlang; - <> - auto configSDLang(string configuration, string conf_sdl_filename) { - Tag sdl_root_conf; - try { - sdl_root_conf = parseSource(configuration); - } - catch(ParseException e) { - stderr.writeln("SDLang problem with content for ", conf_sdl_filename); - stderr.writeln(e.msg); - } - return sdl_root_conf; - } -} -#+END_SRC - -*** 3. SDLang config (config_local_site & sisu_document_make) :file:config:hub: - -#+name: meta_config_file_hub -#+BEGIN_SRC d -static template configReadSiteSDLang() { - <> - import sdlang; - final auto configReadSiteSDLang(M,E)(M manifest, E env) { - auto configuration = configReadInSiteSDL!()(manifest, env); - auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_site_sdl; - auto sdl_root = configSDLang!()(configuration, conf_sdl); - return sdl_root; - } -} -static template configReadDocSDLang() { - <> - import sdlang; - final auto configReadDocSDLang(M,E)(M manifest, E env) { - auto configuration = configReadInDocSDL!()(manifest, env); - auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_document_sdl; - auto sdl_root = configSDLang!()(configuration, conf_sdl); - return sdl_root; - } -} -#+END_SRC - -** B. TOML +** A. TOML *** 1. TOML read config files (config_local_site & sisu_document_make) :file:config: **** TOML config_local_site @@ -485,7 +355,6 @@ static template SiSUrawMarkupContent() { <> } struct Inserts { - import sdp.meta.conf_make_meta_sdlang; auto scan_subdoc_source(O)( O _opt_action, char[][] markup_sourcefile_insert_content, -- cgit v1.2.3