diff options
Diffstat (limited to 'src/sdp/meta/metadoc.d')
-rw-r--r-- | src/sdp/meta/metadoc.d | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/src/sdp/meta/metadoc.d b/src/sdp/meta/metadoc.d index d563dfc..e302db8 100644 --- a/src/sdp/meta/metadoc.d +++ b/src/sdp/meta/metadoc.d @@ -1,6 +1,5 @@ module sdp.meta.metadoc; template SiSUabstraction() { - /+ sdp: sisu document parser, see http://sisudoc.org +/ import sdp.meta; import std.getopt, @@ -8,10 +7,10 @@ template SiSUabstraction() { import sdp.meta.metadoc_summary, sdp.meta.metadoc_from_src, - sdp.meta.composite_make, sdp.meta.conf_make_meta, // sdp.meta.conf_make_meta_native, sdp.meta.conf_make_meta_sdlang, + sdp.meta.conf_make_meta_composite, sdp.meta.defaults, sdp.meta.doc_debugs, sdp.meta.read_config_files, @@ -30,11 +29,14 @@ template SiSUabstraction() { enum makeMeta { make, meta } enum docAbst { doc_abstraction, section_keys, segnames, segnames_0_4, images } static auto rgx = Rgx(); - auto SiSUabstraction(Fn,O,E)(Fn fn_src, O opts, E env){ + auto SiSUabstraction(Fn,O,E)( + Fn fn_src, + O opts, + E env, + ){ auto sdl_root_config_share = configRead!()("config_share", env); auto sdl_root_config_local = configRead!()("config_local", 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); + auto conf_files_composite_make = confFilesSDLtoStruct!()(sdl_root_config_share, sdl_root_config_local); /+ ↓ read file (filename with path) +/ /+ ↓ file tuple of header and content +/ auto _header_body_inserts = @@ -47,26 +49,12 @@ template SiSUabstraction() { writeln(_header_body_inserts.length[headBody.body_content][0]); } /+ ↓ split header into make and meta +/ - auto _make_and_meta_tup = - 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); - auto _make_config = compositeMkCnf!()( - conf_composite_static_aa, - _make_and_meta_tup[makeMeta.make], - // opts, - ); - auto _make_and_conf_composite_static_plus_docheader_aa = compositeMkCnfAA!()( - conf_aa_empty, - conf_composite_static_aa, - _make_and_meta_tup[makeMeta.make], - opts, - ); + auto _make_and_meta_struct = + docHeaderMakeAndMetaTupExtractAndConvertToStruct!()(conf_files_composite_make, _header_body_inserts[headBody.header]); // breakage ... /+ ↓ document abstraction: process document, return abstraction as tuple +/ auto da = SiSUdocAbstraction!()( _header_body_inserts[headBody.body_content], - _make_and_meta_tup[makeMeta.make], - _make_and_meta_tup[makeMeta.meta], + _make_and_meta_struct, opts ); static assert(!isTypeTuple!(da)); @@ -90,12 +78,8 @@ template SiSUabstraction() { 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]; + auto conf_make_meta() { + auto _k = _make_and_meta_struct; return _k; } auto source_filename() { |