aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_hub.d
blob: bcf015432f77462207cd1408bdb85b90c355a007 (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
68
69
70
71
72
73
74
75
/++
  output hub<BR>
  check & generate output types requested
+/
template SiSUoutputHub() {
  struct SDPoutput {
    void hub(S,T)(
      auto ref const S         contents,
      auto ref T               doc_matters,
    ) {
      auto rgx = Rgx();
      if (doc_matters.opt_action_bool["source"]) {
        writeln("source");
      }
      if (doc_matters.opt_action_bool["sisupod"]) {
        mixin SiSUpod;
        auto sisupod=SDPsisupod();
        sisupod.sisupod_assemble(doc_matters.source_filename);
        writeln("sisupod source");
      }
      if (doc_matters.opt_action_bool["text"]) {
        writeln("text processing");
      }
      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,
          doc_matters,
        );
      }
      if (doc_matters.opt_action_bool["epub"]) {
        mixin SiSUoutputEPub;
        auto epub=SDPoutputEPub();
        epub.doc_content(         // consolidate
          contents,
          doc_matters,
        );
      }
      if (doc_matters.opt_action_bool["pdf"]) {
        writeln("pdf processing");
      }
      if (doc_matters.opt_action_bool["odt"]) {
        writeln("odt processing");
      }
      if (doc_matters.opt_action_bool["sqlite"]) {
        writeln("sqlite processing");
      }
      if (doc_matters.opt_action_bool["postgresql"]) {
        writeln("pgsql processing");
      }
    }
  }
}