diff options
Diffstat (limited to 'org/ao_conf_make_meta.org')
-rw-r--r-- | org/ao_conf_make_meta.org | 140 |
1 files changed, 2 insertions, 138 deletions
diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org index 30e16a0..ad656aa 100644 --- a/org/ao_conf_make_meta.org +++ b/org/ao_conf_make_meta.org @@ -136,141 +136,6 @@ private auto configSettingsSDLangToAAmake(Tag)(Tag conf_sdlang) { #+BEGIN_SRC d 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; } #+END_SRC @@ -322,7 +187,6 @@ private auto headerSDLangGet(Hs)(Hs src_header) { 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"; @@ -355,7 +219,7 @@ private auto headerSDLangToAAmake(Tag,Ma)(Tag header_sdlang, Ma dochead_make) { 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)) { @@ -393,7 +257,7 @@ private auto headerSDLangToAA(Hs,Ma)(Hs header_sdlang_src, Ma conf_doc_make_aa) 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; } |