aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_hub.d
blob: 8c21fa90ba8c5daac284730f98651b41ef36fd0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/+
  output hub
  output_hub.d
+/
template SiSUoutputHub() {
  struct SDPoutput {
    void hub(S)(
      auto ref const S         contents,
      string[][string][string] bookindex_unordered_hashes,
      JSONValue[]              biblio,
      string[string][string]   dochead_make,
      string[string][string]   dochead_meta,
      string                   fn_src,
      bool[string]             opt_action_bool
    ) {
      auto rgx = Rgx();
      if (opt_action_bool["source"]) {
        writeln("sisupod source");
      }
      if (opt_action_bool["sisupod"]) {
        writeln("sisupod source");
      }
      if (opt_action_bool["text"]) {
        writeln("text processing");
        // auto text=SDPoutput_text();
        // text.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
      }
      if (opt_action_bool["html"]) {
        mixin SiSUoutputHTML;
        auto html=SDPoutputHTML();
        html.css_write;
        html.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
      }
      if (opt_action_bool["epub"]) {
        writeln("epub processing");
      }
      if (opt_action_bool["pdf"]) {
        writeln("pdf processing");
      }
      if (opt_action_bool["odt"]) {
        writeln("odt processing");
      }
      if (opt_action_bool["sqlite"]) {
        writeln("sqlite processing");
      }
      if (opt_action_bool["postgresql"]) {
        writeln("pgsql processing");
      }
    }
  }
}