aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-10-02 15:17:02 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-10-17 19:07:20 -0400
commit5e23b12e0cdc531554e21ca464d2d0a2f8205645 (patch)
tree010335171b2331269d21cbcda3f169c36a09c4db /org
parentdocument headers & config: yaml introduced (diff)
path related, mostly cosmetic code
Diffstat (limited to 'org')
-rw-r--r--org/default_paths.org238
-rw-r--r--org/default_regex.org4
-rw-r--r--org/doc_reform.org3
-rw-r--r--org/source_files_read.org8
4 files changed, 126 insertions, 127 deletions
diff --git a/org/default_paths.org b/org/default_paths.org
index e4c6c8a..6fa9078 100644
--- a/org/default_paths.org
+++ b/org/default_paths.org
@@ -158,7 +158,7 @@ template PathMatters() {
return (_manifest.pod_manifest_path.length > 0) ? true : false;
}
auto collection_root() {
- auto _collection_root = asNormalizedPath(chainPath(_manifest.pod_manifest_path, "..")).array;
+ auto _collection_root = ((chainPath(_manifest.pod_manifest_path, "..")).asNormalizedPath).array;
return _collection_root;
}
string manifest_filename() {
@@ -306,10 +306,10 @@ template PathMatters() {
auto m = (absolute_path_to_src)
.match(regex(r"[/](?P<dir>(?:[a-zA-Z0-9._-]+))/pod/" ~ filename.stripExtension))
) {
- _dir = asNormalizedPath(path_and_fn.chainPath("../../")).array;
+ _dir = ((path_and_fn.chainPath("../../")).asNormalizedPath).array;
assert(_dir == m.captures["dir"]);
} else {
- _dir = asNormalizedPath(path_and_fn.chainPath("../../../")).array;
+ _dir = ((path_and_fn.chainPath("../../../")).asNormalizedPath).array;
assert(_dir == absolute_path_to_src
.match(rgx.src_base_parent_dir_name).captures["dir"]);
}
@@ -324,9 +324,9 @@ template PathMatters() {
auto m = (absolute_path_to_src)
.match(regex(r"[/](?P<dir>(?:[a-zA-Z0-9._-]+))/pod/" ~ filename.stripExtension))
) {
- _dir = asNormalizedPath(path_and_fn.chainPath("../../")).array;
+ _dir = ((path_and_fn.chainPath("../../")).asNormalizedPath).array;
} else {
- _dir = asNormalizedPath(path_and_fn.chainPath("../../../")).array;
+ _dir = ((path_and_fn.chainPath("../../../")).asNormalizedPath).array;
}
return _dir;
}
@@ -336,14 +336,14 @@ template PathMatters() {
auto m = (absolute_path_to_src)
.match(rgx.src_formalised_file_path_parts)
) {
- _dir = asNormalizedPath(m.captures["pth"]).array;
+ _dir = ((m.captures["pth"]).asNormalizedPath).array;
} else if (
auto m = (absolute_path_to_src)
.match(regex(r"[/](?P<dir>(?:[a-zA-Z0-9._-]+))/pod/" ~ filename.stripExtension))
) {
- _dir = asNormalizedPath(path_and_fn.chainPath("../")).array;
+ _dir = ((path_and_fn.chainPath("../")).asNormalizedPath).array;
} else {
- _dir = asNormalizedPath(path_and_fn.chainPath("../../")).array;
+ _dir = ((path_and_fn.chainPath("../../")).asNormalizedPath).array;
}
if (_opt_actions.debug_do) {
writeln("--> (base_dir_path) ", _dir);
@@ -351,7 +351,7 @@ template PathMatters() {
return _dir;
}
string media_dir_path() {
- string _dir = asNormalizedPath(base_dir_path.chainPath("media")).array;
+ string _dir = ((base_dir_path.chainPath("media")).asNormalizedPath).array;
return _dir;
}
string image_dir_path() {
@@ -359,10 +359,10 @@ template PathMatters() {
string[] _possible_img_pths = [ "./image", "../image", "../../image" ];
string _img_pth_found = "";
if (is_pod) {
- _img_pth_found = asNormalizedPath(file_with_absolute_path.dirName ~ "/../../image").array;
+ _img_pth_found = ((file_with_absolute_path.dirName ~ "/../../image").asNormalizedPath).array;
} else {
string _img_pth(string _possible_img_pth) {
- return asNormalizedPath(file_with_absolute_path.dirName ~ "/" ~ _possible_img_pth).array;
+ return ((file_with_absolute_path.dirName ~ "/" ~ _possible_img_pth).asNormalizedPath).array;
}
foreach(_possible_img_pth; _possible_img_pths) {
if (exists(_img_pth(_possible_img_pth))) {
@@ -379,7 +379,7 @@ template PathMatters() {
return _img_pth_found;
}
auto conf_dir_path() {
- return asNormalizedPath(base_dir_path.chainPath("conf")).array;
+ return ((base_dir_path.chainPath("conf")).asNormalizedPath).array;
}
auto base_parent_dir() {
string _dir;
@@ -420,7 +420,7 @@ template PathMatters() {
if ((_opt_actions.output_dir_set.length > 0)
&& isValidPath(_opt_actions.output_dir_set)
) {
- _output_path = asNormalizedPath(_opt_actions.output_dir_set).array;
+ _output_path = ((_opt_actions.output_dir_set).asNormalizedPath).array;
if (!exists(_output_path)) {
try {
_output_path.mkdirRecurse;
@@ -489,11 +489,11 @@ template ConfigFilePaths() {
];
} else {
/+ config document (& or local site) on filesystem +/
- 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;
+ string _dr_doc_conf_pwd = ((chainPath(to!string(_env["pwd"]), "dr_doc/conf")).asNormalizedPath).array; // think about
+ string _dr_doc_conf_pwd_a = ((chainPath(to!string(_env["pwd"]), "conf")).asNormalizedPath).array;
+ string _dr_doc_conf_pwd_b = ((chainPath(to!string(_env["pwd"]), "../conf")).asNormalizedPath).array;
+ string _dr_doc_conf_pwd_c = ((chainPath(to!string(_env["pwd"]), "../../conf")).asNormalizedPath).array;
+ string _dr_doc_conf_pwd_d = ((chainPath(to!string(_env["pwd"]), "../../../conf")).asNormalizedPath).array;
/+ return paths +/
_possible_config_path_locations = [
_dr_doc_conf_pwd,
@@ -511,14 +511,14 @@ 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"]), ".dr")).array;
- string _underscore_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "_dr")).array;
- string _dot_home = asNormalizedPath(chainPath(to!string(_env["home"]), ".dr")).array;
+ string _dot_pwd = ((chainPath(to!string(_env["pwd"]), ".dr")).asNormalizedPath).array;
+ string _underscore_pwd = ((chainPath(to!string(_env["pwd"]), "_dr")).asNormalizedPath).array;
+ string _dot_home = ((chainPath(to!string(_env["home"]), ".dr")).asNormalizedPath).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), ".dr")).array;
- string _collection_root_b = asNormalizedPath(chainPath(to!string(_manifest.pod.collection_root.to!string), "_dr")).array;
+ string _collection_root_a = ((chainPath(to!string(_manifest.pod.collection_root.to!string), ".dr")).asNormalizedPath).array;
+ string _collection_root_b = ((chainPath(to!string(_manifest.pod.collection_root.to!string), "_dr")).asNormalizedPath).array;
_possible_config_path_locations = [
_dot_pwd,
_underscore_pwd,
@@ -529,11 +529,11 @@ template ConfigFilePaths() {
];
} else {
/+ config document (& or local site) on filesystem +/
- 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;
+ string _dr_doc_conf_pwd = ((chainPath(to!string(_env["pwd"]), "dr_doc/conf")).asNormalizedPath).array;
+ string _dr_doc_conf_pwd_a = ((chainPath(to!string(_env["pwd"]), "conf")).asNormalizedPath).array;
+ string _dr_doc_conf_pwd_b = ((chainPath(to!string(_env["pwd"]), "../conf")).asNormalizedPath).array;
+ string _dr_doc_conf_pwd_c = ((chainPath(to!string(_env["pwd"]), "../../conf")).asNormalizedPath).array;
+ string _dr_doc_conf_pwd_d = ((chainPath(to!string(_env["pwd"]), "../../../conf")).asNormalizedPath).array;
_possible_config_path_locations = [
_dr_doc_conf_pwd,
_dr_doc_conf_pwd_a,
@@ -635,25 +635,25 @@ template DocReformPathsSRC() {
return "dr_doc";
}
auto media_root() {
- return asNormalizedPath(doc_root.chainPath("media")).array;
+ return ((doc_root.chainPath("media")).asNormalizedPath).array;
}
auto conf_root() {
- return asNormalizedPath(doc_root.chainPath("conf")).array;
+ return ((doc_root.chainPath("conf")).asNormalizedPath).array;
}
auto text_root() {
- return asNormalizedPath(media_root.chainPath("text")).array;
+ return ((media_root.chainPath("text")).asNormalizedPath).array;
}
auto image_root() {
- return asNormalizedPath(media_root.chainPath("image")).array;
+ return ((media_root.chainPath("image")).asNormalizedPath).array;
}
auto doc_src_fn_with_path_for_text_root_and_lng() {
- return asNormalizedPath(text_root.chainPath(language)).array;
+ return ((text_root.chainPath(language)).asNormalizedPath).array;
}
auto doc_src_fn() {
- return asNormalizedPath(_fn_src_and_path.baseName).array;
+ return ((_fn_src_and_path.baseName).asNormalizedPath).array;
}
auto doc_src_with_path() {
- return asNormalizedPath(pwd.chainPath(_fn_src_and_path)).array;
+ return ((pwd.chainPath(_fn_src_and_path)).asNormalizedPath).array;
}
}
return drSrcPaths();
@@ -742,7 +742,7 @@ template DocReformPathsPods() {
}
auto pod_root(string fn_src) {
auto pth_1_ = "";
- auto pth_2_ = asNormalizedPath(base(fn_src).filesystem_open_zpod.chainPath("")).array;
+ auto pth_2_ = ((base(fn_src).filesystem_open_zpod.chainPath("")).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -756,7 +756,7 @@ template DocReformPathsPods() {
auto conf_root(string fn_src) {
auto pod_root_ = pod_root(fn_src);
auto pth_1_ = "conf";
- auto pth_2_ = asNormalizedPath(pod_root(fn_src).filesystem_open_zpod.chainPath("conf")).array;
+ auto pth_2_ = ((pod_root(fn_src).filesystem_open_zpod.chainPath("conf")).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -770,8 +770,8 @@ template DocReformPathsPods() {
}
auto css(string fn_src) {
auto pod_root_ = pod_root(fn_src);
- auto pth_1_ = asNormalizedPath(conf_root(fn_src).zpod.chainPath("css")).array;
- auto pth_2_ = asNormalizedPath(conf_root(fn_src).filesystem_open_zpod.chainPath("css")).array;
+ auto pth_1_ = ((conf_root(fn_src).zpod.chainPath("css")).asNormalizedPath).array;
+ auto pth_2_ = ((conf_root(fn_src).filesystem_open_zpod.chainPath("css")).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -786,7 +786,7 @@ template DocReformPathsPods() {
auto media_root(string fn_src) {
auto pod_root_ = pod_root(fn_src);
auto pth_1_ = "media";
- auto pth_2_ = asNormalizedPath(pod_root(fn_src).filesystem_open_zpod.chainPath("media")).array;
+ auto pth_2_ = ((pod_root(fn_src).filesystem_open_zpod.chainPath("media")).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -800,8 +800,8 @@ template DocReformPathsPods() {
}
auto text_root(string fn_src) {
auto pod_root_ = pod_root(fn_src);
- auto pth_1_ = asNormalizedPath(media_root(fn_src).zpod.chainPath("text")).array;
- auto pth_2_ = asNormalizedPath(media_root(fn_src).filesystem_open_zpod.chainPath("text")).array;
+ auto pth_1_ = ((media_root(fn_src).zpod.chainPath("text")).asNormalizedPath).array;
+ auto pth_2_ = ((media_root(fn_src).filesystem_open_zpod.chainPath("text")).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -830,8 +830,8 @@ template DocReformPathsPods() {
}
auto doc_lng(string fn_src, string lng) {
auto pod_root_ = pod_root(fn_src);
- auto pth_1_ = asNormalizedPath(text_root(fn_src).zpod.chainPath(lng)).array;
- auto pth_2_ = asNormalizedPath(text_root(fn_src).filesystem_open_zpod.chainPath(lng)).array;
+ auto pth_1_ = ((text_root(fn_src).zpod.chainPath(lng)).asNormalizedPath).array;
+ auto pth_2_ = ((text_root(fn_src).filesystem_open_zpod.chainPath(lng)).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -845,8 +845,8 @@ template DocReformPathsPods() {
}
auto image_root(string fn_src) {
auto pod_root_ = pod_root(fn_src);
- auto pth_1_ = asNormalizedPath(media_root(fn_src).zpod.chainPath("image")).array;
- auto pth_2_ = asNormalizedPath(media_root(fn_src).filesystem_open_zpod.chainPath("image")).array;
+ auto pth_1_ = ((media_root(fn_src).zpod.chainPath("image")).asNormalizedPath).array;
+ auto pth_2_ = ((media_root(fn_src).filesystem_open_zpod.chainPath("image")).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -862,7 +862,7 @@ template DocReformPathsPods() {
auto pod_root_ = pod_root(fn_src);
auto _manifest = PodManifest!()(fn_src).pod_manifest_filename;
auto pth_1_ = _manifest;
- auto pth_2_ = asNormalizedPath(pod_root(fn_src).filesystem_open_zpod.chainPath(_manifest)).array;
+ auto pth_2_ = ((pod_root(fn_src).filesystem_open_zpod.chainPath(_manifest)).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -876,8 +876,8 @@ template DocReformPathsPods() {
}
auto fn_doc(string fn_src, string lng) {
auto pod_root_ = pod_root(fn_src);
- auto pth_1_ = asNormalizedPath(doc_lng(fn_src, lng).zpod.chainPath(fn_src.baseName)).array;
- auto pth_2_ = asNormalizedPath(doc_lng(fn_src, lng).filesystem_open_zpod.chainPath(fn_src.baseName)).array;
+ auto pth_1_ = ((doc_lng(fn_src, lng).zpod.chainPath(fn_src.baseName)).asNormalizedPath).array;
+ auto pth_2_ = ((doc_lng(fn_src, lng).filesystem_open_zpod.chainPath(fn_src.baseName)).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -891,8 +891,8 @@ template DocReformPathsPods() {
}
auto fn_doc_insert(string fn_src, string fn_insert, string lng) {
auto pod_root_ = pod_root(fn_src);
- auto pth_1_ = asNormalizedPath(doc_lng(fn_src, lng).zpod.chainPath(fn_insert.baseName)).array;
- auto pth_2_ = asNormalizedPath(doc_lng(fn_src, lng).filesystem_open_zpod.chainPath(fn_insert.baseName)).array;
+ auto pth_1_ = ((doc_lng(fn_src, lng).zpod.chainPath(fn_insert.baseName)).asNormalizedPath).array;
+ auto pth_2_ = ((doc_lng(fn_src, lng).filesystem_open_zpod.chainPath(fn_insert.baseName)).asNormalizedPath).array;
struct _pods {
auto zpod() {
return pth_1_;
@@ -955,7 +955,7 @@ template DocReformOutPaths() {
? output_pth_root : "";
}
string output_base() {
- return asNormalizedPath(output_root.chainPath(lng)).array;
+ return ((output_root.chainPath(lng)).asNormalizedPath).array;
}
}
return _PathsStruct();
@@ -971,7 +971,7 @@ template DocReformOutPathSQLite() {
? output_pth_root : "";
}
string output_base() {
- return asNormalizedPath(output_root).array;
+ return ((output_root).asNormalizedPath).array;
}
}
return _PathsStruct();
@@ -1039,37 +1039,37 @@ template DocReformDocRootTreeHTML() {
return fn_src.baseName.stripExtension;
}
string base_filename_scroll(string fn_src) {
- return base_filename(fn_src) ~ "." ~ lng;
+ return base_filename(fn_src);
}
string base_filename_seg(string fn_src) {
- return base_filename(fn_src) ~ "." ~ lng;
+ return base_filename(fn_src);
}
string doc_root() {
- return asNormalizedPath(lng_pth.output_root).array;
+ return ((lng_pth.output_root).asNormalizedPath).array;
}
string base() {
- return asNormalizedPath((lng).chainPath(base_dir)).array;
+ return (((lng).chainPath(base_dir)).asNormalizedPath).array;
}
string image() {
- return asNormalizedPath("image").array;
+ return (("image").asNormalizedPath).array;
}
string css() {
- return asNormalizedPath("css").array;
+ return (("css").asNormalizedPath).array;
}
string fn_seg_css() {
- return asNormalizedPath(css.chainPath("html_seg.css")).array;
+ return ((css.chainPath("html_seg.css")).asNormalizedPath).array;
}
string fn_scroll_css() {
- return asNormalizedPath(css.chainPath("html_scroll.css")).array;
+ return ((css.chainPath("html_scroll.css")).asNormalizedPath).array;
}
string seg(string fn_src) {
- return asNormalizedPath(base.chainPath(base_filename_seg(fn_src))).array;
+ return ((base.chainPath(base_filename_seg(fn_src))).asNormalizedPath).array;
}
string fn_scroll(string fn_src) {
- return asNormalizedPath(base.chainPath(base_filename_scroll(fn_src) ~ suffix)).array;
+ return ((base.chainPath(base_filename_scroll(fn_src) ~ suffix)).asNormalizedPath).array;
}
string fn_seg(string fn_src, string seg_filename) {
- return asNormalizedPath(seg(fn_src).chainPath(seg_filename ~ suffix)).array;
+ return ((seg(fn_src).chainPath(seg_filename ~ suffix)).asNormalizedPath).array;
}
string tail_seg(string fn_src) {
return lng ~ "/html/" ~ base_filename_seg(fn_src);
@@ -1102,34 +1102,34 @@ template DocReformPathsHTML() {
string suffix = ".html";
struct _PathsStruct {
string doc_root() {
- return asNormalizedPath(root_pth.chainPath(doc_tree.doc_root)).array;
+ return ((root_pth.chainPath(doc_tree.doc_root)).asNormalizedPath).array;
}
string harvest(string fn_harvest) {
return doc_root ~ "/" ~ fn_harvest;
}
string base() {
- return asNormalizedPath(root_pth.chainPath(doc_tree.base)).array;
+ return ((root_pth.chainPath(doc_tree.base)).asNormalizedPath).array;
}
string image() {
- return asNormalizedPath(root_pth.chainPath(doc_tree.image)).array;
+ return ((root_pth.chainPath(doc_tree.image)).asNormalizedPath).array;
}
string css() {
- return asNormalizedPath(root_pth.chainPath(doc_tree.css)).array;
+ return ((root_pth.chainPath(doc_tree.css)).asNormalizedPath).array;
}
string fn_seg_css() {
- return asNormalizedPath(root_pth.chainPath(doc_tree.fn_seg_css)).array;
+ return ((root_pth.chainPath(doc_tree.fn_seg_css)).asNormalizedPath).array;
}
string fn_scroll_css() {
- return asNormalizedPath(root_pth.chainPath(doc_tree.fn_scroll_css)).array;
+ return ((root_pth.chainPath(doc_tree.fn_scroll_css)).asNormalizedPath).array;
}
string seg(string fn_src) {
- return asNormalizedPath(root_pth.chainPath(doc_tree.seg(fn_src))).array;
+ return ((root_pth.chainPath(doc_tree.seg(fn_src))).asNormalizedPath).array;
}
string fn_scroll(string fn_src) {
- return asNormalizedPath(root_pth.chainPath(doc_tree.fn_scroll(fn_src))).array;
+ return ((root_pth.chainPath(doc_tree.fn_scroll(fn_src))).asNormalizedPath).array;
}
string fn_seg(string fn_src, string seg_filename) {
- return asNormalizedPath(root_pth.chainPath(doc_tree.fn_seg(fn_src, seg_filename))).array;
+ return ((root_pth.chainPath(doc_tree.fn_seg(fn_src, seg_filename))).asNormalizedPath).array;
}
string tail_seg(string fn_src) {
return doc_tree.tail_seg(fn_src);
@@ -1163,7 +1163,7 @@ template DocReformUrlsHTML() {
string suffix = ".html";
struct _PathsStruct {
string doc_root() {
- return url_doc_root ~ asNormalizedPath(doc_tree.doc_root).array;
+ return url_doc_root ~ ((doc_tree.doc_root).asNormalizedPath).array;
}
string harvest(string fn_harvest) {
return format(q"┃%s/%s┃",
@@ -1174,62 +1174,62 @@ template DocReformUrlsHTML() {
string base() {
return format(q"┃%s/%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.base).array,
+ ((doc_tree.base).asNormalizedPath).array,
);
}
string image() {
return format(q"┃%s/%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.image).array,
+ ((doc_tree.image).asNormalizedPath).array,
);
}
string css() {
return format(q"┃%s/%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.css).array,
+ ((doc_tree.css).asNormalizedPath).array,
);
}
string fn_seg_css() {
return format(q"┃%s/%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.fn_seg_css).array,
+ ((doc_tree.fn_seg_css).asNormalizedPath).array,
);
}
string fn_scroll_css() {
return format(q"┃%s/%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.fn_scroll_css).array,
+ ((doc_tree.fn_scroll_css).asNormalizedPath).array,
);
}
string seg(string fn_src) {
return format(q"┃%s/%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.seg(fn_src)).array,
+ ((doc_tree.seg(fn_src)).asNormalizedPath).array,
);
}
string fn_scroll(string fn_src) {
return format(q"┃%s/%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.fn_scroll(fn_src)).array,
+ ((doc_tree.fn_scroll(fn_src)).asNormalizedPath).array,
);
}
string fn_seg(string fn_src, string seg_filename) {
return format(q"┃%s/%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.fn_seg(fn_src, seg_filename)).array,
+ ((doc_tree.fn_seg(fn_src, seg_filename)).asNormalizedPath).array,
);
}
string fn_scroll_obj_num(string fn_src, string obj_num) {
return format(q"┃%s/%s#%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.fn_scroll(fn_src)).array,
+ ((doc_tree.fn_scroll(fn_src)).asNormalizedPath).array,
obj_num,
);
}
string fn_seg_obj_num(string fn_src, string seg_filename, string obj_num) {
return format(q"┃%s/%s#%s┃",
url_doc_root,
- asNormalizedPath(doc_tree.fn_seg(fn_src, seg_filename)).array,
+ ((doc_tree.fn_seg(fn_src, seg_filename)).asNormalizedPath).array,
obj_num,
);
}
@@ -1263,7 +1263,7 @@ template DocReformPathsEPUB() {
string base_dir = "epub";
struct _PathsStruct {
string base() {
- return asNormalizedPath((out_pth.output_base).chainPath(base_dir)).array;
+ return (((out_pth.output_base).chainPath(base_dir)).asNormalizedPath).array;
}
string base_filename(string fn_src) {
return fn_src.baseName.stripExtension;
@@ -1272,43 +1272,43 @@ template DocReformPathsEPUB() {
return base_filename(fn_src) ~ "." ~ lng;
}
string doc_meta_inf() {
- return asNormalizedPath("META-INF").array;
+ return (("META-INF").asNormalizedPath).array;
}
string doc_oebps() {
- return asNormalizedPath("OEBPS").array;
+ return (("OEBPS").asNormalizedPath).array;
}
string doc_oebps_css() {
- return asNormalizedPath(doc_oebps.chainPath("css")).array;
+ return ((doc_oebps.chainPath("css")).asNormalizedPath).array;
}
string doc_oebps_image() {
- return asNormalizedPath(doc_oebps.chainPath("image")).array;
+ return ((doc_oebps.chainPath("image")).asNormalizedPath).array;
}
string epub_file(string fn_src) {
- return asNormalizedPath(base.chainPath(base_filename_epub(fn_src) ~ ".epub")).array;
+ return ((base.chainPath(base_filename_epub(fn_src) ~ ".epub")).asNormalizedPath).array;
}
string dirtop() {
return "".chainPath("").array;
}
string fn_mimetypes() {
- return asNormalizedPath(dirtop.chainPath("mimetypes")).array;
+ return ((dirtop.chainPath("mimetypes")).asNormalizedPath).array;
}
string fn_dmi_container_xml() {
- return asNormalizedPath(doc_meta_inf.chainPath("container.xml")).array;
+ return ((doc_meta_inf.chainPath("container.xml")).asNormalizedPath).array;
}
string fn_oebps_toc_nav_xhtml() {
- return asNormalizedPath(doc_oebps.chainPath("toc_nav.xhtml")).array;
+ return ((doc_oebps.chainPath("toc_nav.xhtml")).asNormalizedPath).array;
}
string fn_oebps_toc_ncx() {
- return asNormalizedPath(doc_oebps.chainPath("toc.ncx")).array;
+ return ((doc_oebps.chainPath("toc.ncx")).asNormalizedPath).array;
}
string fn_oebps_content_opf() {
- return asNormalizedPath(doc_oebps.chainPath("content.opf")).array;
+ return ((doc_oebps.chainPath("content.opf")).asNormalizedPath).array;
}
string fn_oebps_content_xhtml(string seg_filename) {
- return asNormalizedPath(doc_oebps.chainPath(seg_filename ~ ".xhtml")).array;
+ return ((doc_oebps.chainPath(seg_filename ~ ".xhtml")).asNormalizedPath).array;
}
string fn_oebps_css() {
- return asNormalizedPath(doc_oebps_css.chainPath("epub.css")).array;
+ return ((doc_oebps_css.chainPath("epub.css")).asNormalizedPath).array;
}
/+ debug +/
string dbg_docdir(string fn_src) {
@@ -1370,55 +1370,55 @@ template DocReformPathsODT() {
string base_dir = "odf";
struct _PathsStruct {
string base_pth() { // dir will contain odt document file (also debug file tree)
- return asNormalizedPath((out_pth.output_base).chainPath(base_dir)).array;
+ return (((out_pth.output_base).chainPath(base_dir)).asNormalizedPath).array;
}
string odt_file() {
- return asNormalizedPath(base_pth.chainPath(doc_matters.src.doc_uid_out ~ ".odt")).array;
+ return ((base_pth.chainPath(doc_matters.src.doc_uid_out ~ ".odt")).asNormalizedPath).array;
}
string dirtop(string type) {
return (type == "zip")
? "".chainPath("").array
- : asNormalizedPath(base_pth.chainPath(doc_matters.src.doc_uid_out)).array;
+ : ((base_pth.chainPath(doc_matters.src.doc_uid_out)).asNormalizedPath).array;
}
string mimetype(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(dirtop(type).chainPath("mimetype")).array;
+ return ((dirtop(type).chainPath("mimetype")).asNormalizedPath).array;
}
string manifest_rdf(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(dirtop(type).chainPath("manifest.rdf")).array;
+ return ((dirtop(type).chainPath("manifest.rdf")).asNormalizedPath).array;
}
string settings_xml(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(dirtop(type).chainPath("settings.xml")).array;
+ return ((dirtop(type).chainPath("settings.xml")).asNormalizedPath).array;
}
string styles_xml(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(dirtop(type).chainPath("styles.xml")).array;
+ return ((dirtop(type).chainPath("styles.xml")).asNormalizedPath).array;
}
string image_dir(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(dirtop(type).chainPath("Pictures")).array;
+ return ((dirtop(type).chainPath("Pictures")).asNormalizedPath).array;
}
string image(string image_fn_src, string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(image_dir(type).chainPath(image_fn_src)).array;
+ return ((image_dir(type).chainPath(image_fn_src)).asNormalizedPath).array;
}
string content_xml(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(dirtop(type).chainPath("content.xml")).array;
+ return ((dirtop(type).chainPath("content.xml")).asNormalizedPath).array;
}
string meta_inf_dir(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(dirtop(type).chainPath("META-INF")).array;
+ return ((dirtop(type).chainPath("META-INF")).asNormalizedPath).array;
}
string manifest_xml(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(meta_inf_dir(type).chainPath("manifest.xml")).array;
+ return ((meta_inf_dir(type).chainPath("manifest.xml")).asNormalizedPath).array;
}
string meta_xml(string type="fs") {
assert(type == "zip" || "fs");
- return asNormalizedPath(dirtop(type).chainPath("meta.xml")).array;
+ return ((dirtop(type).chainPath("meta.xml")).asNormalizedPath).array;
}
}
return _PathsStruct();
@@ -1443,17 +1443,17 @@ template DocReformPathsLaTeX() {
string base() {
auto out_pth = DocReformOutPaths!()(doc_matters.output_path, doc_matters.src.language);
string base_dir = "latex";
- return asNormalizedPath((out_pth.output_root).chainPath(base_dir)).array;
+ return (((out_pth.output_root).chainPath(base_dir)).asNormalizedPath).array;
}
string latex_path_stuff() {
- return asNormalizedPath(base.chainPath(base_filename(doc_matters.src.filename))).array;
+ return ((base.chainPath(base_filename(doc_matters.src.filename))).asNormalizedPath).array;
}
string latex_file_with_path() {
- return asNormalizedPath(base.chainPath(base_filename(doc_matters.src.filename) ~ "." ~ doc_matters.src.language ~ ".tex")).array;
+ return ((base.chainPath(base_filename(doc_matters.src.filename) ~ "." ~ doc_matters.src.language ~ ".tex")).asNormalizedPath).array;
}
string images() {
string image_dir = "image";
- return asNormalizedPath((base).chainPath(image_dir)).array;
+ return (((base).chainPath(image_dir)).asNormalizedPath).array;
}
}
return _PathsStruct();
@@ -1480,13 +1480,13 @@ template DocReformPathsSQLiteDiscrete() {
string base() {
auto out_pth = DocReformOutPaths!()(output_pth_root, lng);
string base_dir = "sqlite";
- return asNormalizedPath((out_pth.output_base).chainPath(base_dir)).array;
+ return (((out_pth.output_base).chainPath(base_dir)).asNormalizedPath).array;
}
string seg(string fn_src) {
- return asNormalizedPath(base.chainPath(base_filename(fn_src))).array;
+ return ((base.chainPath(base_filename(fn_src))).asNormalizedPath).array;
}
string sqlite_file(string fn_src) {
- return asNormalizedPath(base.chainPath(base_filename(fn_src) ~ ".sql.db")).array;
+ return ((base.chainPath(base_filename(fn_src) ~ ".sql.db")).asNormalizedPath).array;
}
}
return _PathsStruct();
@@ -1512,10 +1512,10 @@ template DocReformPathsSQLite() {
string base() {
auto out_pth = DocReformOutPathSQLite!()(output_pth_root); // decide whether to have separate files for each language
string base_dir = "sqlite";
- return asNormalizedPath((out_pth.output_root).chainPath(base_dir)).array;
+ return (((out_pth.output_root).chainPath(base_dir)).asNormalizedPath).array;
}
string sqlite_file() {
- return asNormalizedPath(base.chainPath(base_filename(db_name) ~ ".sql.db")).array;
+ return ((base.chainPath(base_filename(db_name) ~ ".sql.db")).asNormalizedPath).array;
}
}
return _PathsStruct();
diff --git a/org/default_regex.org b/org/default_regex.org
index 34f6bae..63859f7 100644
--- a/org/default_regex.org
+++ b/org/default_regex.org
@@ -476,8 +476,8 @@ static special_markup_chars = ctRegex!(`[【】〖〗
#+name: prgmkup_rgx
#+BEGIN_SRC d
static src_pth_sst_or_ssm = ctRegex!(`^(?P<path>[/]?(?:[a-zA-Z0-9._-]+/)*)(?P<filename>[a-zA-Z0-9._-]+[.](?P<extension>ss[tm]))$`);
-static src_pth_pod_sst_or_ssm = ctRegex!(`^(?P<podpath>[/]?(?:[a-zA-Z0-9._-]+/)*)media/text/[a-z]{2}/(?P<filename>[a-zA-Z0-9._-]+[.]ss[tm])$`);
-static src_pth_contents = ctRegex!(`^(?P<path>[/]?(?:[a-zA-Z0-9._-]+/)*)(?P<filename>[a-zA-Z0-9._-]+)/pod[.]manifest$`);
+static src_pth_pod_sst_or_ssm = ctRegex!(`^(?P<podpath>[/]?(?:[a-zA-Z0-9._-]+/)*)media/text/[a-z]{2}/(?P<filename>[a-zA-Z0-9][a-zA-Z0-9._-]*?[.]ss[tm])$`);
+static src_pth_contents = ctRegex!(`^(?P<path>[/]?(?:[a-zA-Z0-9._-]+/)*)(?P<filename>[a-zA-Z0-9][a-zA-Z0-9._-]*)/pod[.]manifest$`);
static src_pth_zip = ctRegex!(`^(?P<path>[/]?(?:[a-zA-Z0-9._-]+/)*)(?P<filename>[a-zA-Z0-9._-]+[.]zip)$`);
static src_pth_unzip_pod = ctRegex!(`^(?P<path>media/text/[a-z]{2}/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[im])$`);
static src_pth_types =
diff --git a/org/doc_reform.org b/org/doc_reform.org
index 35fe96d..a8fd2a6 100644
--- a/org/doc_reform.org
+++ b/org/doc_reform.org
@@ -790,11 +790,10 @@ auto _env = [
#+NAME: doc_reform_args
#+BEGIN_SRC d
-auto _manifest_start = PodManifest!()("");
auto _manifest_matter = PathMatters!()(_opt_action, _env, "");
auto _manifests = [ _manifest_matter ];
foreach(arg; args[1..$]) {
- _manifest_start = PodManifest!()(arg);
+ auto _manifest_start = PodManifest!()(arg);
if (arg.match(rgx.flag_action)) {
flag_action ~= " " ~ arg; // flags not taken by getopt
} else if (
diff --git a/org/source_files_read.org b/org/source_files_read.org
index 02e31e0..6106930 100644
--- a/org/source_files_read.org
+++ b/org/source_files_read.org
@@ -60,7 +60,7 @@ static template readConfigSite() {
string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.config_local_site;
foreach(conf_fn; [_conf_file_details.config_filename_site]) {
foreach(pth; possible_config_path_locations) {
- char[] conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array;
+ char[] conf_file = ((chainPath(pth.to!string, conf_fn)).asNormalizedPath).array;
conf_filename = conf_fn;
if (config_file_str.length > 0) {
// conf_filename = conf_fn;
@@ -119,7 +119,7 @@ static template readConfigDoc() {
string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.dr_document_make;
foreach(conf_fn; [_conf_file_details.config_filename_document]) {
foreach(pth; possible_config_path_locations) {
- auto conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array;
+ auto conf_file = ((chainPath(pth.to!string, conf_fn)).asNormalizedPath).array;
conf_filename = conf_fn;
if (config_file_str.length > 0) {
// conf_filename = conf_fn;
@@ -179,7 +179,7 @@ static template configReadInSiteSTR() {
writeln("WARNING (io debug) in config possible path locations: ", possible_config_path_locations);
}
foreach(pth; possible_config_path_locations) {
- auto conf_file = asNormalizedPath(chainPath(pth.to!string, conf_toml)).array;
+ auto conf_file = ((chainPath(pth.to!string, conf_toml)).asNormalizedPath).array;
if (config_file_str.length > 0) {
break;
}
@@ -216,7 +216,7 @@ static template configReadInDocSTR() {
writeln("WARNING (io debug) in config possible path locations: ", possible_config_path_locations);
}
foreach(pth; possible_config_path_locations) {
- auto conf_file = asNormalizedPath(chainPath(pth.to!string, conf_toml)).array;
+ auto conf_file = ((chainPath(pth.to!string, conf_toml)).asNormalizedPath).array;
if (config_file_str.length > 0) {
break;
}