diff options
Diffstat (limited to 'src/sdp/sdp.d')
-rwxr-xr-x | src/sdp/sdp.d | 113 |
1 files changed, 58 insertions, 55 deletions
diff --git a/src/sdp/sdp.d b/src/sdp/sdp.d index 3816f9b..60d56f9 100755 --- a/src/sdp/sdp.d +++ b/src/sdp/sdp.d @@ -147,68 +147,71 @@ void main(string[] args) { "pwd" : environment["PWD"], "home" : environment["HOME"], ]; - auto sdl_root_configuration = ConfigHub!()("conf.sdl", env); - auto sdl_root_doc_make = ConfigHub!()("sisu_document_make", env); + 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); - foreach(fn_src; fns_src) { - if (!empty(fn_src)) { - scope(success) { - debug(checkdoc) { - writefln( - "%s\n%s", - "~ document complete, ok ~", - "------------------------------------------------------------------", - ); + + if (fns_src.length > 0) { + foreach(fn_src; fns_src) { + if (!empty(fn_src)) { + scope(success) { + debug(checkdoc) { + writefln( + "%s\n%s", + "~ document complete, ok ~", + "------------------------------------------------------------------", + ); + } } - } - scope(failure) { - debug(checkdoc) { - stderr.writefln( - "~ document run failure ~ (%s v%s)\n\t%s", - __VENDOR__, __VERSION__, - fn_src - ); + scope(failure) { + debug(checkdoc) { + stderr.writefln( + "~ document run failure ~ (%s v%s)\n\t%s", + __VENDOR__, __VERSION__, + fn_src + ); + } } - } - enforce( - fn_src.match(rgx.src_pth), - "not a sisu markup filename" - ); - auto t = - SiSUabstraction!()(fn_src, opts, env); - static assert(!isTypeTuple!(t)); - static assert(t.length==2); - auto doc_abstraction = t[dAM.abstraction]; - auto doc_matters = t[dAM.matters]; - /+ ↓ debugs +/ - if (doc_matters.opt_action["verbose"]) { - SiSUabstractionSummary!()(doc_abstraction, doc_matters); - } - /+ ↓ debugs +/ - if ((doc_matters.opt_action["debug"]) - || (doc_matters.opt_action["verbose"]) - ) { - SiSUdebugs!()(doc_abstraction, doc_matters); - } - /+ ↓ output hub +/ - if (!(opts["skip-output"])) { - outputHub!()(doc_abstraction, doc_matters); - } - scope(exit) { - debug(checkdoc) { - writefln( - "processed file: %s", - fn_src - ); + enforce( + fn_src.match(rgx.src_pth), + "not a sisu markup filename" + ); + auto t = + SiSUabstraction!()(fn_src, opts, env); + static assert(!isTypeTuple!(t)); + static assert(t.length==2); + auto doc_abstraction = t[dAM.abstraction]; + auto doc_matters = t[dAM.matters]; + /+ ↓ debugs +/ + if (doc_matters.opt_action["verbose"]) { + SiSUabstractionSummary!()(doc_abstraction, doc_matters); + } + /+ ↓ debugs +/ + if ((doc_matters.opt_action["debug"]) + || (doc_matters.opt_action["verbose"]) + ) { + SiSUdebugs!()(doc_abstraction, doc_matters); + } + /+ ↓ output hub +/ + if (!(opts["skip-output"])) { + outputHub!()(doc_abstraction, doc_matters); + } + scope(exit) { + debug(checkdoc) { + writefln( + "processed file: %s", + fn_src + ); + } + destroy(fn_src); } - destroy(fn_src); + } else { + /+ no recognized filename provided +/ + writeln("no recognized filename"); + break; // terminate, stop } - } else { - /+ no recognized filename provided +/ - writeln("no recognized filename"); - break; // terminate, stop } } } |