From 775e3d3b11e39830015ec094532ecd395636b9d8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 27 Jan 2017 10:07:04 -0500 Subject: output hub template --- org/output.org | 28 ++++++++++++++++++++++++++++ org/sdp.org | 8 ++------ src/sdp.d | 8 ++------ src/sdp/output_hub.d | 28 ++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 12 deletions(-) diff --git a/org/output.org b/org/output.org index 74fca4e..d561f5a 100644 --- a/org/output.org +++ b/org/output.org @@ -22,7 +22,35 @@ check & generate output types requested +/ template outputHub() { + private import + std.regex, + std.algorithm, + std.array, + std.container, + std.exception, + std.getopt, + std.json, + std.process, + std.stdio, + std.file, + std.path, + std.range, + std.regex, + std.string, + std.traits, + std.typecons, + std.uni, + std.utf, + ao_defaults, + output_epub, + output_html, + output_xhtmls, + source_sisupod; + import + ao_rgx, + output_xhtmls; void outputHub(C,D)(C contents, D doc_matters) { + mixin SiSUrgxInit; auto rgx = Rgx(); if (doc_matters.opt_action_bool["source"]) { /+ mixin outputSource; +/ diff --git a/org/sdp.org b/org/sdp.org index 8831171..16a0ecc 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -97,11 +97,7 @@ import ao_read_config_files, ao_read_source_files, ao_rgx, - output_hub, - output_epub, - output_html, - output_xhtmls, - source_sisupod; + output_hub; #+END_SRC ****** notes @@ -495,7 +491,7 @@ debug(checkdoc) { #+BEGIN_SRC d /+ ↓ output hub +/ if (!(_opt_action_bool["skip_output"])) { - outputHub(doc_abstraction, doc_matters); + outputHub!()(doc_abstraction, doc_matters); } #+END_SRC diff --git a/src/sdp.d b/src/sdp.d index 04cca77..723a17e 100755 --- a/src/sdp.d +++ b/src/sdp.d @@ -14,11 +14,7 @@ import ao_read_config_files, ao_read_source_files, ao_rgx, - output_hub, - output_epub, - output_html, - output_xhtmls, - source_sisupod; + output_hub; /+ sdlang http://sdlang.org +/ import sdlang; // sdlang.d /+ std +/ @@ -275,7 +271,7 @@ void main(string[] args) { } /+ ↓ output hub +/ if (!(_opt_action_bool["skip_output"])) { - outputHub(doc_abstraction, doc_matters); + outputHub!()(doc_abstraction, doc_matters); } scope(exit) { debug(checkdoc) { diff --git a/src/sdp/output_hub.d b/src/sdp/output_hub.d index 16fc120..f17a007 100644 --- a/src/sdp/output_hub.d +++ b/src/sdp/output_hub.d @@ -3,7 +3,35 @@ check & generate output types requested +/ template outputHub() { + private import + std.regex, + std.algorithm, + std.array, + std.container, + std.exception, + std.getopt, + std.json, + std.process, + std.stdio, + std.file, + std.path, + std.range, + std.regex, + std.string, + std.traits, + std.typecons, + std.uni, + std.utf, + ao_defaults, + output_epub, + output_html, + output_xhtmls, + source_sisupod; + import + ao_rgx, + output_xhtmls; void outputHub(C,D)(C contents, D doc_matters) { + mixin SiSUrgxInit; auto rgx = Rgx(); if (doc_matters.opt_action_bool["source"]) { /+ mixin outputSource; +/ -- cgit v1.2.3