aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/doc_reform.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-09-24 11:13:42 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-10-17 19:07:20 -0400
commitd43281245f1732941228d79663c8e8d3280a972c (patch)
tree0d0c814b11130e87768791a793204cc3588d8941 /src/doc_reform/doc_reform.d
parentflag --show-summary (diff)
document headers & config: yaml introduced
- as toml alternative - both toml & yaml (meta, conf, make) work
Diffstat (limited to 'src/doc_reform/doc_reform.d')
-rwxr-xr-xsrc/doc_reform/doc_reform.d36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d
index 6275963..58c55c8 100755
--- a/src/doc_reform/doc_reform.d
+++ b/src/doc_reform/doc_reform.d
@@ -65,10 +65,8 @@ import
doc_reform.meta.metadoc_harvest,
doc_reform.meta.metadoc_harvests_authors,
doc_reform.meta.metadoc_harvests_topics,
- doc_reform.meta.metadoc_summary,
doc_reform.meta.metadoc_from_src,
doc_reform.meta.conf_make_meta_structs,
- doc_reform.meta.conf_make_meta_toml,
doc_reform.meta.conf_make_meta_json,
doc_reform.meta.defaults,
doc_reform.meta.doc_debugs,
@@ -577,8 +575,8 @@ void main(string[] args) {
&& _manifest_start.pod_manifest_file_with_path
&& _opt_action.abstraction
) {
- string contents_location_raw_;
- string contents_location_;
+ string pod_manifest_root_content_paths_to_markup_location_raw_;
+ string markup_contents_location_;
string sisudoc_txt_ = _manifest_start.pod_manifest_file_with_path;
enforce(
exists(sisudoc_txt_)!=0,
@@ -588,39 +586,39 @@ void main(string[] args) {
if (exists(sisudoc_txt_)) {
try {
if (exists(sisudoc_txt_)) {
- contents_location_raw_ = sisudoc_txt_.readText;
+ pod_manifest_root_content_paths_to_markup_location_raw_ = sisudoc_txt_.readText;
}
} catch (ErrnoException ex) {
} catch (FileException ex) {
// Handle errors
}
- if (contents_location_raw_.match(rgx.pod_content_location)) { // (file name followed by language codes \n)+
- foreach (m; contents_location_raw_.matchAll(rgx.pod_content_location)) {
+ if (pod_manifest_root_content_paths_to_markup_location_raw_.match(rgx.pod_content_location)) { // (file name followed by language codes \n)+
+ foreach (m; pod_manifest_root_content_paths_to_markup_location_raw_.matchAll(rgx.pod_content_location)) {
foreach (n; m.captures[2].matchAll(rgx.language_codes)) {
- contents_location_ ~= "media/text/" ~ n.captures[1].to!string ~ "/" ~ m.captures[1].to!string ~ "\n";
+ markup_contents_location_ ~= "media/text/" ~ n.captures[1].to!string ~ "/" ~ m.captures[1].to!string ~ "\n";
}
}
- } else {
- contents_location_ = contents_location_raw_;
+ } else { // (file name with path \n)+
+ markup_contents_location_ = pod_manifest_root_content_paths_to_markup_location_raw_;
}
} else {
writeln("manifest not found: ", sisudoc_txt_);
}
- auto contents_locations_arr
- = (cast(char[]) contents_location_).split;
+ auto markup_contents_locations_arr
+ = (cast(char[]) markup_contents_location_).split;
auto tmp_dir_ = (sisudoc_txt_).dirName.array;
- foreach (contents_location; contents_locations_arr) {
- assert(contents_location.match(rgx.src_pth_sst_or_ssm),
+ foreach (markup_contents_location; markup_contents_locations_arr) {
+ assert(markup_contents_location.match(rgx.src_pth_sst_or_ssm),
"not a recognised file: «" ~
- contents_location ~ "»"
+ markup_contents_location ~ "»"
);
- auto contents_location_pth_ = (contents_location).to!string;
+ auto markup_contents_location_pth_ = (markup_contents_location).to!string;
Regex!(char) lang_rgx_ = regex(r"/(" ~ _opt_action.languages_set.join("|") ~ ")/");
if (_opt_action.languages_set[0] == "all"
- || (contents_location_pth_).match(lang_rgx_)
+ || (markup_contents_location_pth_).match(lang_rgx_)
) {
- auto _fns = (((tmp_dir_).chainPath(contents_location_pth_)).array).to!string;
- _manifest_matter = PathMatters!()(_opt_action, _env, arg, _fns, contents_locations_arr);
+ auto _fns = (((tmp_dir_).chainPath(markup_contents_location_pth_)).array).to!string;
+ _manifest_matter = PathMatters!()(_opt_action, _env, arg, _fns, markup_contents_locations_arr);
_manifests ~= _manifest_matter;
}
}