From 1083951efc4f8ddbf8de65907cc5aee2ac6be2ed Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 5 Oct 2019 20:45:42 -0400 Subject: 0.8.1 conf, make, meta: yaml only (toml removed) - yaml only: config, make & headers (yaml is converted directly to struct) - toml removed: preemptively remove confusion of having multiple config formats (toml was converted to json & json to struct) - json removed (intermediate representation): takes out intermediate conversion to json which could be attractive to have if there are multiple formats --- org/doc_reform.org | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'org/doc_reform.org') diff --git a/org/doc_reform.org b/org/doc_reform.org index 1d853c1..abba098 100644 --- a/org/doc_reform.org +++ b/org/doc_reform.org @@ -28,7 +28,7 @@ struct Version { int minor; int patch; } -enum _ver = Version(0, 8, 0); +enum _ver = Version(0, 8, 1); #+END_SRC ** compilation restrictions (supported compilers) @@ -880,7 +880,7 @@ foreach(arg; args[1..$]) { *** config files load & read -#+NAME: doc_reform_conf_files_in_yaml_or_toml +#+NAME: doc_reform_conf_files_in_yaml #+BEGIN_SRC d ConfCompositePlus _make_and_meta_struct; { /+ document config file +/ @@ -888,9 +888,6 @@ ConfCompositePlus _make_and_meta_struct; if (_config_document_struct.filetype == "yaml") { import doc_reform.meta.conf_make_meta_yaml; _make_and_meta_struct = _config_document_struct.configParseYAMLreturnDocReformStruct!()(_make_and_meta_struct, _manifest); - } else if (_config_document_struct.filetype == "toml") { - import doc_reform.meta.conf_make_meta_toml; - _make_and_meta_struct = _config_document_struct.configParseTOMLreturnDocReformStruct!()(_make_and_meta_struct, _manifest); } } { /+ local site config +/ @@ -898,9 +895,6 @@ ConfCompositePlus _make_and_meta_struct; if (_config_local_site_struct.filetype == "yaml") { import doc_reform.meta.conf_make_meta_yaml; _make_and_meta_struct = _config_local_site_struct.configParseYAMLreturnDocReformStruct!()(_make_and_meta_struct, _manifest); - } else if (_config_local_site_struct.filetype == "toml") { - import doc_reform.meta.conf_make_meta_toml; - _make_and_meta_struct = _config_local_site_struct.configParseTOMLreturnDocReformStruct!()(_make_and_meta_struct, _manifest); } } #+END_SRC @@ -1120,7 +1114,7 @@ template DocReformAbstraction() { O _opt_action, M _manifest ){ - <> + <> <> <> <> @@ -1185,7 +1179,7 @@ debug(header_and_body) { } #+END_SRC -*** 2. _document metadata_ & _make instructions_ (struct from toml) +*** 2. _document metadata_ & _make instructions_ (struct from yaml) - [[./meta_conf_make_meta.org][meta_conf_make_meta]] return tuple: document metadata; make instructions - read _document header_, split into: @@ -1204,17 +1198,9 @@ debug(header_and_body) { if ((_opt_action.debug_do) || (_opt_action.very_verbose) ) { - writeln("step2 commence → (read document header - yaml or toml, return struct)"); + writeln("step2 commence → (read document header (yaml) return struct)"); } -if (_header_body_insertfilelist_imagelist[headBody.header_type] == "toml") { - import doc_reform.meta.conf_make_meta_toml; - _make_and_meta_struct = - docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct!()( - _header_body_insertfilelist_imagelist[headBody.header], - _make_and_meta_struct, - _manifest, - ); -} else if (_header_body_insertfilelist_imagelist[headBody.header_type] == "yaml") { +if (_header_body_insertfilelist_imagelist[headBody.header_type] == "yaml") { import doc_reform.meta.conf_make_meta_yaml; _make_and_meta_struct = docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct!()( -- cgit v1.2.3