aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_read_source_files.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/meta_read_source_files.org')
-rw-r--r--org/meta_read_source_files.org139
1 files changed, 4 insertions, 135 deletions
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;
<<meta_config_file_in>>
-<<meta_config_file_sdl>>
<<meta_config_file_toml>>
<<meta_config_file_hub>>
#+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() {
- <<imports_std>>
- 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() {
- <<imports_std>>
- 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;
- <<imports_std>>
- 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() {
- <<imports_std>>
- 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() {
- <<imports_std>>
- 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() {
<<meta_markup_source_raw_get_insert_source_line_array>>
}
struct Inserts {
- import sdp.meta.conf_make_meta_sdlang;
auto scan_subdoc_source(O)(
O _opt_action,
char[][] markup_sourcefile_insert_content,