diff options
Diffstat (limited to 'src/sdp/output_hub.d')
-rw-r--r-- | src/sdp/output_hub.d | 65 |
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"); } } |