From 55bba8c290e1f5d1c4227b1b96c0e1932f3a8f55 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 30 Aug 2016 12:28:56 -0400 Subject: minor cleaning --- org/ao_abstract_doc_source.org | 115 +++++++-------------- org/ao_conf_make_meta.org | 222 ++++++++++++++++++++++++++++++----------- org/ao_read_source_files.org | 4 +- 3 files changed, 203 insertions(+), 138 deletions(-) (limited to 'org') diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org index 2fe674b..1239a50 100644 --- a/org/ao_abstract_doc_source.org +++ b/org/ao_abstract_doc_source.org @@ -152,10 +152,9 @@ line_occur = [ ]; auto type = flags_type_init; mixin ScreenTxtColors; -int tell_lo(string color, int obj_cite_number, in char[] line) { +int tell_lo(int obj_cite_number, in char[] line) { writefln( - "%s%s %s", - scr_txt_marker[color], + "* %s %s", to!string(obj_cite_number), to!string(line) ); @@ -163,8 +162,7 @@ int tell_lo(string color, int obj_cite_number, in char[] line) { } int tell_l(string color, in char[] line) { writefln( - "%s%s", - scr_txt_marker[color], + "* %s", line ); return 0; @@ -243,8 +241,7 @@ debug(source) { // source lines debug(srclines) { if (!line.empty) { // source lines, not empty writefln( - "%s%s", - scr_txt_marker["green"], + "* %s", line ); } @@ -965,9 +962,7 @@ auto start_block( /+ curly code open +/ debug(code) { // code (curly) open writefln( - "%s* [code curly] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [code curly] %s", line ); } @@ -978,9 +973,7 @@ auto start_block( /+ curly poem open +/ debug(poem) { // poem (curly) open writefln( - "%s* [poem curly] %s%s", - scr_txt_color["red"], - scr_txt_color["off"], + "* [poem curly] %s", line ); } @@ -994,9 +987,7 @@ auto start_block( /+ curly group open +/ debug(group) { // group (curly) open writefln( - "%s* [group curly] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [group curly] %s", line ); } @@ -1007,9 +998,7 @@ auto start_block( /+ curly block open +/ debug(block) { // block (curly) open writefln( - "%s* [block curly] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [block curly] %s", line ); } @@ -1020,9 +1009,7 @@ auto start_block( /+ curly quote open +/ debug(quote) { // quote (curly) open writefln( - "%s* [quote curly] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [quote curly] %s", line ); } @@ -1033,9 +1020,7 @@ auto start_block( /+ curly table open +/ debug(table) { // table (curly) open writefln( - "%s* [table curly] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [table curly] %s", line ); } @@ -1052,9 +1037,7 @@ auto start_block( /+ tic code open +/ debug(code) { // code (tic) open writefln( - "%s* [code tic] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [code tic] %s", line ); } @@ -1065,9 +1048,7 @@ auto start_block( /+ tic poem open +/ debug(poem) { // poem (tic) open writefln( - "%s* [poem tic] %s%s", - scr_txt_color["red"], - scr_txt_color["off"], + "* [poem tic] %s", line ); } @@ -1080,9 +1061,7 @@ auto start_block( /+ tic group open +/ debug(group) { // group (tic) open writefln( - "%s* [group tic] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [group tic] %s", line ); } @@ -1093,9 +1072,7 @@ auto start_block( /+ tic block open +/ debug(block) { // block (tic) open writefln( - "%s* [block tic] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [block tic] %s", line ); } @@ -1106,9 +1083,7 @@ auto start_block( /+ tic quote open +/ debug(quote) { // quote (tic) open writefln( - "%s* [quote tic] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [quote tic] %s", line ); } @@ -1119,9 +1094,7 @@ auto start_block( /+ tic table open +/ debug(table) { // table (tic) open writefln( - "%s* [table tic] %s%s", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [table tic] %s", line ); } @@ -1285,9 +1258,7 @@ auto biblio_block( } debug(biblio) { writefln( - "%s * %s %s", - scr_txt_color["yellow"], - scr_txt_color["off"], + "* %s", line ); } @@ -1345,9 +1316,7 @@ auto biblio_block( s = j.toString(); debug(biblio) { writefln( - "%s* %s%s: %s\n%s", - scr_txt_color["red"], - scr_txt_color["off"], + "* %s: %s\n%s", biblio_tag_name, biblio_tag_entry, j[biblio_tag_name] @@ -1377,9 +1346,7 @@ auto poem_block( an_object["obj"]="verse"; // check that this is as you please debug(poem) { // poem (curly) close writefln( - "%s* [poem curly] %s%s", - scr_txt_color["red"], - scr_txt_color["off"], + "* [poem curly] %s", line ); } @@ -1389,8 +1356,7 @@ auto poem_block( debug(poem) { // poem (curly) close writeln(__LINE__); writefln( - "%s%s %s", - scr_txt_marker["fuchsia"], + "* %s %s", obj_cite_number, line ); @@ -1400,7 +1366,6 @@ auto poem_block( if (an_object.length > 0) { debug(poem) { // poem (curly) close tell_lo( - "fuchsia", obj_cite_number, an_object["obj"] ); @@ -1441,8 +1406,7 @@ auto poem_block( an_object["obj"] = processing["verse"]; debug(poem) { // poem verse writefln( - "%s%s curly\n%s", - scr_txt_marker["green"], + "* %s curly\n%s", obj_cite_number, an_object["obj"] ); @@ -1477,9 +1441,7 @@ auto poem_block( an_object["obj"]="verse"; // check that this is as you please debug(poem) { // poem (curly) close writefln( - "%s* [poem tic] %s%s", - scr_txt_color["red"], - scr_txt_color["off"], + "* [poem tic] %s", line ); } @@ -1489,7 +1451,7 @@ auto poem_block( if (an_object.length > 0) { debug(poem) { // poem (tic) close writeln(__LINE__); - tell_lo("fuchsia", obj_cite_number, line); + tell_lo(obj_cite_number, line); } processing.remove("verse"); an_object["is"] = "verse"; @@ -1527,8 +1489,7 @@ auto poem_block( an_object["obj"] = processing["verse"]; debug(poem) { // poem (tic) close writefln( - "%s%s tic\n%s", - scr_txt_marker["green"], + "* %s tic\n%s", obj_cite_number, an_object["obj"] ); @@ -1955,9 +1916,7 @@ auto book_index( /+ match book_index +/ debug(bookindexmatch) { // book index writefln( - "%s* [bookindex] %s%s\n", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [bookindex] %s\n", to!string(m.captures[1]), ); // writeln(scr_txt_marker["blue"], to!string(m.captures[1]), "\n"); @@ -1969,9 +1928,7 @@ auto book_index( book_idx_tmp = to!string(m.captures[1]); debug(bookindexmatch) { // book index writefln( - "%s* [bookindex] %s%s\n", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [bookindex] %s\n", book_idx_tmp, ); // writeln(scr_txt_marker["blue"], book_idx_tmp, "\n"); @@ -1983,9 +1940,7 @@ auto book_index( an_object["bookindex"] = book_idx_tmp ~ to!string(m.captures[1]); debug(bookindexmatch) { // book index writefln( - "%s* [bookindex] %s%s\n", - scr_txt_color["blue"], - scr_txt_color["off"], + "* [bookindex] %s\n", book_idx_tmp, ); // writeln(scr_txt_marker["blue"], book_idx_tmp, "\n"); @@ -2911,7 +2866,7 @@ struct BookIndexNuggetHash { mixin ScreenTxtColors; if (!bookindex_section.empty) { writeln( - scr_txt_color["blue"], "* [bookindex] ", scr_txt_color["off"], + "* [bookindex] ", "[", to!string(obj_cite_number), "] ", bookindex_section ); } @@ -3039,7 +2994,7 @@ struct BookIndexReportSection { } #+END_SRC -**** book index (sort &) build section :report:section: +**** book index (sort &) build section :report:section: #+name: ao_emitters #+BEGIN_SRC d @@ -3137,7 +3092,7 @@ struct BookIndexReportSection { } #+END_SRC -**** book index (sort &) build section :report:section: +**** book index (sort &) build section :report:section: #+name: ao_emitters #+BEGIN_SRC d @@ -3432,9 +3387,9 @@ struct NodeStructureMetadata { debug(node) { mixin ScreenTxtColors; if (match(lev_markup_number, rgx.levels_numbered_headings)) { - writeln(scr_txt_marker["yellow"], to!string(node)); + writeln("* ", to!string(node)); } else { - writeln(scr_txt_marker["white"], to!string(node)); + writeln("* ", to!string(node)); } } JSONValue j = parseJSON(node); @@ -3586,15 +3541,15 @@ struct NodeStructureMetadata { debug(heading) { mixin ScreenTxtColors; if (match(lev_markup_number, rgx.levels_numbered_headings)) { - writeln(scr_txt_marker["yellow"], to!string(node)); + writeln("* ", to!string(node)); } } debug(node) { mixin ScreenTxtColors; if (match(lev_markup_number, rgx.levels_numbered_headings)) { - writeln(scr_txt_marker["yellow"], to!string(node)); + writeln("* ", to!string(node)); } else { - writeln(scr_txt_marker["white"], to!string(node)); + writeln("* ", to!string(node)); } } JSONValue j = parseJSON(node); diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org index 38510c6..6bb8ad4 100644 --- a/org/ao_conf_make_meta.org +++ b/org/ao_conf_make_meta.org @@ -23,7 +23,9 @@ private auto sdlangToAAmake(string[string][string] conf, Tag conf_sdlang) { if (!(conf_sdlang.maybe.tags[maintag].empty)) { if (!(conf_sdlang.tags[maintag][0].maybe.attributes[subtag].empty) && (conf_sdlang.tags[maintag][0].attributes[subtag][0].value.length > 1)) { - writeln(conf_sdlang.tags[maintag][0].attributes[subtag][0].value); + debug(headersdlang) { + writeln(conf_sdlang.tags[maintag][0].attributes[subtag][0].value); + } conf[maintag][subtag] = to!string(conf_sdlang.tags[maintag][0].attributes[subtag][0].value); } @@ -61,91 +63,117 @@ private auto documentMakeSDLangToAAmake(Tag document_make_sdlang) { 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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)) { - writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + 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); } @@ -160,13 +188,17 @@ private auto documentMakeSDLangToAAmake(Tag document_make_sdlang) { // hs = "link"; // if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty) // && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - // writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + // debug(headersdlang) { + // writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); + // } // dochead_meta[hm][hs] = // to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value); // } } +/ - // writeln(dochead_make); + // debug(headersdlang) { + // writeln(dochead_make); + // } return dochead_make; } #+END_SRC @@ -484,7 +516,9 @@ private auto headerNativeToAA(in char[] src_header) { header_reset_states_common(line_occur, an_object, type); type["header_make"] = State.off; type["header_meta"] = State.off; - writeln(dochead_metadata_and_make); + debug(headersdlang) { + writeln(dochead_metadata_and_make); + } } else { an_object = native_header_extract(header_line, line_occur, an_object, type); } @@ -582,13 +616,17 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "main"; if (!(header_sdlang.tags[hm].empty) && (header_sdlang.tags[hm][0].values[0].length > 1)) { - writeln(header_sdlang.tags[hm][0].values[0]); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].values[0]); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].values[0]); // to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } else if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } else { @@ -597,12 +635,16 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "sub"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } else if (!(header_sdlang.tags[hm][0].maybe.attributes["subtitle"].empty) && (header_sdlang.tags[hm][0].attributes["subtitle"][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes["subtitle"][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes["subtitle"][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes["subtitle"][0].value); } @@ -612,26 +654,34 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "language"; if (!(header_sdlang.tags[hm][0].maybe.attributes["lang"].empty) && (header_sdlang.tags[hm][0].attributes["lang"][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes["lang"][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes["lang"][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes["lang"][0].value); } else if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "edition"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "note"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -647,28 +697,36 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "author"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "author_email"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "illustrator"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "translator"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -678,35 +736,45 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "dewey"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "keywords"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "loc"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "subject"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "topic_register"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -716,49 +784,63 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "added_to_site"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "available"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "created"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "issued"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "modified"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "published"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "valid"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -768,21 +850,27 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "isbn"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "oclc"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "pg"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -795,7 +883,9 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch // hs = "link"; // if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) // && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - // writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + // debug(headersdlang) { + // writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + // } // dochead_meta[hm][hs] = // to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); // } @@ -805,14 +895,18 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "abstract"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "description"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -822,21 +916,27 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "language"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "source"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "title"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -846,7 +946,9 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "name"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -856,28 +958,36 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch hs = "copyright"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "cover"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "illustrations"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } hs = "license"; if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty) && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + debug(headersdlang) { + writeln(header_sdlang.tags[hm][0].attributes[hs][0].value); + } dochead_meta[hm][hs] = to!string(header_sdlang.tags[hm][0].attributes[hs][0].value); } @@ -926,11 +1036,9 @@ template SiSUheaderExtractHub() { private auto headerContentAA(char[] header_src, string[string][string] conf_doc_make_aa) { auto head_native = HeaderDocMetadataAndMakeNativeToAA(); auto head_sdlang = HeaderExtractSDL(); - writeln(__LINE__); auto header_make_and_meta_tuple = (match(header_src, rgx.native_header_meta_title)) ? (head_native.headerNativeToAA(header_src)) : (head_sdlang.headerSDLangToAA(header_src, conf_doc_make_aa)); - writeln(__LINE__); static assert(!isTypeTuple!(header_make_and_meta_tuple)); return header_make_and_meta_tuple; } diff --git a/org/ao_read_source_files.org b/org/ao_read_source_files.org index d61b677..c1736cf 100644 --- a/org/ao_read_source_files.org +++ b/org/ao_read_source_files.org @@ -41,7 +41,9 @@ final private string readInConfigFile(string conf_sdl) { // writeln(conf_file); try { if (exists(conf_file)) { - writeln(conf_file); + debug(configfile) { + writeln(conf_file); + } config_file_str = readText(conf_file); break; } -- cgit v1.2.3