aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao/composite_make.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-07-13 07:44:03 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit22cea68385b57a1593f5751e49cfdd41d8067997 (patch)
tree9e61339eb58679977c24962b1cfd2f50aa7f2998 /src/sdp/ao/composite_make.d
parentsdl extract and composite conf (make) (diff)
0.18.0 rename meta from ao (considered adr)
Diffstat (limited to 'src/sdp/ao/composite_make.d')
-rw-r--r--src/sdp/ao/composite_make.d109
1 files changed, 0 insertions, 109 deletions
diff --git a/src/sdp/ao/composite_make.d b/src/sdp/ao/composite_make.d
deleted file mode 100644
index c9df4a8..0000000
--- a/src/sdp/ao/composite_make.d
+++ /dev/null
@@ -1,109 +0,0 @@
-/++
- output hub<BR>
- check & generate output types requested
-+/
-module sdp.ao.composite_make;
-template compositeMkCnf() {
- import sdp.ao;
- import std.array;
- mixin SiSUrgxInit;
- string[] _substitutions;
- string[string][] _sub;
- string _bold;
- string _italics;
- string _emphasis;
- auto compositeMkCnf(Mks...)(Mks makes) {
- foreach (make; makes) {
- auto rgx = Rgx();
- if (auto z = "make" in make) {
- if (auto x = "substitute" in *z) {
- foreach (m; (*x).matchAll(rgx.make_simple_substitutions_d)) {
- _sub ~= ["match": (m["match"]), "replace": (m["replace"])];
- _substitutions ~= format("`%s`,\"%s\"",
- m["match"],
- m["replace"],
- );
- }
- foreach (m; (*x).matchAll(rgx.make_simple_substitutions_rb)) {
- _sub ~= ["match": (m["match"]), "replace": (m["replace"])];
- _substitutions ~= format("`%s`,\"%s\"",
- m["match"],
- m["replace"],
- );
- }
- }
- if (auto x = "bold" in *z) {
- _bold = (*x).to!string;
- }
- if (auto x = "italics" in *z) {
- _italics = (*x).to!string;
- }
- if (auto x = "emphasis" in *z) {
- _emphasis = (*x).to!string;
- }
- }
- }
- struct _composite_make {
- auto substitutions() {
- auto _k = _sub;
- return _k;
- }
- auto substitute() {
- auto _k = _substitutions;
- return _k;
- }
- auto italics() {
- auto _k = _italics;
- return _k;
- }
- auto bold() {
- auto _k = _bold;
- return _k;
- }
- auto emphasis() {
- auto _k = _emphasis;
- return _k;
- }
- }
- return _composite_make();
- }
-}
-/++
- output hub<BR>
- check & generate output types requested
-+/
-template compositeMkCnfAA() {
- import sdp.ao;
- import std.array;
- mixin SiSUrgxInit;
- string[] _substitutions;
- string[string][] _sub;
- auto rgx = Rgx();
- auto compositeMkCnfAA(Mks...)(Mks makes) {
- /+
- - skip.first_make which is the "composite make output"
- - pass config files as associative arrays,
- - skip.last_make which is getopt, treat separately
- +/
- auto _composite_make = makes[0];
- auto _opts = makes[$-1];
- foreach (make; makes[1..$-1]) {
- if (auto z = "make" in make) { // document head: make (part of individual document)
- if (auto x = "substitute" in *z) {
- _composite_make["make"]["substitute"] = *x;
- }
- if (auto x = "italics" in *z) {
- _composite_make["make"]["italics"] = *x;
- }
- if (auto x = "bold" in *z) {
- _composite_make["make"]["bold"] = *x;
- }
- if (auto x = "emphasis" in *z) {
- _composite_make["make"]["emphasis"] = *x;
- }
- }
- }
- /+ logic for adding _opts make instructions to _composite make +/
- return _composite_make;
- }
-}