aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_hub.d
blob: db508ffbe7488af28b54d4623878af25abcc63e3 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/++
  output hub<BR>
  check & generate output types requested
+/
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();
      string[] document_parts;
      if (opt_action_bool["source"]) {
        writeln("sisupod source");
      }
      if (opt_action_bool["sisupod"]) {
        writeln("sisupod source");
      }
      if (opt_action_bool["text"]) {
        writeln("text processing");
      }
      if (opt_action_bool["html"]) {
        mixin SiSUoutputHTML;
        auto html=SDPoutputHTML();
        document_parts = [
          "head",
          "toc_scroll",
          "body",
          "endnotes_scroll",
          "bibliography",
          "bookindex_scroll"
        ];
        html.css_write;
        html.scroll(
          contents,
          document_parts,
          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");
      }
    }
  }
}