aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/meta/conf_make_meta_composite.d
blob: 51e81ecbcab68f01157e5154253d6e18b3738609 (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
/++
  return composite make from config files
+/
module sdp.meta.conf_make_meta_composite;

template confFilesSDLtoStruct() {
  import
    std.exception,
    std.regex,
    std.stdio,
    std.string,
    std.traits,
    std.typecons,
    std.utf,
    std.conv : to;
  import
    sdp.meta.defaults,
    sdp.meta.rgx;
  auto confFilesSDLtoStruct(S,L)(
    S sdl_root_config_share,
    L sdl_root_config_local,
  ){
    mixin SiSUregisters;
    ConfCompositePlus _conf_composite;
    foreach (conf_sdlang; [sdl_root_config_share, sdl_root_config_local]) {
      if ("make" in conf_sdlang.maybe.tags) {
         _conf_composite.make_str.bold              = _conf_composite.make.bold              = extractSDLangTabOrAttrib(conf_sdlang, "make", "bold");
         _conf_composite.make_str.breaks            = _conf_composite.make.breaks            = extractSDLangTabOrAttrib(conf_sdlang, "make", "breaks");
         _conf_composite.make_str.cover_image       = _conf_composite.make.cover_image       = extractSDLangTabOrAttrib(conf_sdlang, "make", "cover_image");
         _conf_composite.make_str.css               = _conf_composite.make.css               = extractSDLangTabOrAttrib(conf_sdlang, "make", "css");
         _conf_composite.make_str.emphasis          = _conf_composite.make.emphasis          = extractSDLangTabOrAttrib(conf_sdlang, "make", "emphasis");
         _conf_composite.make_str.footer            = _conf_composite.make.footer            = extractSDLangTabOrAttrib(conf_sdlang, "make", "footer");
         _conf_composite.make_str.headings          = _conf_composite.make.headings          = extractSDLangTabOrAttrib(conf_sdlang, "make", "headings");
         _conf_composite.make_str.home_button_image = _conf_composite.make.home_button_image = extractSDLangTabOrAttrib(conf_sdlang, "make", "home_button_image");
         _conf_composite.make_str.home_button_text  = _conf_composite.make.home_button_text  = extractSDLangTabOrAttrib(conf_sdlang, "make", "home_button_text");
         _conf_composite.make_str.italics           = _conf_composite.make.italics           = extractSDLangTabOrAttrib(conf_sdlang, "make", "italics");
         _conf_composite.make_str.num_top           = _conf_composite.make.num_top           = extractSDLangTabOrAttrib(conf_sdlang, "make", "num_top");
         _conf_composite.make_str.num_depth         = _conf_composite.make.num_depth         = extractSDLangTabOrAttrib(conf_sdlang, "make", "num_depth");
         _conf_composite.make_str.substitute        = _conf_composite.make.substitute        = extractSDLangTabOrAttrib(conf_sdlang, "make", "substitute");
         _conf_composite.make_str.texpdf_font       = _conf_composite.make.texpdf_font       = extractSDLangTabOrAttrib(conf_sdlang, "make", "texpdf_font");
      }
    }
    return _conf_composite;
  }
}