diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-07-19 11:56:24 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-10-17 19:07:20 -0400 |
commit | 3b59675bb48254d9ce31edcda2f2b559bff00519 (patch) | |
tree | 618d752c68c2a17eb83a7cbebfa9be6b5c7852ec /src/doc_reform/source | |
parent | texpdf, footer & language setting (diff) |
0.8.0 name change in code use dr (doc reform) instead of sisu
Diffstat (limited to 'src/doc_reform/source')
-rw-r--r-- | src/doc_reform/source/paths_source.d | 84 | ||||
-rw-r--r-- | src/doc_reform/source/read_config_files.d | 4 | ||||
-rw-r--r-- | src/doc_reform/source/read_source_files.d | 4 |
3 files changed, 46 insertions, 46 deletions
diff --git a/src/doc_reform/source/paths_source.d b/src/doc_reform/source/paths_source.d index f315ab9..d02eae2 100644 --- a/src/doc_reform/source/paths_source.d +++ b/src/doc_reform/source/paths_source.d @@ -119,7 +119,7 @@ template PathMatters() { string manifest_file_with_path() { return _manifest.pod_manifest_file_with_path; } - string[] config_sisu_document_make_dirs() { + string[] config_dr_document_make_dirs() { string[] _config_dirs; return _config_dirs; } @@ -398,49 +398,49 @@ template ConfigFilePaths() { ) { struct ConfFilePaths { string config_filename_document_toml() { - return "sisu_document_make"; + return "dr_document_make"; } string config_filename_site_toml() { return "config_local_site"; } auto possible_config_path_locations() { struct _ConfFilePaths { - string[] sisu_document_make() { + string[] dr_document_make() { /+ FIX clean up conf paths ↓ +/ /+ config local site (file system only, not in pod) +/ /+ return paths +/ string[] _possible_config_path_locations; if (_manifest.src.is_pod) { /+ config document in pod +/ - string _sisudoc_conf_pod; // - string _sisudoc_conf_pod_text; // - _sisudoc_conf_pod = asNormalizedPath(chainPath( + string _dr_doc_conf_pod; + string _dr_doc_conf_pod_text; + _dr_doc_conf_pod = asNormalizedPath(chainPath( to!string(_env["pwd"]), _manifest.pod.manifest_path ~ "/conf" )).array; - _sisudoc_conf_pod_text = asNormalizedPath(chainPath( + _dr_doc_conf_pod_text = asNormalizedPath(chainPath( to!string(_env["pwd"]), _manifest.pod.manifest_path ~ "/media/text/" ~ _manifest.src.lng ~ "/conf" )).array; /+ return paths +/ _possible_config_path_locations = [ - _sisudoc_conf_pod_text, - _sisudoc_conf_pod, + _dr_doc_conf_pod_text, + _dr_doc_conf_pod, ]; } else { /+ config document (& or local site) on filesystem +/ - string _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about - string _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array; - string _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array; - string _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array; - string _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array; + string _dr_doc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "dr_doc/conf")).array; // think about + string _dr_doc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array; + string _dr_doc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array; + string _dr_doc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array; + string _dr_doc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array; /+ return paths +/ _possible_config_path_locations = [ - _sisudoc_conf_pwd, - _sisudoc_conf_pwd_a, - _sisudoc_conf_pwd_b, - _sisudoc_conf_pwd_c, - _sisudoc_conf_pwd_d, + _dr_doc_conf_pwd, + _dr_doc_conf_pwd_a, + _dr_doc_conf_pwd_b, + _dr_doc_conf_pwd_c, + _dr_doc_conf_pwd_d, ]; } /+ FIX clean up conf paths ↑ @@ -451,39 +451,39 @@ template ConfigFilePaths() { string[] config_local_site() { /+ FIX clean up conf paths ↓ +/ /+ config local site (file system only, not in pod) +/ - string _dot_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), ".sisu")).array; - string _underscore_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "_sisu")).array; - string _dot_home = asNormalizedPath(chainPath(to!string(_env["home"]), ".sisu")).array; + string _dot_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), ".dr")).array; + string _underscore_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "_dr")).array; + string _dot_home = asNormalizedPath(chainPath(to!string(_env["home"]), ".dr")).array; /+ return paths +/ string[] _possible_config_path_locations; if (_manifest.src.is_pod) { - string _collection_root_a = asNormalizedPath(chainPath(to!string(_manifest.pod.collection_root.to!string), ".sisu")).array; - string _collection_root_b = asNormalizedPath(chainPath(to!string(_manifest.pod.collection_root.to!string), "_sisu")).array; + string _collection_root_a = asNormalizedPath(chainPath(to!string(_manifest.pod.collection_root.to!string), ".dr")).array; + string _collection_root_b = asNormalizedPath(chainPath(to!string(_manifest.pod.collection_root.to!string), "_dr")).array; _possible_config_path_locations = [ _dot_pwd, _underscore_pwd, _dot_home, - "/etc/sisu", + "/etc/dr", _collection_root_a, // set priority higher? _collection_root_b // set priority higher? ]; } else { /+ config document (& or local site) on filesystem +/ - string _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about - string _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array; - string _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array; - string _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array; - string _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array; + string _dr_doc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "dr_doc/conf")).array; + string _dr_doc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array; + string _dr_doc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array; + string _dr_doc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array; + string _dr_doc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array; _possible_config_path_locations = [ - _sisudoc_conf_pwd, - _sisudoc_conf_pwd_a, - _sisudoc_conf_pwd_b, - _sisudoc_conf_pwd_c, - _sisudoc_conf_pwd_d, + _dr_doc_conf_pwd, + _dr_doc_conf_pwd_a, + _dr_doc_conf_pwd_b, + _dr_doc_conf_pwd_c, + _dr_doc_conf_pwd_d, _dot_pwd, _underscore_pwd, _dot_home, - "/etc/sisu" + "/etc/dr" ]; } /+ FIX clean up conf paths ↑ @@ -505,7 +505,7 @@ template DocReformPathsSRC() { D _pwd, Fn _fn_src_and_path, ) { - struct SisuSrcPaths { + struct drSrcPaths { auto pwd() { return _pwd; } @@ -520,7 +520,7 @@ template DocReformPathsSRC() { return _k; } string doc_root() { - return "sisudoc"; + return "dr_doc"; } auto media_root() { return asNormalizedPath(doc_root.chainPath("media")).array; @@ -544,7 +544,7 @@ template DocReformPathsSRC() { return asNormalizedPath(pwd.chainPath(_fn_src_and_path)).array; } } - return SisuSrcPaths(); + return drSrcPaths(); } } @@ -557,7 +557,7 @@ template DocReformPathsPods() { string _base_dir_pod = (doc_matters.output_path.length > 0) ? doc_matters.output_path ~ "/pod" : "/pod"; - string _base_dir_doc = "sisudoc"; + string _base_dir_doc = "dr_doc"; struct _PodPaths { string base_filename_(string fn_src) { auto pth = fn_src.baseName.stripExtension; @@ -567,7 +567,7 @@ template DocReformPathsPods() { auto pth = _base_dir_pod; return pth; } - string sisudoc_dir_() { + string dr_doc_dir_() { auto pth = _base_dir_doc; return pth; } @@ -626,7 +626,7 @@ template DocReformPathsPods() { } auto pod_root(string fn_src) { auto pth_1_ = ""; - auto pth_2_ = asNormalizedPath(base(fn_src).filesystem_open_zpod.chainPath("")).array; // "sisudoc" + auto pth_2_ = asNormalizedPath(base(fn_src).filesystem_open_zpod.chainPath("")).array; struct _pods { auto zpod() { return pth_1_; diff --git a/src/doc_reform/source/read_config_files.d b/src/doc_reform/source/read_config_files.d index dbcda7c..0855eab 100644 --- a/src/doc_reform/source/read_config_files.d +++ b/src/doc_reform/source/read_config_files.d @@ -48,7 +48,7 @@ static template configReadInDocTOML() { final string configReadInDocTOML(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); string conf_toml = conf_file_details.config_filename_document_toml; - string[] possible_config_path_locations = conf_file_details.possible_config_path_locations.sisu_document_make; + string[] possible_config_path_locations = conf_file_details.possible_config_path_locations.dr_document_make; string config_file_str; debug(io) { writeln("WARNING (io debug) in config filename: ", conf_toml); @@ -149,7 +149,7 @@ static template readConfigDoc() { string config_file_str; string conf_filename = "NONE"; auto _conf_file_details = ConfigFilePaths!()(_manifest, _env); - string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.sisu_document_make; + string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.dr_document_make; foreach(conf_fn; [_conf_file_details.config_filename_document_toml]) { foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array; diff --git a/src/doc_reform/source/read_source_files.d b/src/doc_reform/source/read_source_files.d index 0bd7b8c..b19582d 100644 --- a/src/doc_reform/source/read_source_files.d +++ b/src/doc_reform/source/read_source_files.d @@ -116,7 +116,7 @@ static template DocReformRawMarkupContent() { static auto rgx = Rgx(); enforce( fn_src.match(rgx.src_pth_sst_or_ssm), - "not a sisu markup filename: «" ~ + "not a dr markup filename: «" ~ fn_src ~ "»" ); auto source_txt_str = readInMarkupSource(fn_src); @@ -143,7 +143,7 @@ static template DocReformRawMarkupContent() { ) { enforce( fn_src_insert.match(rgx_file), - "not a sisu markup filename: «" ~ + "not a dr markup filename: «" ~ fn_src_insert ~ "»" ); auto source_txt_str = readInMarkupSource(fn_src_insert); |