aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/ao_abstract_doc_source.org237
-rw-r--r--org/ao_conf_make_meta.org45
-rw-r--r--org/ao_defaults.org96
-rw-r--r--org/ao_output_debugs.org18
-rw-r--r--org/ao_read_source_files.org72
-rw-r--r--org/output.org13
-rw-r--r--org/sdp.org13
7 files changed, 77 insertions, 417 deletions
diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org
index 0efc339..1578ce3 100644
--- a/org/ao_abstract_doc_source.org
+++ b/org/ao_abstract_doc_source.org
@@ -392,9 +392,9 @@ if ((matchFirst(line, rgx.book_index))
debug(comment) {
writeln(line);
}
- an_object["obj"] ~= line ~= "\n";
+ an_object["nugget"] ~= line ~= "\n";
the_document_body_section ~=
- set_abstract_object.contents_comment(strip(an_object["obj"]));
+ set_abstract_object.contents_comment(strip(an_object["nugget"]));
_common_reset_(line_occur, an_object, type);
processing.remove("verse");
++counter;
@@ -447,7 +447,7 @@ if ((matchFirst(line, rgx.book_index))
debug(heading) { // heading
writeln(line);
}
- an_object["obj"] ~= line ~= "\n";
+ an_object["nugget"] ~= line ~= "\n";
++line_occur["heading"];
#+END_SRC
@@ -460,7 +460,7 @@ if ((matchFirst(line, rgx.book_index))
debug(para) {
writeln(line);
}
- an_object["obj"] ~= line;
+ an_object["nugget"] ~= line;
++line_occur["para"];
}
}
@@ -540,7 +540,7 @@ if ((type["heading"] == State.on)
an_object["is"]
); // heading
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
++heading_pointer;
debug(segments) {
writeln(an_object["lev_markup_number"]);
@@ -559,14 +559,10 @@ if ((type["heading"] == State.on)
// track previous heading and make assertions
debug(objectrelated1) { // check
writeln(line);
- // writeln(an_object["obj"]);
- // writeln(contents_am[counter]["obj_cite_number"], " ", contents_am[counter]["obj"]);
- // writeln(m.hit, "\n");
}
_common_reset_(line_occur, an_object, type);
an_object.remove("lev");
an_object.remove("lev_markup_number");
- // an_object["lev_markup_number"]="9";
processing.remove("verse");
++counter;
#+END_SRC
@@ -597,7 +593,7 @@ if ((type["heading"] == State.on)
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_para(
an_object["is"],
@@ -641,7 +637,7 @@ if (the_document_body_section.length > 0) {
note_section.gather_notes_for_endnote_section(
the_document_body_section,
segment_object_belongs_to,
- the_document_body_section.length -1
+ the_document_body_section.length-1
);
}
}
@@ -886,7 +882,7 @@ functions used in document abstraction
#+name: abs_functions_object_reset
#+BEGIN_SRC d
auto object_reset(ref string[string] an_object) {
- an_object.remove("obj");
+ an_object.remove("nugget");
an_object.remove("substantive");
an_object.remove("is");
an_object.remove("attrib");
@@ -942,7 +938,6 @@ void _check_obj_cite_number_status_(
} else if (matchFirst(line, rgx.obj_cite_number_off_dh)) {
type["obj_cite_number_status"] = TriState.closing;
} else {
- // type["obj_cite_number_status"] = TriState.closing;
type["obj_cite_number_status"] = TriState.off;
}
} else {
@@ -1154,7 +1149,7 @@ void _code_block_(
debug(code) { // code (curly) line
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // code (curly) line
+ an_object["nugget"] ~= line ~= "\n"; // code (curly) line
}
} else if (type["tic_code"] == TriState.on) {
if (matchFirst(line, rgx.block_tic_close)) {
@@ -1168,7 +1163,7 @@ void _code_block_(
debug(code) { // code (tic) line
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // code (tic) line
+ an_object["nugget"] ~= line ~= "\n"; // code (tic) line
}
}
}
@@ -1293,8 +1288,6 @@ void _biblio_block_(
writeln("check problem entry (Title missing): ", biblio_entry_str_json);
} else if ((biblio_entry["author_raw"].str.empty) && (biblio_entry["editor_raw"].str.empty)) {
writeln("check problem entry (No author and no editor): ", biblio_entry_str_json);
- // } else if (biblio_entry["sortby_deemed_author_year_title"].str.empty) {
- // writeln("check problem entry (Sort Field missing): ", biblio_entry_str_json);
} else {
biblio_arr_json ~= biblio_entry_str_json;
}
@@ -1335,7 +1328,6 @@ void _biblio_block_(
}
}
tmp = replace(tmp, rgx.trailing_comma, "");
- // tmp = replace(tmp, regex(r"(,[ ]*)$","g"), "");
j["author"].str = tmp;
goto default;
case "editor_raw": // editor_arr editor (fn sn)
@@ -1351,7 +1343,6 @@ void _biblio_block_(
}
}
tmp = replace(tmp, rgx.trailing_comma, "");
- // tmp = replace(tmp, regex(r"(,[ ]*)$","g"), "");
j["editor"].str = tmp;
goto default;
case "fulltitle": // title & subtitle
@@ -1401,7 +1392,7 @@ void _poem_block_(
) {
if (type["curly_poem"] == TriState.on) {
if (matchFirst(line, rgx.block_curly_poem_close)) {
- an_object["obj"]="verse"; // check that this is as you please
+ an_object["nugget"]="verse"; // check that this is as you please
debug(poem) { // poem (curly) close
writefln(
"* [poem curly] %s",
@@ -1409,7 +1400,7 @@ void _poem_block_(
);
}
if (processing.length > 0) {
- an_object["obj"] = processing["verse"];
+ an_object["nugget"] = processing["verse"];
}
debug(poem) { // poem (curly) close
writeln(__LINE__);
@@ -1418,14 +1409,12 @@ void _poem_block_(
obj_cite_number,
line
);
- // writeln(an_object.keys);
- // writeln(an_object.length);
}
if (an_object.length > 0) {
debug(poem) { // poem (curly) close
writeln(
obj_cite_number,
- an_object["obj"]
+ an_object["nugget"]
);
}
an_object["is"] = "verse";
@@ -1434,7 +1423,7 @@ void _poem_block_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1463,12 +1452,12 @@ void _poem_block_(
}
if (type["verse_new"] == State.on) {
verse_line=1;
- an_object["obj"] = processing["verse"];
+ an_object["nugget"] = processing["verse"];
debug(poem) { // poem verse
writefln(
"* %s curly\n%s",
obj_cite_number,
- an_object["obj"]
+ an_object["nugget"]
);
}
processing.remove("verse");
@@ -1486,7 +1475,7 @@ void _poem_block_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1501,7 +1490,7 @@ void _poem_block_(
}
} else if (type["tic_poem"] == TriState.on) {
if (auto m = matchFirst(line, rgx.block_tic_close)) { // tic_poem_close
- an_object["obj"]="verse"; // check that this is as you please
+ an_object["nugget"]="verse"; // check that this is as you please
debug(poem) { // poem (curly) close
writefln(
"* [poem tic] %s",
@@ -1509,7 +1498,7 @@ void _poem_block_(
);
}
if (processing.length > 0) { // needs looking at
- an_object["obj"] = processing["verse"];
+ an_object["nugget"] = processing["verse"];
}
if (an_object.length > 0) {
debug(poem) { // poem (tic) close
@@ -1523,7 +1512,7 @@ void _poem_block_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1551,12 +1540,12 @@ void _poem_block_(
}
if (type["verse_new"] == State.on) {
verse_line=1;
- an_object["obj"] = processing["verse"];
+ an_object["nugget"] = processing["verse"];
debug(poem) { // poem (tic) close
writefln(
"* %s tic\n%s",
obj_cite_number,
- an_object["obj"]
+ an_object["nugget"]
);
}
processing.remove("verse");
@@ -1575,7 +1564,7 @@ void _poem_block_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1613,7 +1602,7 @@ void _group_block_(
debug(group) { // group
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // build group array (or string)
+ an_object["nugget"] ~= line ~= "\n"; // build group array (or string)
}
} else if (type["tic_group"] == TriState.on) {
if (matchFirst(line, rgx.block_tic_close)) {
@@ -1627,7 +1616,7 @@ void _group_block_(
debug(group) { // group
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // build group array (or string)
+ an_object["nugget"] ~= line ~= "\n"; // build group array (or string)
}
}
}
@@ -1654,7 +1643,7 @@ void _block_block_(
debug(block) { // block
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // build block array (or string)
+ an_object["nugget"] ~= line ~= "\n"; // build block array (or string)
}
} else if (type["tic_block"] == TriState.on) {
if (matchFirst(line, rgx.block_tic_close)) {
@@ -1668,7 +1657,7 @@ void _block_block_(
debug(block) { // block
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // build block array (or string)
+ an_object["nugget"] ~= line ~= "\n"; // build block array (or string)
}
}
}
@@ -1695,7 +1684,7 @@ void _quote_block_(
debug(quote) { // quote
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // build quote array (or string)
+ an_object["nugget"] ~= line ~= "\n"; // build quote array (or string)
}
} else if (type["tic_quote"] == TriState.on) {
if (matchFirst(line, rgx.block_tic_close)) {
@@ -1709,7 +1698,7 @@ void _quote_block_(
debug(quote) { // quote
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // build quote array (or string)
+ an_object["nugget"] ~= line ~= "\n"; // build quote array (or string)
}
}
}
@@ -1736,7 +1725,7 @@ void _table_block_(
debug(table) { // table
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // build table array (or string)
+ an_object["nugget"] ~= line ~= "\n"; // build table array (or string)
}
} else if (type["tic_table"] == TriState.on) {
if (matchFirst(line, rgx.block_tic_close)) {
@@ -1750,7 +1739,7 @@ void _table_block_(
debug(table) { // table
writeln(line);
}
- an_object["obj"] ~= line ~= "\n"; // build table array (or string)
+ an_object["nugget"] ~= line ~= "\n"; // build table array (or string)
}
}
}
@@ -1804,7 +1793,7 @@ void _block_flag_line_empty_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block_code(
an_object["is"],
@@ -1822,7 +1811,6 @@ void _block_flag_line_empty_(
("bookindex" in an_object) ? an_object["bookindex"] : "";
bookindex_unordered_hashes =
bkidx_hash(an_object["bookindex"], obj_cite_number);
- // obj_cite_number = obj_cite_number_emit(type["obj_cite_number_status"]);
an_object["is"] = "verse"; // check also
_node =
node_construct.node_emitter(
@@ -1832,7 +1820,6 @@ void _block_flag_line_empty_(
counter,
heading_pointer-1,
an_object["is"]
- // "verse"
);
the_document_body_section ~=
set_abstract_object.contents_block_obj_cite_number_string(
@@ -1843,7 +1830,6 @@ void _block_flag_line_empty_(
); // bookindex
object_reset(an_object);
processing.remove("verse");
- // ++obj_cite_number;
type["blocks"] = TriState.off;
type["poem"] = TriState.off;
} else if (type["table"] == TriState.closing) {
@@ -1868,7 +1854,7 @@ void _block_flag_line_empty_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1903,7 +1889,7 @@ void _block_flag_line_empty_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1937,7 +1923,7 @@ void _block_flag_line_empty_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1972,7 +1958,7 @@ void _block_flag_line_empty_(
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object["obj"], _node);
+ obj_att.obj_attributes(an_object["is"], an_object["nugget"], _node);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -2006,7 +1992,6 @@ auto _book_index_(
"* [bookindex] %s\n",
to!string(m.captures[1]),
);
- // writeln(scr_txt_marker["blue"], to!string(m.captures[1]), "\n");
}
an_object["bookindex"] = to!string(m.captures[1]);
} else if (auto m = match(line, rgx.book_index_open)) {
@@ -2018,7 +2003,6 @@ auto _book_index_(
"* [bookindex] %s\n",
book_idx_tmp,
);
- // writeln(scr_txt_marker["blue"], book_idx_tmp, "\n");
}
} else if (type["book_index"] == State.on ) {
/+ book_index flag set +/
@@ -2030,7 +2014,6 @@ auto _book_index_(
"* [bookindex] %s\n",
book_idx_tmp,
);
- // writeln(scr_txt_marker["blue"], book_idx_tmp, "\n");
}
book_idx_tmp = "";
} else {
@@ -2212,15 +2195,14 @@ auto _heading_matched_(
type["heading_biblio"] = State.off;
type["para"] = State.off;
++line_occur["heading"];
- an_object["obj"] ~= line ~= "\n";
+ an_object["nugget"] ~= line ~= "\n";
an_object["lev"] ~= m.captures[1];
- // writeln("an object level: ", an_object);
assertions_doc_structure(an_object, lv); // includes most of the logic for collapsed levels
switch (an_object["lev"]) {
case "A":
- an_object["obj"]=replaceFirst(an_object["obj"],
+ an_object["nugget"]=replaceFirst(an_object["nugget"],
rgx.variable_doc_title, (dochead_meta_aa["title"]["full"] ~ ","));
- an_object["obj"]=replaceFirst(an_object["obj"],
+ an_object["nugget"]=replaceFirst(an_object["nugget"],
rgx.variable_doc_author, dochead_meta_aa["creator"]["author"]);
collapsed_lev["h0"] = 1;
an_object["lev_collapsed_number"] =
@@ -2332,8 +2314,6 @@ auto _heading_matched_(
an_object["lev_markup_number"] = to!string(lv["lv"]);
}
debug(heading) { // heading
- // writeln(m.captures[1], " ", m.captures[2], "\n"); // figure inclusion of post capture text
- // writeln(m.hit, "\n");
writeln(strip(line));
}
}
@@ -2354,14 +2334,12 @@ auto _para_match_(
) {
if (line_occur["para"] == State.off) {
/+ para matches +/
- // paragraphs
- // (fl ag_type["heading"] = true) &&
if (auto m = matchFirst(line, rgx.para_indent)) {
debug(paraindent) { // para indent
writeln(line);
}
type["para"] = State.on;
- an_object["obj"] ~= line ~= "\n";
+ an_object["nugget"] ~= line ~= "\n"; // is newline needed?
indent["hang_position"] = to!string(m.captures[1]);
indent["base_position"] = "0";
bullet = false;
@@ -2370,7 +2348,7 @@ auto _para_match_(
writeln(line);
}
type["para"] = State.on;
- an_object["obj"] ~= line;
+ an_object["nugget"] ~= line;
indent=[
"hang_position" : "0",
"base_position" : "0",
@@ -2381,7 +2359,7 @@ auto _para_match_(
writeln(line);
}
type["para"] = State.on;
- an_object["obj"] ~= line;
+ an_object["nugget"] ~= line;
indent=[
"hang_position" : to!string(m.captures[1]),
"base_position" : to!string(m.captures[2]),
@@ -2392,16 +2370,15 @@ auto _para_match_(
writeln(line);
}
type["para"] = State.on;
- an_object["obj"] ~= line;
+ an_object["nugget"] ~= line;
indent=[
"hang_position" : to!string(m.captures[1]),
"base_position" : "0",
];
bullet = true;
} else {
- // !line.empty
type["para"] = State.on;
- an_object["obj"] ~= line;
+ an_object["nugget"] ~= line;
indent=[
"hang_position" : "0",
"base_position" : "0",
@@ -2440,7 +2417,6 @@ struct OCNemitter {
#+name: ao_emitters_obj_inline_markup_munge
#+BEGIN_SRC d
struct ObjInlineMarkupMunge {
-// struct ObjInlineMarkupMunge : AssertObjInlineMarkup {
string[string] obj_txt;
int n_foot, n_foot_reg, n_foot_sp_asterisk, n_foot_sp_plus;
string obj_txt_out, tail, note;
@@ -2492,11 +2468,6 @@ struct ObjInlineMarkupMunge {
(mkup.en_a_o ~ to!string(n_foot))
);
tail = m.post;
- // if (!empty(m.post)) {
- // tail = m.post;
- // } else {
- // tail = "";
- // }
}
} else {
obj_txt_out = obj_txt_in;
@@ -2550,22 +2521,6 @@ struct ObjInlineMarkupMunge {
invariant() {
}
/+ revisit +/
- // string header_make(string obj_txt_in)
- // in { }
- // body {
- // obj_txt["munge"]=obj_txt_in;
- // return obj_txt["munge"];
- // }
- // invariant() {
- // }
- // string header_meta(string obj_txt_in)
- // in { }
- // body {
- // obj_txt["munge"]=obj_txt_in;
- // return obj_txt["munge"];
- // }
- // invariant() {
- // }
string code(string obj_txt_in)
in { }
body {
@@ -2648,10 +2603,10 @@ struct ObjInlineMarkup {
)
in { }
body {
- obj_txt["munge"]=obj_["obj"].dup;
+ obj_txt["munge"]=obj_["nugget"].dup;
obj_txt["munge"]=(match(obj_["is"], ctRegex!(`verse|code`)))
- ? obj_txt["munge"]
- : strip(obj_txt["munge"]);
+ ? obj_txt["munge"]
+ : strip(obj_txt["munge"]);
static __gshared string[] anchor_tags_ = [];
switch (obj_["is"]) {
case "heading":
@@ -2728,7 +2683,7 @@ struct ObjInlineMarkup {
)
in { }
body {
- char[] heading_toc_ = to!(char[])(obj_["obj"].dup.strip);
+ char[] heading_toc_ = to!(char[])(obj_["nugget"].dup.strip);
heading_toc_ = _clean_heading_toc_(heading_toc_);
auto attrib="";
string toc_txt_;
@@ -2931,8 +2886,6 @@ private:
heading_num_3 = 0;
} else if (heading_num_top_level == (to!uint(obj_["lev_markup_number"]) - 3)) {
heading_num_3 ++;
- } else {
- //
}
if (heading_num_3 > 0) {
heading_number_auto_composite =
@@ -3027,7 +2980,6 @@ private:
txt_in = "1~copyright Copyright";
txt_out ="1~copyright Copyright";
assert(_make_segment_anchor_tags_if_none_provided(txt_in, txt_lev) == txt_out);
- // assert(ObjInlineMarkup._make_segment_anchor_tags_if_none_provided(txt_in, txt_lev) == txt_out);
txt_in = "1~ 6. Writing Copyright Licenses";
txt_out ="1~s6 6. Writing Copyright Licenses";
@@ -3099,7 +3051,7 @@ struct ObjAttributes {
_obj_attrib["json"] ="{";
switch (obj_is_) {
case "heading":
- _obj_attrib["json"] ~= _heading(obj_raw); //
+ _obj_attrib["json"] ~= _heading(obj_raw);
break;
case "para":
_obj_attrib["json"] ~= _para_and_blocks(obj_raw)
@@ -3136,9 +3088,7 @@ struct ObjAttributes {
_obj_attrib["json"]=_set_additional_values_parse_as_json(_obj_attrib["json"], obj_is_, _node);
debug(structattrib) {
if (oa_j["is"].str() == "heading") {
- // writeln(__LINE__);
writeln(_obj_attrib["json"]);
- // writeln(_node);
writeln(
"is: ", oa_j["is"].str(),
"; obj_cite_number: ", oa_j["obj_cite_number"].integer()
@@ -3472,7 +3422,6 @@ struct BookIndexReportIndent {
bookindex_unordered_hashes[mainkey][subkey]
));
}
- // bookindex_the[mkn][mainkey][skn][subkey] ~= (bookindex_unordered_hashes[mainkey][subkey]);
++skn;
}
++mkn;
@@ -3533,7 +3482,8 @@ struct BookIndexReportSection {
string segment_object_belongs_to,
) {
string type;
- string lev, lev_markup_number, lev_collapsed_number;
+ string lev;
+ int lev_markup_number, lev_collapsed_number;
string attrib;
string[string] indent;
auto set_abstract_object = ObjectAbstractSet();
@@ -3541,12 +3491,10 @@ struct BookIndexReportSection {
bookindex_unordered_hashes.byKey.array.sort().release;
string bi_tmp_seg, bi_tmp_scroll;
ObjComposite[][string] bookindex_section;
- // writeln(mainkeys.length);
- // B~ Book Index
attrib="";
lev="B";
- lev_markup_number="1";
- lev_collapsed_number="1";
+ lev_markup_number=1;
+ lev_collapsed_number=1;
bookindex_section["scroll"] ~=
set_abstract_object.contents_heading(
"Book Index",
@@ -3569,11 +3517,10 @@ struct BookIndexReportSection {
);
++obj_cite_number;
++mkn;
- // 1~ Index
attrib="";
lev="1";
- lev_markup_number="4";
- lev_collapsed_number="2";
+ lev_markup_number=4;
+ lev_collapsed_number=2;
bookindex_section["scroll"] ~=
set_abstract_object.contents_heading(
"Index",
@@ -3599,7 +3546,6 @@ struct BookIndexReportSection {
foreach (mainkey; mainkeys) {
bi_tmp_scroll = "!{" ~ mainkey ~ "}! ";
bi_tmp_seg = "!{" ~ mainkey ~ "}! ";
- // bi_tmp = "_0_1 !{" ~ mainkey ~ "}! ";
foreach (ref_; bookindex_unordered_hashes[mainkey]["_a"]) {
auto go = replaceAll(ref_, rgx.book_index_go, "$1");
bi_tmp_scroll ~= (" {" ~ ref_ ~ "}#" ~ go ~ ", ");
@@ -3634,13 +3580,6 @@ struct BookIndexReportSection {
"hang_position" : "0",
"base_position" : "1",
];
- // bookindex_section ~=
- // set_abstract_object.contents_para(
- // obj,
- // obj_cite_number,
- // indent,
- // false
- // );
bookindex_section["scroll"] ~=
set_abstract_object.contents_para(
type,
@@ -3715,7 +3654,6 @@ struct NotesSection {
writeln(
"{^{", m.captures[1], ".}^}../", segment_object_belongs_to, ".fn_suffix#noteref_\n ", m.captures[1], " ",
m.captures[2]); // sometimes need segment name (segmented html & epub)
- // writeln("{^{", m.captures[1], ".}^}#", contents_am[counter]["obj_cite_number"], " ", m.captures[2]);
}
// TODO NEXT you need anchor for segments at this point ->
object_notes["seg"] ~=
@@ -3765,12 +3703,10 @@ struct NotesSection {
auto set_abstract_object = ObjectAbstractSet();
ObjComposite[][string] the_endnotes_section;
auto endnotes_ = gathered_notes();
- // auto endnotes_ = (split(object_notes, rgx.break_string))[0..$-1];
string type;
string lev, lev_markup_number, lev_collapsed_number;
string attrib;
string[string] indent;
- // B~ Endnotes
attrib="";
lev="B";
lev_markup_number="1";
@@ -3797,7 +3733,6 @@ struct NotesSection {
);
++obj_cite_number;
++mkn;
- // 1~ Endnotes
attrib="";
lev="1";
lev_markup_number="4";
@@ -3826,13 +3761,6 @@ struct NotesSection {
++mkn;
foreach (endnote; endnotes_["seg"]) {
attrib="";
- // endnotes ~=
- // set_abstract_object.contents_para(
- // obj,
- // obj_cite_number,
- // indent,
- // false
- // );
the_endnotes_section["seg"] ~=
set_abstract_object.contents_endnote(endnote);
}
@@ -3881,7 +3809,6 @@ struct Bibliography {
writeln("json: ", bib_arr_json.length);
writeln("unsorted: ", biblio_unsorted.length);
writeln("sorted: ", biblio_sorted__.length);
- // writeln("0: ", biblio_sorted__[0]);
int counter;
int[7] x;
while (counter < x.length) {
@@ -3942,7 +3869,6 @@ struct Bibliography {
foreach (j; biblio_sorted_) {
if (!empty(j["fulltitle"].str)) {
writeln(j["sortby_deemed_author_year_title"]);
- // writeln(j["deemed_author"], " (", j["author"], ") ", j["fulltitle"]);
}
}
}
@@ -4002,11 +3928,6 @@ struct NodeStructureMetadata {
assert(to!int(obj_cite_number_) >= 0);
}
body {
- // scope(failure) {
- // writeln(__FILE__, ":", __LINE__, " failed here:");
- // writeln(" is : ", is_);
- // writeln(" node: ", _node);
- // }
assert(is_ != "heading"); // should not be necessary
assert(to!int(obj_cite_number_) >= 0); // should not be necessary
int obj_cite_number=to!int(obj_cite_number_);
@@ -4071,20 +3992,13 @@ struct NodeStructureMetadata {
match(lev_markup_number, rgx.levels_numbered),
("not a valid heading level: " ~ lev_markup_number ~ " at " ~ to!string(obj_cite_number_))
);
- // assert(to!int(obj_cite_number_) >= 0);
if (match(lev_markup_number, rgx.levels_numbered)) {
if (to!int(lev_markup_number) == 0) {
assert(to!int(obj_cite_number_) == 1);
- // writeln(lev_markup_number);
}
}
}
body {
- // scope(failure) {
- // writeln(__FILE__, ":", __LINE__, " failed here:");
- // writeln(" is : ", is_);
- // writeln(" node: ", _node);
- // }
auto rgx = Rgx();
int obj_cite_number = to!int(obj_cite_number_);
switch (lev_markup_number) { // switch (to!string(lv)) {
@@ -4165,15 +4079,6 @@ struct NodeStructureMetadata {
p_["obj_cite_number"] = lv6;
break;
default:
- // if (lv7 > State.off) {
- // p_["lev_markup_number"] = 7; p_["obj_cite_number"] = lv7;
- // } else if (lv6 > State.off) {
- // p_["lev_markup_number"] = 6; p_["obj_cite_number"] = lv6;
- // } else if (lv5 > State.off) {
- // p_["lev_markup_number"] = 5; p_["obj_cite_number"] = lv5;
- // } else {
- // p_["lev_markup_number"] = 4; p_["obj_cite_number"] = lv4;
- // }
break;
}
_node=("{ " ~
@@ -4229,9 +4134,6 @@ struct NodeStructureMetadata {
} else if (j["lev_markup_number"].integer == DocStructMarkupHeading.h_text_4) {
assert(j["parent_lev_markup_number"].integer == DocStructMarkupHeading.h_text_3);
} else if (j["lev_markup_number"].integer == DocStructMarkupHeading.h_text_5) {
- // writeln(j["parent_lev_markup_number"].integer);
- // assert(j["parent_lev_markup_number"].integer >= 4);
- // assert(j["parent_lev_markup_number"].integer <= 7);
}
}
return _node;
@@ -4339,7 +4241,7 @@ auto assertions_doc_structure(string[string] an_object, int[string] lv) {
assert(lv["h5"] == State.off);
assert(lv["h6"] == State.off);
assert(lv["h7"] == State.off);
- } else { // (lv["h0"] > State.off)
+ } else { // (lv["h0"] > State.off)
assert(lv["h0"] == State.off,"error should not enter level A a second time");
}
break;
@@ -4348,9 +4250,9 @@ auto assertions_doc_structure(string[string] an_object, int[string] lv) {
assert(lv["h0"] > State.off);
assert(lv["h2"] == State.off);
assert(lv["h3"] == State.off);
- } else { // (lv["h1"] > State.off)
+ } else { // (lv["h1"] > State.off)
assert(lv["h0"] > State.off);
- assert(lv["h1"] > State.off); //
+ assert(lv["h1"] > State.off);
}
break;
case "C":
@@ -4358,10 +4260,10 @@ auto assertions_doc_structure(string[string] an_object, int[string] lv) {
assert(lv["h0"] > State.off);
assert(lv["h1"] > State.off);
assert(lv["h3"] == State.off);
- } else { // (lv["h2"] > State.off)
+ } else { // (lv["h2"] > State.off)
assert(lv["h0"] > State.off);
assert(lv["h1"] > State.off);
- assert(lv["h2"] > State.off); //
+ assert(lv["h2"] > State.off);
}
break;
case "D":
@@ -4369,7 +4271,7 @@ auto assertions_doc_structure(string[string] an_object, int[string] lv) {
assert(lv["h0"] > State.off);
assert(lv["h1"] > State.off);
assert(lv["h2"] > State.off);
- } else { // (lv["h3"] > State.off)
+ } else { // (lv["h3"] > State.off)
assert(lv["h0"] > State.off);
assert(lv["h1"] > State.off);
assert(lv["h2"] > State.off);
@@ -4379,19 +4281,19 @@ auto assertions_doc_structure(string[string] an_object, int[string] lv) {
case "1":
if (lv["h4"] == State.off) {
assert(lv["h0"] > State.off);
- } else { // (lv["h4"] > State.off)
+ } else { // (lv["h4"] > State.off)
assert(lv["h0"] > State.off);
- assert(lv["h4"] > State.off); //
+ assert(lv["h4"] > State.off);
}
break;
case "2":
if (lv["h5"] == State.off) {
assert(lv["h0"] > State.off);
assert(lv["h4"] > State.off);
- } else { // (lv["h5"] > State.off)
+ } else { // (lv["h5"] > State.off)
assert(lv["h0"] > State.off);
assert(lv["h4"] > State.off);
- assert(lv["h5"] > State.off); //
+ assert(lv["h5"] > State.off);
}
break;
case "3":
@@ -4399,11 +4301,11 @@ auto assertions_doc_structure(string[string] an_object, int[string] lv) {
assert(lv["h0"] > State.off);
assert(lv["h4"] > State.off);
assert(lv["h5"] > State.off);
- } else { // (lv["h6"] > State.off)
+ } else { // (lv["h6"] > State.off)
assert(lv["h0"] > State.off);
assert(lv["h4"] > State.off);
assert(lv["h5"] > State.off);
- assert(lv["h6"] > State.off); //
+ assert(lv["h6"] > State.off);
}
break;
case "4":
@@ -4412,12 +4314,12 @@ auto assertions_doc_structure(string[string] an_object, int[string] lv) {
assert(lv["h4"] > State.off);
assert(lv["h5"] > State.off);
assert(lv["h6"] > State.off);
- } else { // (lv["h7"] > State.off)
+ } else { // (lv["h7"] > State.off)
assert(lv["h0"] > State.off);
assert(lv["h4"] > State.off);
assert(lv["h5"] > State.off);
assert(lv["h6"] > State.off);
- assert(lv["h7"] > State.off); //
+ assert(lv["h7"] > State.off);
}
break;
default:
@@ -4516,7 +4418,6 @@ struct Node {
#+name: ao_structs_init
#+BEGIN_SRC d
struct ObjComposite {
- // size_t id;
string use = "";
string of = "";
string is_a = "";
diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org
index fa3c88d..91630c0 100644
--- a/org/ao_conf_make_meta.org
+++ b/org/ao_conf_make_meta.org
@@ -185,29 +185,14 @@ private auto documentMakeSDLangToAAmake(Tag document_make_sdlang) {
/+ TODO
stuff to fix
+/
- // 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)) {
- // 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);
- // }
}
+/
- // debug(headersdlang) {
- // writeln(dochead_make);
- // }
return dochead_make;
}
#+END_SRC
* C.a. header native :header:native:
-// mixin SiSUheader;
-// auto set_header = HeaderDocMetadataAndMakeNativeToAA(); // reintroduce
-
** native header document metadata in associative array :aa:
#+name: ao_markup_header_extract_native
@@ -382,15 +367,6 @@ body {
case "links":
destroy(hm);
destroy(hs);
- // if (match(hs, rgx.native_subhead_links)) {
- // if (dochead_meta[hm][hs]) {
- // dochead_meta[hm][hs] = to!string(s.captures[2]);
- // }
- // } else {
- // writeln("not a valid header type:", hm, ":", hs);
- // destroy(hm);
- // destroy(hs);
- // }
break;
default:
break;
@@ -425,7 +401,7 @@ private auto native_header_extract(
type["header_make"] = State.on;
type["header_meta"] = State.off;
++line_occur["header_make"];
- an_object["obj"] ~= line ~= "\n";
+ an_object["nugget"] ~= line ~= "\n";
} else if (matchFirst(line, rgx.native_header)) { /+ matched header_metadata +/
/+ (generic header match and not previously caught by header_make) +/
debug(header1) { /+ writeln(line); +/ }
@@ -433,20 +409,20 @@ private auto native_header_extract(
type["header_make"] = State.off;
type["header_meta"] = State.on;
++line_occur["header_meta"];
- an_object["obj"] ~= line ~= "\n";
+ an_object["nugget"] ~= line ~= "\n";
} else if (type["header_make"] == State.on
&& (line_occur["header_make"] > State.off)) { /+ header_make flag set +/
if (matchFirst(line, rgx.native_header_sub)) { /+ sub-header +/
debug(header1) { /+ writeln(line); +/ }
++line_occur["header_make"];
- an_object["obj"] ~= line ~= "\n";
+ an_object["nugget"] ~= line ~= "\n";
}
} else if (type["header_meta"] == State.on
&& (line_occur["header_meta"] > State.off)) { /+ header_metadata flag set +/
if (matchFirst(line, rgx.native_header_sub)) { /+ sub-header +/
debug(header1) { /+ writeln(line); +/ }
++line_occur["header_meta"];
- an_object["obj"] ~= line ~= "\n";
+ an_object["nugget"] ~= line ~= "\n";
}
}
return an_object;
@@ -462,13 +438,10 @@ auto header_reset_states_common(
ref string[string] an_object,
ref int[string] type
) {
- // line_occur["header"] = State.off;
line_occur["header_make"] = State.off;
line_occur["header_meta"] = State.off;
type["header"] = State.off;
- // type["header_make"] = State.off;
- // type["header_meta"] = State.off;
- an_object.remove("obj");
+ an_object.remove("nugget");
an_object.remove("is");
an_object.remove("attrib");
}
@@ -496,11 +469,8 @@ private auto headerNativeToAA(in char[] src_header) {
if (auto m = matchFirst(header_line, rgx.comment)) {
/+ matched comment +/
debug(comment) {
- // tell_l("blue", header_line);
}
header_reset_states_common(line_occur, an_object, type);
- // type["header_make"] = State.off;
- // type["header_meta"] = State.off;
} else if ((matchFirst(header_line, rgx.native_header))
|| (type["header_make"] == State.on
&& (line_occur["header_make"] > State.off))
@@ -509,7 +479,7 @@ private auto headerNativeToAA(in char[] src_header) {
if (header_line.length == 0) {
/+ header_make instructions (current line empty) +/
auto dochead_metadata_and_make =
- set_header.header_metadata_and_make_aa(strip(an_object["obj"]), dochead_meta, dochead_make);
+ set_header.header_metadata_and_make_aa(strip(an_object["nugget"]), dochead_meta, dochead_make);
static assert(!isTypeTuple!(dochead_metadata_and_make));
dochead_meta = dochead_metadata_and_make[0];
dochead_make = dochead_metadata_and_make[1];
@@ -522,8 +492,6 @@ private auto headerNativeToAA(in char[] src_header) {
} else {
an_object = native_header_extract(header_line, line_occur, an_object, type);
}
- } else {
- // writeln(__LINE__);
}
}
auto t = tuple(
@@ -579,7 +547,6 @@ private auto headerSDLangGet(in char[] src_header) {
foreach(header_line; source_header_arr) {
if (!match(header_line, rgx.comments)) {
header_clean ~= header_line ~ "\n";
- // writeln(header_line);
}
}
/+ get sdlang tags +/
diff --git a/org/ao_defaults.org b/org/ao_defaults.org
index 2677f78..b7a59a1 100644
--- a/org/ao_defaults.org
+++ b/org/ao_defaults.org
@@ -431,78 +431,8 @@ template SiSUbiblio() {
#+BEGIN_SRC d
template InternalMarkup() {
struct InlineMarkup {
- // endnote en_a_o: '~{'; en_a_c: '}~'
- auto en_a_o = "【"; auto en_a_c = "】";
- // endnote en_b_o: '~['; en_b_c: ']~'
- auto en_b_o = "〖"; auto en_b_c = "〗";
- // auto segname_prefix_auto_num_extract = "c";
- // auto segname_prefix_auto_num_provide = "s";
- // auto segname_prefix_auto_num_other = "x";
- // auto obj_cite_number_id_char = ""; //'o'; now as before; remove for html5
- // auto note = "note_";
- // auto note_ref = "noteref_";
- // auto note_astx = "note_astx_";
- // auto note_ref_astx = "noteref_astx_";
- // auto note_plus = "note_plus_";
- // auto note_ref_plus = "noteref_plus_";
- // auto meta_o = "〔@"; auto meta_c = "〕";
- // auto lv_o_0 = 0;
- // auto lv_o_1 = 1;
- // auto lv_o_2 = 2;
- // auto lv_o_3 = 3;
- // auto lv_o_4 = 4;
- // auto lv_o_5 = 5;
- // auto lv_o_6 = 6;
- // auto lv_o_7 = 7;
- // auto lv_o_8 = 8;
- // auto lv_o_9 = 9;
- // auto lv_o = "〔"; auto lv_c = "〕";
- // auto bl_o = "〔"; auto bl_c = "〕"; // block text mark
- // auto gr_o = "〔"; auto gr_c = "〕"; // group text mark #REPLACE & RETIRE
- // auto id_o = "〔"; auto id_c = "〕"; // object id mark
- // auto tc_o = "『"; auto tc_c = "』"; // table row mark #Mx[:tc_c]="』\n"
- // auto tc_p = "┆'"
- // auto pa_o = "〔"; auto pa_c = "〕"; // affects paragraph mark
- // auto mk_o = "〔"; auto mk_c = "〕"; // generic mark
- // auto gl_o = "〔"; auto gl_c = "〕"; // glyph
- // auto fa_o = "〔"; auto fa_o_c = "¤"; auto fa_c_o = "¤"; auto fa_c = "〕";
- // auto idx_o = "▩"; auto idx_c = "▩";
- // auto nbsp = "░"; // '▭ '
- // auto br_line = "╱"; // lB ▌ 9612 ┘ ¶
- // auto br_nl = "╲"; // lB ▌ 』 ┘
- // auto br_paragraph = "█"; // FB █ 9608 # PP ∥ 8741 #▐ #'┘' #'¶' #FB █ 9608 lB ▌ 9612 RB ▐ 9616
- // auto br_obj = "break_obj";
- // auto br_page_line = "▭";
- // auto br_page = "┼";
- // auto br_page_new = "╋";
- // auto lnk_o = "⌠"; lnk_c = "⌡"; // '⌈' '⌋' '⌠' '⌡' #Mx[:lnk_o= '◁'; Mx[:lnk_c= '▷' #‹ ›
- // auto url_o = "◘"; auto url_c = "◙";
- // auto rel_o = "⌈"; auto rel_c = "⌋";
- // auto tag_o = "⌊"; auto tag_c = "⌉";
- // auto sm_set_o = "◢"; auto sm_set_c = "◣";
- // auto sm_subset_o = "◢"; auto sm_subset_c = "◣";
- // auto vline = "┆"; // ¦ |
- // auto src_bold_o = "!{"; auto src_bold_c = "}!";
- // auto src_italics_o = "/{"; auto src_italics_c = "}/";
- // auto src_underscore_o = "_{"; auto src_underscore_c = "}_";
- // auto src_cite_o = ""{"; auto src_cite_c = "}"";
- // auto src_insert_o = "+{"; auto src_insert_c = "}+";
- // auto src_strike_o = "-{"; auto src_strike_c = "}-";
- // auto src_superscript_o = "^{"; auto src_superscript_c = "}^";
- // auto src_subscript_o = ";{"; auto src_subscript_c = "}'"
- // auto src_hilite_o = "*{"; auto src_hilite_c = "}*";
- // auto src_monospace_o = "#{"; auto src_monospace_c = "}#";
- // auto srcrgx_bold_o = "\\!\\{"; auto srcrgx_bold_c = "\\}\\!";
- // auto srcrgx_italics_o = "\\/\\{"; auto srcrgx_italics_c = "\\}\\/";
- // auto srcrgx_underscore_o = "_\\{"; auto srcrgx_underscore_c = "\\}_";
- // auto srcrgx_cite_o = "\"\\{"; auto srcrgx_cite_c = "\\}\"";
- // auto srcrgx_insert_o = "\\+\\{"; auto srcrgx_insert_c = "\\}\\+";
- // auto srcrgx_strike_o = "\\-\\{"; auto srcrgx_strike_c = "\\}\\-";
- // auto srcrgx_superscript_o = "\\^\\{"; auto srcrgx_superscript_c = "\\}\\^";
- // auto srcrgx_subscript_o = ",\\{"; auto srcrgx_subscript_c = "\\},";
- // auto srcrgx_hilite_o = "\\*\\{"; auto srcrgx_hilite_c = "\\}\\*";
- // auto srcrgx_monospace_o = "\\#\\{"; auto srcrgx_monospace_c = "\\}\\#";
- // ⊹
+ auto en_a_o = "【"; auto en_a_c = "】"; // endnote en_a_o: '~{'; en_a_c: '}~'
+ auto en_b_o = "〖"; auto en_b_c = "〗"; // endnote en_b_o: '~['; en_b_c: ']~'
}
}
#+END_SRC
@@ -521,12 +451,10 @@ http://dlang.org/phobos/std_regex.html
/+ misc +/
static flag_action = ctRegex!(`^(--[a-z][a-z0-9-]+)$`);
static flag_action_str = ctRegex!(` (--[a-z][a-z0-9-]+)`);
-// static arr_delimiter = ctRegex!(`\s*[;]\s*`);
static within_quotes = ctRegex!(`"(.+?)"`);
static make_heading_delimiter = ctRegex!(`[;][ ]*`);
static arr_delimiter = ctRegex!(`[ ]*[;][ ]*`);
static name_delimiter = ctRegex!(`^([^,]+)[ ]*,[ ]+(.+?)$`);
-// static name_delimiter = ctRegex!(`^(.+?)[ ]*,[ ]*(.+?)$`);
static book_index_go = ctRegex!("([0-9]+)(?:-[0-9]+)?");
static trailing_comma = ctRegex!(",[ ]*$");
static trailing_linebreak = ctRegex!(",[ ]{1,2}\\\\\\\\\n[ ]{4}$","m");
@@ -552,10 +480,7 @@ static src_fn_text = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<fil
static src_fn_insert = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ssi)$`);
static src_fn_find_inserts = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[im])$`);
static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`);
-// static insert_ssi_or_sst_fn = ctRegex!(`^<<\s*[a-zA-Z0-9._-]+[.]ss[ti]`);
-// static ssm_fn = ctRegex!(`^[a-zA-Z0-9._-]+[.]ssm$`);
/+ insert markup file +/
-// static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*([a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`);
#+END_SRC
** comments :comment:
@@ -580,7 +505,6 @@ static native_header_meta =
ctRegex!(`^@(?:creator|title|rights|date|original|classify|identifier|notes|publisher|links):(?:\s|$)`);
static native_header_main = ctRegex!(`^@(?P<header>[a-z_]+):\s*(?P<content>.*)`, "m");
static native_header_sub = ctRegex!(`^[ ]*:(?P<subheader>[a-z_]+):\s+(?P<content>.+)`, "m");
-// static native_header_sub = ctRegex!(`^[ ]+:([a-z_]+):\s`);
static native_header_meta_title = ctRegex!(`^@title:\s`, "m");
static variable_doc_title = ctRegex!(`@title`);
static variable_doc_author = ctRegex!(`@author|@creator`);
@@ -634,7 +558,6 @@ static para_attribs = ctRegex!(`^_(([0-9])(_([0-9]))?|_([1-9])?[*]) `);
#+BEGIN_SRC d
/+ blocked markup +/
static block_open = ctRegex!("^((code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)[{].*?$)|^`{3} (code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)");
-// static block_open_less_code = ctRegex!("^(((poem|group|block|quote|table)[{].*?$)|`{3} (poem|group|block|quote|table))");
static block_poem_open = ctRegex!("^((poem[{].*?$)|`{3} poem)");
#+END_SRC
@@ -644,7 +567,6 @@ static block_poem_open = ctRegex!("^((poem[{].*?$)|`{3} poem)");
#+BEGIN_SRC d
/+ blocked markup tics +/
static block_tic_open = ctRegex!("^`{3} (code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)");
-// static block_tic_open_less_code = ctRegex!("^`{3} (poem|group|block|quote|table)");
static block_tic_code_open = ctRegex!("^`{3} (code)([.][a-z][0-9a-z_]+)?");
static block_tic_poem_open = ctRegex!("^`{3} (poem)");
static block_tic_group_open = ctRegex!("^`{3} (group)");
@@ -660,7 +582,6 @@ static block_tic_close = ctRegex!("^(`{3})$","m");
#+BEGIN_SRC d
/+ blocked markup curly +/
static block_curly_open = ctRegex!(`^((code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)[{].*?$)`);
-// static block_curly_open_less_code = ctRegex!(`^((poem|group|block|quote|table)[{].*?$)`);
static block_curly_code_open = ctRegex!(`^(code([.][a-z][0-9a-z_]+)?[{].*?$)`);
static block_curly_code_close = ctRegex!(`^([}]code)`);
static block_curly_poem_open = ctRegex!(`^(poem[{].*?$)`);
@@ -700,7 +621,6 @@ static inline_notes_al = ctRegex!(`【(?:[*+]\s+|\s*)(.+?)
static inline_notes_al_gen = ctRegex!(`【.+?】`, "m");
static inline_notes_curly_gen = ctRegex!(`~\{.+?\}~`, "m");
static inline_notes_curly = ctRegex!(`~\{\s*(.+?)\}~`, "mg");
-// static inline_notes_curly = ctRegex!(`~\{(?:[*+]\s+|\s*)(.+?)\}~`, "mg");
static inline_al_delimiter_open_regular = ctRegex!(`【`, "m");
static inline_al_delimiter_close_regular = ctRegex!(`】`, "m");
static inline_al_delimiter_open_and_close_regular = ctRegex!(`【|】`, "m");
@@ -712,19 +632,11 @@ static inline_curly_delimiter_open_regular = ctRegex!(`~\{\s*`, "m")
static inline_curly_delimiter_close_regular = ctRegex!(`\s*\}~`, "m");
static inline_curly_delimiter_open_and_close_regular = ctRegex!(`~\{\s*|\s*\}~`, "m");
static inline_notes_delimiter_curly_regular = ctRegex!(`~\{[ ]*(.+?)\}~`, "m");
-// static inline_notes_curly_regular = ctRegex!(`(?:[~][{][ ]*)(.+?)(?:[}][~])`, "m");
-// static inline_notes_curly_regular = ctRegex!(`~\{\s*(.+?)\}~`, "m");
-// static inline_notes_curly = ctRegex!(`~\{(?:[*+]\s+|\s*)(.+?)\}~`, "mg");
static inline_notes_curly_sp = ctRegex!(`~\{[*+]+\s+(.+?)\}~`, "m");
static inline_notes_curly_sp_asterisk = ctRegex!(`~\{[*]+\s+(.+?)\}~`, "m");
static inline_notes_curly_sp_plus = ctRegex!(`~\{[+]+\s+(.+?)\}~`, "m");
-// static inline_text_and_note_curly = ctRegex!(`(.+?)~\{(?:[*+]\s+|\s*)(.+?)\}~`, "mg");
static inline_text_and_note_al = ctRegex!(`(?P<text>.+?)【(?:[*+ ]*)(?P<note>.+?)】`, "mg");
static inline_text_and_note_curly = ctRegex!(`(?P<text>.+?)(?:(?:[~])[{][*+ ]*)(?P<note>.+?)(?:[}][~])`, "mg");
-// static inline_text_and_note_curly = ctRegex!(`(?P<text>.+?)~\{(?:[*+]\s+|\s*)(?P<note>.+?)\}~`, "mg");
-// static inline_text_and_note_curly_sp = ctRegex!(`(.+?)~\{[*+]+\s+(.+?)\}~`, "mg");
-// static inline_text_and_note_curly_sp_asterisk = ctRegex!(`(.+?)~\{[*]+\s+(.+?)\}~`, "mg");
-// static inline_text_and_note_curly_sp_plus = ctRegex!(`(.+?)~\{[+]+\s+(.+?)\}~`, "mg");
static inline_note_curly_delimiters = ctRegex!(`(~\{[*+]?\s*)(.+?)(\}~)`, "mg");
static inline_notes_square = ctRegex!(`~\[\s*(.+?)\]~`, "mg");
static inline_text_and_note_square_sp = ctRegex!(`(.+?)~\[[*+]+\s+(.+?)\]~`, "mg");
@@ -761,7 +673,6 @@ static obj_cite_number_off_all = ctRegex!(`[~-]#$`, "m");
static obj_cite_number_off_block = ctRegex!(`^--~#$`);
static obj_cite_number_off_block_dh = ctRegex!(`^---#$`);
static obj_cite_number_off_block_close = ctRegex!(`^--\+#$`);
-// static auto_obj_cite_number_ignore = ctRegex!(`^[+~*$-]{3,}$`); // reminder
static obj_cite_number_block_marks = ctRegex!(`^--[+~-]#$`);
#+END_SRC
@@ -779,12 +690,10 @@ static skip_from_regular_parse = ctRegex!(`^(--[+~-]#|-[\\]{2}-|=[.\\]{2}=)$`
#+BEGIN_SRC d
/+ line & page breaks +/
static break_line_within_object = ctRegex!(`[\\]{2}( |$)`);
-// static break_line_break_within_object = ctRegex!(`( |^)[\\]{2}( |$)`);
static break_page = ctRegex!(`^-[\\]{2}-$`);
static break_page_new = ctRegex!(`^=[\\]{2}=$`);
static break_page_line_across = ctRegex!(`^=[.]{2}=$`);
static break_string = ctRegex!(`』`);
-// ancestry, parent
static parent = ctRegex!(`([0-7]):([0-9]+)`);
#+END_SRC
@@ -803,7 +712,6 @@ static tailing_comma = ctRegex!(`,$`, "m");
/+ biblio tags +/
static biblio_tags = ctRegex!(`^(is|au|author_raw|author|author_arr|editor_raw|ed|editor_arr|ti|title|subtitle|fulltitle|lng|language|trans|src|jo|journal|in|vol|volume|edn|edition|yr|year|pl|place|pb|pub|publisher|url|pg|pages|note|short_name|id):\s+(.+)`);
static biblio_abbreviations = ctRegex!(`^(au|ed|ti|lng|jo|vol|edn|yr|pl|pb|pub|pg|pgs|sn)$`);
-// static biblio_tags = ctRegex!(`^(is|author_raw|author|author_arr|editor_raw|editor_arr|title|subtitle|fulltitle|language|trans|src|journal|in|volume|edition|year|place|publisher|url|pages|note|short_name|id):\s+(.+)`);
#+END_SRC
** bookindex split :bookindex:split:
diff --git a/org/ao_output_debugs.org b/org/ao_output_debugs.org
index 7cbe476..4b5af0c 100644
--- a/org/ao_output_debugs.org
+++ b/org/ao_output_debugs.org
@@ -20,7 +20,6 @@
#+name: book_index_sorted_report
#+BEGIN_SRC d
struct BookIndexReport {
-// class BookIndexReport : AssertBookIndexReport {
int mkn, skn;
auto bookindex_report_sorted(
string[][string][string] bookindex_unordered_hashes
@@ -38,12 +37,10 @@ struct BookIndexReport {
to!string(bookindex_unordered_hashes[mainkey][subkey])
);
}
- // bookindex_the[mkn][mainkey][skn][subkey] ~= (bookindex_unordered_hashes[mainkey][subkey]);
++skn;
}
++mkn;
}
- // return bookindex_the;
}
}
#+END_SRC
@@ -334,7 +331,6 @@ debug(anchor) {
obj.heading_attrib.lev,
obj.obj_cite_number,
obj.anchor_tags,
- // "[", obj["is"], "] ",
obj.object
);
}
@@ -352,49 +348,36 @@ debug(heading) { // heading
if (o.is_a == "heading") {
switch (o.heading_attrib.lev_markup_number) {
case 0:
- // case to!string(DocStructMarkupHeading.h_sect_A):
spc="";
break;
case 1:
- // case to!string(DocStructMarkupHeading.h_sect_B):
spc=" ";
break;
case 2:
- // case to!string(DocStructMarkupHeading.h_sect_C):
spc=" ";
break;
case 3:
- // case to!string(DocStructMarkupHeading.h_sect_D):
spc=" ";
break;
case 4:
- // case to!string(DocStructMarkupHeading.h_text_1):
spc=" ";
break;
case 5:
- // case to!string(DocStructMarkupHeading.h_text_2):
spc=" ";
break;
case 6:
- // case to!string(DocStructMarkupHeading.h_text_3):
spc=" ";
break;
case 7:
- // case to!string(DocStructMarkupHeading.h_text_4):
spc=" ";
break;
case 8:
- // case to!string(DocStructMarkupHeading.h_text_5):
spc=" ";
break;
default:
spc="";
break;
}
- // writeln(
- // spc, "* ", " ",
- // o
- // );
writefln(
"%s* %s\n (markup level: %s; collapsed level: %s)",
spc,
@@ -424,7 +407,6 @@ debug(headings) {
"%s~ [%s] %s",
obj.heading_attrib.lev,
obj.obj_cite_number,
- // "[", obj["is"], "] ",
obj.object
);
}
diff --git a/org/ao_read_source_files.org b/org/ao_read_source_files.org
index 66b91a8..77c3266 100644
--- a/org/ao_read_source_files.org
+++ b/org/ao_read_source_files.org
@@ -20,10 +20,6 @@
#+name: ao_config_file_in
#+BEGIN_SRC d
final private string readInConfigFile(string conf_sdl) {
- // enforce(
- // exists(fn_src)!=0,
- // "file not found"
- // );
string[] possible_config_path_locations = [
environment["PWD"] ~ "/.sisu",
environment["PWD"] ~ "/_sisu",
@@ -37,7 +33,6 @@ final private string readInConfigFile(string conf_sdl) {
pth,
conf_sdl,
);
- // writeln(conf_file);
try {
if (exists(conf_file)) {
debug(configfile) {
@@ -48,25 +43,8 @@ final private string readInConfigFile(string conf_sdl) {
}
}
catch (ErrnoException ex) {
- //// Handle errors
- // switch(ex.errno) {
- // case EPERM:
- // case EACCES:
- // // Permission denied
- // break;
- // case ENOENT:
- // // File does not exist
- // break;
- // default:
- // // Handle other errors
- // break;
- // }
}
- // catch (UTFException ex) {
- // // Handle validation errors
- // }
catch (FileException ex) {
- // Handle errors
}
}
return config_file_str;
@@ -84,20 +62,12 @@ private auto configSDLangRootTag(string configuration, string conf_sdl_filename)
}
catch(ParseException e) {
stderr.writeln("SDLang problem with content for ", conf_sdl_filename);
- // Error messages of the form:
- // myFile.sdl(5:28): Error: Invalid integer suffix.
stderr.writeln(e.msg);
}
debug(sdlang) {
- // Value is a std.variant.Algebraic
Value output_dir_structure_by = sdl_root_conf.tags["output_dir_structure_by"][0].values[0];
assert(output_dir_structure_by.type == typeid(string));
writeln(output_dir_structure_by);
- // Tag person = sdl_root_conf.namespaces["myNamespace"].tags["person"][0];
- // writeln("Name: ", person.attributes["name"][0].value);
- //
- // int age = person.tags["age"][0].values[0].get!int();
- // writeln("Age: ", age);
writeln("conf SDL:");
writeln(sdl_root_conf.toSDLDocument());
}
@@ -135,19 +105,6 @@ final private string readInMarkupSource(in string fn_src) {
}
}
catch (ErrnoException ex) {
- //// Handle errors
- // switch(ex.errno) {
- // case EPERM:
- // case EACCES:
- // // Permission denied
- // break;
- // case ENOENT:
- // // File does not exist
- // break;
- // default:
- // // Handle other errors
- // break;
- // }
}
catch (UTFException ex) {
// Handle validation errors
@@ -162,26 +119,8 @@ final private string readInMarkupSource(in string fn_src) {
*** notes
source_txt_str = readText(fn_src); // ok
-// source_txt_str = cast(string) read(fn_src); // ok
-// immutable string source_txt_str = cast(string) read(fn_src);
-// auto utf8Data = readText(fn_src);
-// auto utf16Data = readText!(wstring)(fn_src);
-// auto utf32Data = readText!(dstring)(fn_src);
catch (ErrnoException ex) {
-//// Handle errors
-// switch(ex.errno) {
-// case EPERM:
-// case EACCES:
-// // Permission denied
-// break;
-// case ENOENT:
-// // File does not exist
-// break;
-// default:
-// // Handle other errors
-// break;
-// }
}
** [#A] document header & content, array.length == 2 :array:
@@ -315,14 +254,12 @@ if (type1["curly_code"] == 1) {
) {
type1["header_make"] = 1;
type1["header_meta"] = 0;
- // cont_dynamic_array ~= "% " ~ line;
} else if (
(type1["header_meta"] == 1)
&& matchFirst(line, rgx.native_header_sub)
) {
type1["header_meta"] = 1;
type1["header_make"] = 0;
- // cont_dynamic_array ~= "% " ~ line;
} else if (auto m = match(line, rgx.insert_src_fn_ssi_or_sst)) {
type1["header_make"] = 0;
type1["header_meta"] = 0;
@@ -407,8 +344,6 @@ if (type["curly_code"] == 1) {
if (auto ma = match(line, rgx.src_fn_text)) {
/+ .sst when inserted, not used: headers and heading level ^:?A~ so remove +/
writeln(__LINE__); writeln(ma);
- // auto t =
- // raw.markupSourceHeaderContentRawLineTupleArray(fn_src, rgx.src_pth);
}
auto markup_sourcefile_insert_content =
raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts);
@@ -500,7 +435,6 @@ template SiSUmarkupRaw() {
private
struct MarkupRawUnit {
private import std.file;
- // enum State { off, on }
<<ao_markup_source_raw_read_file_source_string>>
<<ao_markup_source_raw_doc_header_and_content_split>>
<<ao_markup_source_raw_source_line_array>>
@@ -553,14 +487,9 @@ WORK AREA
template SiSUconfigIn() {
private import
std.exception,
- // std.regex,
std.stdio,
std.utf,
std.conv : to;
- // private import
- // ao_rgx; // ao_defaults.d
- // mixin RgxInit;
- // auto rgx = Rgx();
private
struct ConfigIn {
private import std.file;
@@ -614,7 +543,6 @@ from 0~ read in as content
# #+NAME: sdp_each_file_do
# #+BEGIN_SRC d
/+ ↓ read file +/
-// auto conf = MarkupRaw();
auto conf = ConfigIn();
auto configfile_content =
conf.sourceConfig(fn_src);
diff --git a/org/output.org b/org/output.org
index 1c9902a..a9ad6fd 100644
--- a/org/output.org
+++ b/org/output.org
@@ -154,27 +154,21 @@ void scroll(C)(
break;
case "verse":
body_ ~= html_para(obj);
- // body_ ~= html_verse(obj);
break;
case "group":
body_ ~= html_para(obj);
- // body_ ~= html_group(obj);
break;
case "block":
body_ ~= html_para(obj);
- // body_ ~= html_block(obj);
break;
case "quote":
body_ ~= html_para(obj);
- // body_ ~= html_quote(obj);
break;
case "table":
body_ ~= html_para(obj);
- // body_ ~= html_table(obj);
break;
case "code":
body_ ~= html_para(obj);
- // body_ ~= html_code(obj);
break;
default:
body_ ~= html_para(obj);
@@ -189,8 +183,6 @@ void scroll(C)(
auto pth_html = "en/html";
auto pth_seg = pth_html ~ "/" ~ m["fn_base"];
auto pth_html_fn = pth_html ~ "/" ~ fn;
- // auto pth_css= "_sisu/css";
- // auto pth_css_fn= pth_css ~ "/html.css";
try {
mkdirRecurse(pth_seg);
auto f = File(pth_html_fn, "w");
@@ -1504,9 +1496,6 @@ auto css_write() {
mkdirRecurse(pth_css);
auto f = File(pth_css_fn, "w");
f.writeln(html_css);
- // foreach (o; doc) {
- // f.writeln(o);
- // }
}
catch (ErrnoException ex) {
// Handle error
@@ -1550,8 +1539,6 @@ template SiSUoutputHub() {
}
if (opt_action_bool["text"]) {
writeln("text processing");
- // auto text=SDPoutput_text();
- // text.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
}
if (opt_action_bool["html"]) {
mixin SiSUoutputHTML;
diff --git a/org/sdp.org b/org/sdp.org
index 28c9b92..a3e67a2 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -97,7 +97,6 @@ import sdlang; // sdlang.d
***** notes
sdlang.parser, // sdlang/parser.d
sdlang.exceptions;
-// std.conv;
**** std :import:std:
@@ -197,7 +196,6 @@ scope(success) {
bits, os,
);
}
- // stderr.writeln("0");
}
scope(failure) {
debug(checkdoc) {
@@ -304,7 +302,6 @@ scope(success) {
"-------------------------------",
);
}
- // stderr.writeln("0");
}
scope(failure) {
debug(checkdoc) {
@@ -314,7 +311,6 @@ scope(failure) {
fn_src
);
}
- // stderr.writeln("1");
}
enforce(
match(fn_src, rgx.src_pth),
@@ -365,10 +361,8 @@ string[string][string] dochead_meta = header_make_and_meta_tuple[1];
auto t = abs.abstract_doc_source(content_body, dochead_make, dochead_meta);
static assert(!isTypeTuple!(t));
auto doc_ao_contents = t[0]; // head ~ toc ~ contents ~ endnotes_seg ~ [glossary] ~ bibliography ~ bookindex;
-// static assert(!isIterable!(doc_ao_contents));
auto doc_ao_bookindex_unordered_hashes = t[1]; // redundant?
auto doc_ao_biblio = t[2]; // redundant?
-// destroy(t);
#+END_SRC
**** TODO debug (document parts, checkdoc) :debug:checkdoc:
@@ -427,9 +421,6 @@ scope(exit) {
destroy(content_body);
destroy(t);
destroy(doc_ao_contents);
- // destroy(doc_ao_make_aa);
- // destroy(doc_ao_meta_aa);
- // destroy(doc_ao_bookindex_unordered_hashes);
destroy(doc_ao_biblio);
destroy(fn_src);
}
@@ -441,7 +432,6 @@ scope(exit) {
/+ no recognized filename provided +/
writeln("no recognized filename");
break;
-// terminate, stop
#+END_SRC
* tangles (code structure) :tangle:
@@ -477,7 +467,6 @@ void main(string[] args) {
}
}
}
-/// sdp sisu document parser
unittest {
/++
name "sdp"
@@ -694,8 +683,6 @@ or
#+END_SRC
#+BEGIN_SRC d
-// string[string] envVars = environment.toAA();
-// writeln(envVars);
/+
writefln(
"pwd: %s; home: %s",