aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_hub.d
blob: db6bee278b5ea7821389143f7b527e39fbbe324c (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
76
77
78
79
80
/++
  output hub<BR>
  check & generate output types requested
+/
template outputHub() {
  void outputHub(C,D)(C contents, D doc_matters) {
    auto rgx = Rgx();
    if (doc_matters.opt_action_bool["source"]) {
      /+ mixin SiSUoutputSource; +/
      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"]) {
      /+ mixin SiSUoutputText; +/
      writeln("text processing");
      // auto text=SDPoutput_text();
      // text.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
    }
    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,
      );
      // epub.css_write;
      // writeln("epub processing");
    }
    if (doc_matters.opt_action_bool["pdf"]) {
      /+ mixin SiSUoutputPDF; +/
      writeln("pdf processing");
    }
    if (doc_matters.opt_action_bool["odt"]) {
      /+ mixin SiSUoutputODT; +/
      writeln("odt processing");
    }
    if (doc_matters.opt_action_bool["sqlite"]) {
      /+ mixin SiSUoutputSQLite; +/
      writeln("sqlite processing");
    }
    if (doc_matters.opt_action_bool["postgresql"]) {
      /+ mixin SiSUoutputPostgreSQL; +/
      writeln("pgsql processing");
    }
  }
}