aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_conf_make_meta_sdlang.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/ao_conf_make_meta_sdlang.d')
-rw-r--r--src/sdp/ao_conf_make_meta_sdlang.d140
1 files changed, 2 insertions, 138 deletions
diff --git a/src/sdp/ao_conf_make_meta_sdlang.d b/src/sdp/ao_conf_make_meta_sdlang.d
index 533f482..74bb996 100644
--- a/src/sdp/ao_conf_make_meta_sdlang.d
+++ b/src/sdp/ao_conf_make_meta_sdlang.d
@@ -45,141 +45,6 @@ template SiSUheaderExtractSDLang() {
}
private auto documentMakeSDLangToAAmake(Tag)(Tag document_make_sdlang) {
auto dochead_make = sdlangToAAmake(make_aa, document_make_sdlang);
- /+
- /+ dochead +/
- string hm;
- string hs;
- /+ make +/
- auto dochead_make = make_aa;
- if (!(document_make_sdlang.maybe.tags["make"].empty)) {
- hm = "make";
- hs = "bold";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "breaks";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "cover_image";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "css";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "emphasis";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "footer";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "headings";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "home_button_image";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "home_button_text";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "italics";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "num_top";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "substitute";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- hs = "texpdf_font";
- if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
- && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
- debug(headersdlang) {
- writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- dochead_make[hm][hs] =
- to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
- }
- }
- +/
- /+
- hm = "links";
- if (!(document_make_sdlang.maybe.tags[hm].empty)) {
- /+ TODO
- stuff to fix
- +/
- }
- +/
return dochead_make;
}
final private auto headerMakeSDLang(Hs)(Hs src_header) {
@@ -218,7 +83,6 @@ template SiSUheaderExtractSDLang() {
char[][] source_header_arr =
(cast(char[]) src_header).split(rgx.newline_eol_delimiter);
char[] header_clean;
- // TODO
foreach(header_line; source_header_arr) {
if (!match(header_line, rgx.comments)) {
header_clean ~= header_line ~ "\n";
@@ -245,7 +109,7 @@ template SiSUheaderExtractSDLang() {
auto dochead_meta = sdlangToAAmake(meta_aa, header_sdlang);
if (dochead_meta["title"]["main"].empty) {
dochead_meta["title"]["main"] =
- to!string(header_sdlang.maybe.tags["title"][0].values[0]); // test that this exists
+ to!string(header_sdlang.maybe.tags["title"][0].values[0]);
}
if (!(dochead_meta["title"]["subtitle"].empty)
&& (dochead_meta["title"]["sub"].empty)) {
@@ -277,7 +141,7 @@ template SiSUheaderExtractSDLang() {
static assert(is(typeof(header_sdlang_src) == char[]));
static assert(is(typeof(conf_doc_make_aa) == string[string][string]));
}
- auto header_sdlang_tag = headerSDLangGet(header_sdlang_src); // sdlang.ast.Tag
+ auto header_sdlang_tag = headerSDLangGet(header_sdlang_src);
auto header_aa_tuple = headerSDLangToAAmake(header_sdlang_tag, conf_doc_make_aa);
return header_aa_tuple;
}