aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_hub.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-01-12 20:51:12 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit45e1b786144b8ef0a70a235f8a1a89e90a752d8f (patch)
treee4e9d787fe9f0bce330a8db407e949aa9bf5ee8e /src/sdp/output_hub.d
parentdom structure, levels marked up & collapsed (use e.g. in epub toc) (diff)
0.11.0 improved message passing, using templates
Diffstat (limited to 'src/sdp/output_hub.d')
-rw-r--r--src/sdp/output_hub.d65
1 files changed, 42 insertions, 23 deletions
diff --git a/src/sdp/output_hub.d b/src/sdp/output_hub.d
index 7235619..bcf0154 100644
--- a/src/sdp/output_hub.d
+++ b/src/sdp/output_hub.d
@@ -4,51 +4,70 @@
+/
template SiSUoutputHub() {
struct SDPoutput {
- void hub(S)(
+ void hub(S,T)(
auto ref const S contents,
- string[][string] document_section_keys_sequenced,
- string[] html_segnames,
- string[string][string] dochead_make,
- string[string][string] dochead_meta,
- string fn_src,
- bool[string] opt_action_bool
+ auto ref T doc_matters,
) {
auto rgx = Rgx();
- if (opt_action_bool["source"]) {
- writeln("sisupod source");
+ if (doc_matters.opt_action_bool["source"]) {
+ writeln("source");
}
- if (opt_action_bool["sisupod"]) {
+ if (doc_matters.opt_action_bool["sisupod"]) {
+ mixin SiSUpod;
+ auto sisupod=SDPsisupod();
+ sisupod.sisupod_assemble(doc_matters.source_filename);
writeln("sisupod source");
}
- if (opt_action_bool["text"]) {
+ if (doc_matters.opt_action_bool["text"]) {
writeln("text processing");
}
- if (opt_action_bool["html"]) {
+ if (doc_matters.opt_action_bool["html"]) {
+ mixin SiSUoutputHTML;
+ auto html=SDPoutputHTML();
+ html.css_write;
+ html.scroll(
+ contents,
+ doc_matters,
+ );
+ html.seg(
+ contents,
+ doc_matters,
+ );
+ } else if(doc_matters.opt_action_bool["html_seg"]) {
+ mixin SiSUoutputHTML;
+ auto html=SDPoutputHTML();
+ html.css_write;
+ html.seg(
+ contents,
+ doc_matters,
+ );
+ } else if(doc_matters.opt_action_bool["html_scroll"]) {
mixin SiSUoutputHTML;
auto html=SDPoutputHTML();
html.css_write;
html.scroll(
contents,
- document_section_keys_sequenced,
- dochead_make,
- dochead_meta,
- fn_src,
- opt_action_bool
+ doc_matters,
);
}
- if (opt_action_bool["epub"]) {
- writeln("epub processing");
+ if (doc_matters.opt_action_bool["epub"]) {
+ mixin SiSUoutputEPub;
+ auto epub=SDPoutputEPub();
+ epub.doc_content( // consolidate
+ contents,
+ doc_matters,
+ );
}
- if (opt_action_bool["pdf"]) {
+ if (doc_matters.opt_action_bool["pdf"]) {
writeln("pdf processing");
}
- if (opt_action_bool["odt"]) {
+ if (doc_matters.opt_action_bool["odt"]) {
writeln("odt processing");
}
- if (opt_action_bool["sqlite"]) {
+ if (doc_matters.opt_action_bool["sqlite"]) {
writeln("sqlite processing");
}
- if (opt_action_bool["postgresql"]) {
+ if (doc_matters.opt_action_bool["postgresql"]) {
writeln("pgsql processing");
}
}