aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/sdp.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-06-06 17:58:10 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commite280a374991a3a6db3c40fd1fa03a2d9c6fa66eb (patch)
tree730441b0371f6f65794a5e598000e89c06127bed /src/sdp/sdp.d
parentgetopt, fixes, & naming command line options related (diff)
naming mostly
Diffstat (limited to 'src/sdp/sdp.d')
-rwxr-xr-xsrc/sdp/sdp.d113
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
}
}
}