diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-10-04 21:42:07 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-10-17 19:07:20 -0400 |
commit | b70dfcf862ef81795210d6ceafc6ba9082199bf9 (patch) | |
tree | a04a2a4f9b517d02082eee336093ebbe404f5edd /org/meta_conf_make_meta.org | |
parent | path related, mostly cosmetic code (diff) |
--show-{config,make,metadata,summary}doc-reform_v0.8.0
Diffstat (limited to 'org/meta_conf_make_meta.org')
-rw-r--r-- | org/meta_conf_make_meta.org | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index ff1efb9..a8a5876 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -57,6 +57,7 @@ module doc_reform.meta.conf_make_meta_structs; import std.exception, std.json, + std.path, std.regex, std.stdio, std.string, @@ -225,6 +226,7 @@ struct ConfCompositeSiteLocal { string webserv_cgi_port; string webserv_cgi_user; string webserv_cgi_file_links; + string output_path; string processing_path; string processing_dir; string processing_concord_max; @@ -349,6 +351,7 @@ static template contentYAMLtoDocReformStruct() { std.algorithm, std.array, std.exception, + std.path, std.regex, std.stdio, std.string, @@ -593,24 +596,33 @@ if ("webserv" in _yaml } } } +if (!(_struct_composite.conf.output_path)) { + _struct_composite.conf.output_path = ((_manifest.output.path).asNormalizedPath).array; +} +if ("output" in _yaml + && _yaml["output"].type.sequence +) { + if (_yaml["output"].type.mapping + && _yaml["output"].tag.match(rgx.yaml_tag_is_map) + ) { + if ("path" in _yaml["output"] + && _yaml["output"]["path"].type.string + && _yaml["output"]["path"].tag.match(rgx.yaml_tag_is_str) + ) { + if (_manifest.output.path == _manifest.env.pwd + && _yaml["output"]["path"].get!string.length > 0 + ) { + _struct_composite.conf.output_path = (((_yaml["output"]["path"].get!string).expandTilde).asNormalizedPath).array; + } + } + } +} if ("processing" in _yaml && _yaml["processing"].type.sequence ) { if (_yaml["processing"].type.mapping && _yaml["processing"].tag.match(rgx.yaml_tag_is_map) ) { - if ("path" in _yaml["processing"] - && _yaml["processing"]["path"].type.string - && _yaml["processing"]["path"].tag.match(rgx.yaml_tag_is_str) - ) { - _struct_composite.conf.processing_path = _yaml["processing"]["path"].get!string; - } - if ("dir" in _yaml["processing"] - && _yaml["processing"]["dir"].type.string - && _yaml["processing"]["dir"].tag.match(rgx.yaml_tag_is_str) - ) { - _struct_composite.conf.processing_dir = _yaml["processing"]["dir"].get!string; - } if ("concord_max" in _yaml["processing"] && _yaml["processing"]["concord_max"].type.string && _yaml["processing"]["concord_max"].tag.match(rgx.yaml_tag_is_str) @@ -625,18 +637,18 @@ if ("flag" in _yaml if (_yaml["flag"].type.mapping && _yaml["flag"].tag.match(rgx.yaml_tag_is_map) ) { - if ("act1" in _yaml["flag"] - && _yaml["flag"]["act1"].type.string - && _yaml["flag"]["act1"].tag.match(rgx.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act1 = _yaml["flag"]["act1"].get!string; - } if ("act0" in _yaml["flag"] && _yaml["flag"]["act0"].type.string && _yaml["flag"]["act0"].tag.match(rgx.yaml_tag_is_str) ) { _struct_composite.conf.flag_act0 = _yaml["flag"]["act0"].get!string; } + if ("act1" in _yaml["flag"] + && _yaml["flag"]["act1"].type.string + && _yaml["flag"]["act1"].tag.match(rgx.yaml_tag_is_str) + ) { + _struct_composite.conf.flag_act1 = _yaml["flag"]["act1"].get!string; + } if ("act2" in _yaml["flag"] && _yaml["flag"]["act2"].type.string && _yaml["flag"]["act2"].tag.match(rgx.yaml_tag_is_str) |