From 203fa77f01c460b60ea50342676a55c4a80b5a42 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 4 Jul 2017 07:36:45 -0400 Subject: sdl extract and composite conf (make) --- org/sdp.org | 69 ++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 23 deletions(-) (limited to 'org/sdp.org') diff --git a/org/sdp.org b/org/sdp.org index f813c5d..d4e40b4 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -99,6 +99,7 @@ import import sdp.ao.abstraction_summary, sdp.ao.abstract_doc_source, + sdp.ao.composite_make, sdp.ao.conf_make_meta, // sdp.ao.conf_make_meta_native, sdp.ao.conf_make_meta_sdlang, @@ -161,7 +162,7 @@ mixin CompileTimeInfo; #+BEGIN_SRC d mixin SiSUrgxInit; mixin SiSUregisters; -mixin SiSUheaderExtractSDLang; +mixin SiSUextractSDLang; mixin SiSUnode; mixin SiSUbiblio; mixin SiSUrgxInitFlags; @@ -315,11 +316,10 @@ auto env = [ #+NAME: sdp_conf_files #+BEGIN_SRC d -auto sdl_root_configuration = configRead!()("conf.sdl", env); -auto sdl_root_doc_make = configRead!()("sisu_document_make", env); -auto confsdl = HeaderExtractSDL(); -auto conf_settings_aa = confsdl.configSettingsSDLangToAAmake(sdl_root_configuration); -auto conf_doc_make_aa = confsdl.documentMakeSDLangToAAmake(sdl_root_doc_make); +auto sdl_root_config_share = configRead!()("config_local", env); +auto sdl_root_config_local = configRead!()("config_share", env); +auto conf_composite_static_aa = extractSDL().sdlangToAA(conf_aa_empty, sdl_root_config_share); +conf_composite_static_aa = extractSDL().sdlangToAA(conf_composite_static_aa, sdl_root_config_local); #+END_SRC ** 2a. actions independed of processing files @@ -432,7 +432,7 @@ writeln("no recognized filename"); break; // terminate, stop #+END_SRC -* 2. _document abstraction functions_ :module:sdp:abstraction: +* 2. _document abstraction functions_ :module:sdp:abstraction: ** 0. module template #+BEGIN_SRC d :tangle ../src/sdp/ao/abstraction.d @@ -502,12 +502,35 @@ debug(header_and_body) { #+BEGIN_SRC d /+ ↓ split header into make and meta +/ auto _make_and_meta_tup = - SiSUheaderExtractHub!()(_header_body_inserts[headBody.header], conf_doc_make_aa); + docHeaderMakeAndMetaTupExtractAndConvertToAA!()(conf_composite_static_aa, _header_body_inserts[headBody.header]); static assert(!isTypeTuple!(_make_and_meta_tup)); static assert(_make_and_meta_tup.length==2); #+END_SRC -** 3. _document abstraction, tuple_ (pre-output-processing) :processing: +** 3. composite make & settings? + +#+NAME: sdp_each_file_do_document_abstraction +#+BEGIN_SRC d +auto _make_config = compositeMkCnf!()( + conf_composite_static_aa, + _make_and_meta_tup[makeMeta.make], + // opts, +); +#+END_SRC + +** composite config & make (files & doc header) aa + +#+NAME: sdp_each_file_do_document_abstraction +#+BEGIN_SRC d +auto _make_and_conf_composite_static_plus_docheader_aa = compositeMkCnfAA!()( + conf_aa_empty, + conf_composite_static_aa, + _make_and_meta_tup[makeMeta.make], + opts, +); +#+END_SRC + +** 4. _document abstraction, tuple_ (pre-output-processing) :processing: - [[./ao_doc_abstraction.org][ao_doc_abstraction]] - prepare the document abstraction used in downstream processing @@ -539,7 +562,7 @@ string[] _doc_epub_segnames_0_4 = da[docAbst.segnames_0_4]; auto _images = da[docAbst.images]; #+END_SRC -** 4. _document matters_ (doc info gathered, various sources) +** 5. _document matters_ (doc info gathered, various sources) - prepare document_matters, miscellany about processing and the document of use in downstream processing @@ -560,12 +583,16 @@ struct DocumentMatters { string[] _k = _doc_epub_segnames_0_4; return _k; } + auto dochead_meta() { + string[string][string] _k = _make_and_meta_tup[makeMeta.meta]; + return _k; + } auto dochead_make() { string[string][string] _k = _make_and_meta_tup[makeMeta.make]; return _k; } - auto dochead_meta() { - string[string][string] _k = _make_and_meta_tup[makeMeta.meta]; + auto source_filename() { + string _k = fn_src; return _k; } auto src_path_info() { @@ -573,8 +600,12 @@ struct DocumentMatters { auto _k = SiSUpathsSRC!()(_pwd, fn_src); return _k; } - auto source_filename() { - string _k = fn_src; + auto opt_action() { + bool[string] _k = opts; + return _k; + } + auto environment() { + auto _k = env; return _k; } auto language() { @@ -594,19 +625,11 @@ struct DocumentMatters { auto _k = _images; return _k; } - auto opt_action() { - bool[string] _k = opts; - return _k; - } - auto environment() { - auto _k = env; - return _k; - } } auto doc_matters = DocumentMatters(); #+END_SRC -* 3. document abstraction _summary_ :module:sdp:abstraction_summary: +* 3. document abstraction _summary_ :module:sdp:abstraction_summary: ** 0. module template #+BEGIN_SRC d :tangle ../src/sdp/ao/abstraction_summary.d -- cgit v1.2.3