aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_hub.d
blob: 16fc120d0ff09ecf9c51f4a75260326d8fbef1e4 (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 outputSource; +/
      writeln("source");
    }
    if (doc_matters.opt_action_bool["sisupod"]) {
      mixin SiSUpod;
      auto sisupod=SiSUpod();
      sisupod.sisupod_assemble(doc_matters.source_filename);
      writeln("sisupod source");
    }
    if (doc_matters.opt_action_bool["text"]) {
      /+ mixin outputText; +/
      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 outputHTML;
      auto html=outputHTML();
      html.css_write;
      html.scroll(
        contents,
        doc_matters,
      );
      html.seg(
        contents,
        doc_matters,
      );
    } else if(doc_matters.opt_action_bool["html_seg"]) {
      mixin outputHTML;
      auto html=outputHTML();
      html.css_write;
      html.seg(
        contents,
        doc_matters,
      );
    } else if(doc_matters.opt_action_bool["html_scroll"]) {
      mixin outputHTML;
      auto html=outputHTML();
      html.css_write;
      html.scroll(
        contents,
        doc_matters,
      );
    }
    if (doc_matters.opt_action_bool["epub"]) {
      mixin outputEPub;
      auto epub=outputEPub();
      epub.doc_content(         // consolidate
        contents,
        doc_matters,
      );
      // epub.css_write;
      // writeln("epub processing");
    }
    if (doc_matters.opt_action_bool["pdf"]) {
      /+ mixin outputPDF; +/
      writeln("pdf processing");
    }
    if (doc_matters.opt_action_bool["odt"]) {
      /+ mixin outputODT; +/
      writeln("odt processing");
    }
    if (doc_matters.opt_action_bool["sqlite"]) {
      /+ mixin outputSQLite; +/
      writeln("sqlite processing");
    }
    if (doc_matters.opt_action_bool["postgresql"]) {
      /+ mixin outputPostgreSQL; +/
      writeln("pgsql processing");
    }
  }
}