aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--org/cgi_spine_search.org50
-rw-r--r--org/config_d_cfte.org11
-rw-r--r--org/metaverse.org140
-rw-r--r--org/out_xmls.org2
-rw-r--r--src/doc_reform/io_out/xmls.d2
-rw-r--r--src/doc_reform/meta/metadoc_from_src.d140
-rw-r--r--sundry/spine_search_cgi/src/spine_search.d44
-rwxr-xr-xsundry/spine_search_cgi/src/spine_search.d_39
-rw-r--r--sundry/spine_search_cgi/views/configuration.txt6
-rw-r--r--sundry/spine_search_cgi/views/configuration_example.txt6
-rw-r--r--views/configuration.txt2
11 files changed, 214 insertions, 228 deletions
diff --git a/org/cgi_spine_search.org b/org/cgi_spine_search.org
index 1fecaa9..b1e9a5a 100644
--- a/org/cgi_spine_search.org
+++ b/org/cgi_spine_search.org
@@ -253,9 +253,7 @@ struct Config {
string http_request_type;
string http_host;
// string server_name;
- string web_doc_root_path;
- string doc_collection_sub_root;
- string cgi_root;
+ string doc_collection_subroot;
string cgi_script_name;
string cgi_search_form_title;
string cgi_search_form_html_title;
@@ -276,9 +274,7 @@ auto conf = Config();
conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type);
conf.http_host = environment.get("SERVER_NAME", _cfg.http_host);
// conf.http_host = environment.get("HTTP_HOST", _cfg.http_host);
-conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root);
-conf.doc_collection_sub_root = "<<doc_subroot_path>>"; // (output_path - web_doc_root_path)
-conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath);
+conf.doc_collection_subroot = _cfg.www_doc_subroot;
conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename);
conf.cgi_search_form_title = _cfg.cgi_search_form_title; // ≅ SiSU spine search form
conf.cgi_search_form_html_title = "<a href=\""
@@ -287,7 +283,7 @@ conf.cgi_search_form_html_title = "<a href=\""
~ "\">"
~ _cfg.cgi_search_form_title
~ "</a>";
-conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ "/" ~ conf.cgi_script_name ~ "?";
+conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script_name ~ "?";
conf.query_string = environment.get("QUERY_STRING", "");
conf.http_url = environment.get("HTTP_REFERER", conf.query_base_url ~ conf.query_string);
conf.request_method = environment.get("REQUEST_METHOD", "POST");
@@ -1093,6 +1089,7 @@ SELECT
doc_objects.body,
doc_objects.seg_name,
doc_objects.ocn,
+ doc_objects.lev,
metadata_and_text.uid
FROM
doc_objects,
@@ -1149,7 +1146,7 @@ if (!select_query_results.empty) {
~ "<hr><div class=\"publication\">"
~ "<p class=\"publication\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
~ row["src_filename_base"].as!string ~ "/"
~ "toc.html"
@@ -1166,16 +1163,16 @@ if (!select_query_results.empty) {
);
}
if (cv.results_type == "txt") {
- if (row["ocn"].as!string != "0") {
+ if ((row["lev"].as!int < 4)
+ || (row["ocn"].as!string == "0")) {
cgi.write(
"<div class=\"flex-container\">"
~ "<div class=\"textview_ocn\" style=\"flex: 0 0 1.2em\">"
~ "<p class=\"ocn_is\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/"
- ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
+ ~ row["src_filename_base"].as!string ~ "/toc.html"
~ "\">"
~ row["ocn"].as!string
~ "</a>:</p>"
@@ -1191,9 +1188,10 @@ if (!select_query_results.empty) {
~ "<div class=\"textview_ocn\" style=\"flex: 0 0 1.2em\">"
~ "<p class=\"ocn_is\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/toc.html"
+ ~ row["src_filename_base"].as!string ~ "/"
+ ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
~ "\">"
~ row["ocn"].as!string
~ "</a>:</p>"
@@ -1205,15 +1203,15 @@ if (!select_query_results.empty) {
);
}
} else {
- if (row["ocn"].as!string != "0") {
+ if ((row["lev"].as!int < 4)
+ || (row["ocn"].as!string == "0")) {
cgi.write(
_matched_ocn_open
~ "<a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/"
- ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
+ ~ row["src_filename_base"].as!string ~ "/toc.html"
~ "\">"
~ row["ocn"].as!string
~ "</a>, "
@@ -1223,9 +1221,10 @@ if (!select_query_results.empty) {
_matched_ocn_open
~ "<a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/toc.html"
+ ~ row["src_filename_base"].as!string ~ "/"
+ ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
~ "\">"
~ row["ocn"].as!string
~ "</a>, "
@@ -2090,15 +2089,7 @@ _cfg.doc_root_www
#+NAME: doc_subroot_path
#+BEGIN_SRC text
-/spine/static
-#+END_SRC
-
-#+NAME: cgi_root_path
-#+BEGIN_SRC text
-_cfg.doc_root_cgi
-#+END_SRC
-#+BEGIN_SRC text
-/usr/lib/cgi-bin/
+/spine
#+END_SRC
#+NAME: db_root_path
@@ -2168,4 +2159,3 @@ see configuration_cfte.org
+/
#+END_SRC
-
diff --git a/org/config_d_cfte.org b/org/config_d_cfte.org
index e5815ea..ebc164b 100644
--- a/org/config_d_cfte.org
+++ b/org/config_d_cfte.org
@@ -103,10 +103,8 @@ enum _cfg = Cfg();
struct Cfg {
string http_request_type = "<<www_http>>";
string http_host = "<<www_host>>";
- string www_url_doc_root = "<<www_url_doc_root>>";
- string www_doc_root = "<<www_doc_root>>";
- string cgi_bin_subpath = "<<cgi_bin_subpath>>";
- string cgi_filename = "<<cgi_filename>>"; // "spine-search"
+ string www_doc_subroot = "<<www_doc_subroot>>";
+ string cgi_filename = "<<cgi_filename>>";
string cgi_search_form_title = "<<cgi_search_form_title>>";
string db_sqlite_path = "<<db_sqlite_path>>";
string db_sqlite_filename = "<<db_sqlite_filename>>";
@@ -136,6 +134,11 @@ http://localhost
/srv/www/spine
#+END_SRC
+#+NAME: www_doc_subroot
+#+BEGIN_SRC sh
+/spine
+#+END_SRC
+
#+NAME: cgi_bin_root
#+BEGIN_SRC sh
/var/www/cgi/cgi-bin
diff --git a/org/metaverse.org b/org/metaverse.org
index f3e7425..b97bd2f 100644
--- a/org/metaverse.org
+++ b/org/metaverse.org
@@ -372,7 +372,7 @@ string anchor_tag_;
string[string] tag_in_seg;
string lev_anchor_tag;
string[string][string] tag_assoc;
-string[] lv0_to_3_tags;
+string[] lv0to3_tags;
/+ enum +/
enum DocStructMarkupHeading {
h_sect_A,
@@ -686,8 +686,8 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
static auto rgx = RgxI();
if (auto m = an_object["substantive"].match(rgx.inline_link_anchor)) {
if (m.captures[1] !in tag_assoc) {
- tag_assoc[(m.captures[1])]["seg_lv4"] = tag_in_seg["seg_lv4"];
- tag_assoc[(m.captures[1])]["seg_lv1_to_4"] = tag_in_seg["seg_lv1_to_4"];
+ tag_assoc[(m.captures[1])]["seg_lv4"] = tag_in_seg["seg_lv4"];
+ tag_assoc[(m.captures[1])]["seg_lv1to4"] = tag_in_seg["seg_lv1to4"];
} else {
writeln("a tag named already exists, check text line\n ", an_object["substantive"]);
}
@@ -837,8 +837,8 @@ comp_obj_heading_.ptr.html_segnames = html_segnames_p
comp_obj_heading_.tags.anchor_tags = ["toc"];
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 1, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 1, 0, 0, 0, 0, 0];
-tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
-tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
auto toc_head = comp_obj_heading_;
html_segnames_ptr_cntr++;
the_document_toc_section = [toc_head];
@@ -1018,8 +1018,8 @@ if there is a glossary section you need to:
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
the_document_glossary_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
{
comp_obj_heading_ = comp_obj_heading_.init;
@@ -1044,8 +1044,8 @@ if there is a glossary section you need to:
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 1, 0, 0, 0, 0, 0];
comp_obj_heading_.tags.anchor_tags = ["glossary"];
the_document_glossary_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
} else {
an_object = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
@@ -1154,8 +1154,8 @@ if there is a blurb section you need to:
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
the_document_blurb_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
{
comp_obj_heading_ = comp_obj_heading_.init;
@@ -1180,8 +1180,8 @@ if there is a blurb section you need to:
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 1, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 1, 0, 0, 0, 0, 0];
the_document_blurb_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
} else if (line.matchFirst(rgx.headings)
&& (opt_action.backmatter && opt_action.section_blurb)) {
@@ -1204,8 +1204,8 @@ if there is a blurb section you need to:
comp_obj_heading_.metainfo.parent_ocn = 1;
comp_obj_heading_.metainfo.parent_lev_markup = 0;
the_document_blurb_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
} else {
an_object = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
comp_obj_para = comp_obj_para.init;
@@ -1509,9 +1509,9 @@ assert(
#+NAME: abs_in_loop_body_not_block_obj_line_empty_heading_obj
#+BEGIN_SRC d
if (_new_doc) {
- tag_assoc = tag_assoc.init;
- lv0_to_3_tags = lv0_to_3_tags.init;
- tag_in_seg = tag_in_seg.init;
+ tag_assoc = tag_assoc.init;
+ lv0to3_tags = lv0to3_tags.init;
+ tag_in_seg = tag_in_seg.init;
}
if (pith["txt_is"] == eN.txt_is.heading
&& line_occur["heading"] > eN.bi.off
@@ -1534,26 +1534,26 @@ if (pith["txt_is"] == eN.txt_is.heading
if (
an_object["lev_markup_number"].to!int == 4
&& (!(anchor_tag.empty)
- || (lv0_to_3_tags.length > 0))
+ || (lv0to3_tags.length > 0))
) {
- tag_in_seg["seg_lv4"] = anchor_tag;
- tag_in_seg["seg_lv1_to_4"] = anchor_tag;
+ tag_in_seg["seg_lv4"] = anchor_tag;
+ tag_in_seg["seg_lv1to4"] = anchor_tag;
lev_anchor_tag = anchor_tag;
- tag_assoc[anchor_tag]["seg_lv4"] = tag_in_seg["seg_lv4"];
- tag_assoc[anchor_tag]["seg_lv1_to_4"] = tag_in_seg["seg_lv1_to_4"];
- if (lv0_to_3_tags.length > 0) { /+ names used for html markup segments 1 to 4 (rather than epub which has separate segments for A to D) +/
- foreach (lv0_to_lv3_html_tag; lv0_to_3_tags) {
+ tag_assoc[anchor_tag]["seg_lv4"] = tag_in_seg["seg_lv4"];
+ tag_assoc[anchor_tag]["seg_lv1to4"] = tag_in_seg["seg_lv1to4"];
+ if (lv0to3_tags.length > 0) { /+ names used for html markup segments 1 to 4 (rather than epub which has separate segments for A to D) +/
+ foreach (lv0_to_lv3_html_tag; lv0to3_tags) {
tag_assoc[lv0_to_lv3_html_tag]["seg_lv4"] = anchor_tag;
}
}
anchor_tag_ = anchor_tag;
- lv0_to_3_tags = lv0_to_3_tags.init;
+ lv0to3_tags = lv0to3_tags.init;
} else if (an_object["lev_markup_number"].to!int > 4) {
- tag_in_seg["seg_lv4"] = anchor_tag_;
- tag_in_seg["seg_lv1_to_4"] = anchor_tag_;
- lev_anchor_tag = anchor_tag;
+ tag_in_seg["seg_lv4"] = anchor_tag_;
+ tag_in_seg["seg_lv1to4"] = anchor_tag_;
+ lev_anchor_tag = anchor_tag;
tag_assoc[anchor_tag]["seg_lv4"] = tag_in_seg["seg_lv4"];
- tag_assoc[anchor_tag]["seg_lv1_to_4"] = tag_in_seg["seg_lv1_to_4"];
+ tag_assoc[anchor_tag]["seg_lv1to4"] = tag_in_seg["seg_lv1to4"];
} else if (an_object["lev_markup_number"].to!int < 4) {
string segn;
switch (an_object["lev_markup_number"].to!int) { /+ names used for epub markup segments A to D +/
@@ -1573,10 +1573,10 @@ if (pith["txt_is"] == eN.txt_is.heading
++cnt3;
goto default;
default:
- lv0_to_3_tags ~= obj_cite_digits.object_number.to!string;
- lv0_to_3_tags ~= segn;
- tag_in_seg["seg_lv4"] = segn; // for html segname need following lv4 not yet known
- tag_in_seg["seg_lv1_to_4"] = segn;
+ lv0to3_tags ~= obj_cite_digits.object_number.to!string;
+ lv0to3_tags ~= segn;
+ tag_in_seg["seg_lv4"] = segn; // for html segname need following lv4 not yet known
+ tag_in_seg["seg_lv1to4"] = segn;
break;
}
}
@@ -1600,7 +1600,7 @@ if (pith["txt_is"] == eN.txt_is.heading
html_segnames_ptr_cntr++;
}
if (an_object["lev_markup_number"].to!int <= 4) {
- segnames["epub"] ~= tag_in_seg["seg_lv1_to_4"];
+ segnames["epub"] ~= tag_in_seg["seg_lv1to4"];
}
auto comp_obj_heading
= node_construct.node_emitter_heading(
@@ -1625,7 +1625,7 @@ if (pith["txt_is"] == eN.txt_is.heading
debug(segments) {
writeln(an_object["lev_markup_number"]);
writeln(tag_in_seg["seg_lv4"]);
- writeln(tag_in_seg["seg_lv1_to_4"]);
+ writeln(tag_in_seg["seg_lv1to4"]);
}
the_document_body_section ~= comp_obj_heading;
debug(objectrelated1) { // check
@@ -1678,7 +1678,7 @@ if (pith["txt_is"] == eN.txt_is.heading
comp_obj_para.metainfo.is_a = "para";
comp_obj_para.text = an_object["substantive"].to!string.strip;
comp_obj_para.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_para.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_para.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_para.metainfo.ocn = obj_cite_digits.object_number;
comp_obj_para.metainfo.identifier = obj_cite_digits.identifier;
comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off == 0) ? true : false; // TODO
@@ -1798,8 +1798,8 @@ eof xml_dom_tail_section
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0];
the_document_xml_dom_tail_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
#+END_SRC
@@ -1888,8 +1888,8 @@ if (biblio_ordered.length > 0) {
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
the_document_bibliography_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
{
comp_obj_heading_ = comp_obj_heading_.init;
@@ -1914,8 +1914,8 @@ if (biblio_ordered.length > 0) {
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 1, 0, 0, 0, 0, 0];
comp_obj_heading_.tags.anchor_tags = ["bibliography"];
the_document_bibliography_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
{
string out_;
@@ -2770,7 +2770,7 @@ if (the_document_body_section.length > 1) {
tag_assoc[(obj.metainfo.identifier)]["seg_lv4"]
= obj.tags.html_segment_anchor_tag_is;
}
- tag_assoc[(obj.metainfo.identifier)]["seg_lv1_to_4"]
+ tag_assoc[(obj.metainfo.identifier)]["seg_lv1to4"]
= obj.tags.epub_segment_anchor_tag_is;
}
if (obj.metainfo.is_a == "heading") {
@@ -3261,10 +3261,10 @@ if ((opt_action.html)
#+NAME: abs_post_document_segnames
#+BEGIN_SRC d
string[] segnames_4 = segnames["html"].dup;
-string[] segnames_lv1_to_4 = segnames["epub"].dup;
+string[] segnames_lv1to4 = segnames["epub"].dup;
debug(segnames) {
- writeln("segnames_lv4: ", segnames_4);
- writeln("segnames_lv1_to_4: ", segnames_lv1_to_4);
+ writeln("segnames_lv4: ", segnames_4);
+ writeln("segnames_lv1to4: ", segnames_lv1to4);
}
#+END_SRC
@@ -4238,7 +4238,7 @@ why extra object stuff only in poem/verse?
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -4301,7 +4301,7 @@ why extra object stuff only in poem/verse?
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -4347,7 +4347,7 @@ why extra object stuff only in poem/verse?
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -4410,7 +4410,7 @@ why extra object stuff only in poem/verse?
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -4551,7 +4551,7 @@ process and use an_object["table_head"] (then empty it)
comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
@@ -4639,7 +4639,7 @@ if (pith["block_is"] == eN.blk_is.quote) {
comp_obj_block.metainfo.lang = an_object["lang"];
comp_obj_block.metainfo.attrib = an_object["attrib"];
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -4697,7 +4697,7 @@ if (pith["block_is"] == eN.blk_is.quote) {
comp_obj_block.metainfo.lang = an_object["lang"];
comp_obj_block.metainfo.attrib = an_object["attrib"];
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -4755,7 +4755,7 @@ if (pith["block_is"] == eN.blk_is.quote) {
comp_obj_block.metainfo.lang = an_object["lang"];
comp_obj_block.metainfo.attrib = an_object["attrib"];
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -4857,7 +4857,7 @@ if (pith["block_is"] == eN.blk_is.quote) {
comp_obj_code.metainfo.attrib = an_object["attrib"];
comp_obj_code.code_block.linenumbers = (an_object["attrib"].match(rgx.code_numbering)) ? true : false;
comp_obj_code.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_code.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_code.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_code.text = an_object["substantive"];
comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -4906,7 +4906,7 @@ if (pith["block_is"] == eN.blk_is.quote) {
comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
@@ -6978,8 +6978,8 @@ struct BookIndexReportSection {
comp_obj_heading_.metainfo.parent_lev_markup = 0;
comp_obj_heading.has.inline_links = true;
bookindex_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
{
@@ -7004,8 +7004,8 @@ struct BookIndexReportSection {
comp_obj_heading.has.inline_links = false;
comp_obj_heading_.tags.anchor_tags = ["bookindex"];
bookindex_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
import std.array : appender;
@@ -7247,8 +7247,8 @@ struct NotesSection {
comp_obj_heading_.metainfo.parent_ocn = 1;
comp_obj_heading_.metainfo.parent_lev_markup = 0;
the_document_endnotes_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
{
@@ -7272,8 +7272,8 @@ struct NotesSection {
comp_obj_heading_.metainfo.parent_lev_markup = 0;
comp_obj_heading_.tags.anchor_tags = ["endnotes"];
the_document_endnotes_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
} else {
@@ -7499,7 +7499,7 @@ struct NodeStructureMetadata {
comp_obj_location.metainfo.ocn = obj_cite_digits.object_number;
comp_obj_location.metainfo.identifier = obj_cite_digits.identifier;
comp_obj_location.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
- comp_obj_location.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_location.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1to4"];
comp_obj_location.tags.heading_lev_anchor_tag = lev_anchor_tag;
comp_obj_location.metainfo.parent_ocn = p_["object_number"];
comp_obj_location.metainfo.parent_lev_markup = p_["lev_markup_number"];
@@ -7656,12 +7656,12 @@ invariant() {
_comp_obj_heading_.metainfo.object_number_off = obj_cite_digits.off;
// _comp_obj_heading_.metainfo.o_n_book_index = obj_cite_digits.bkidx;
_comp_obj_heading_.metainfo.object_number_type = obj_cite_digits.type;
- _comp_obj_heading_.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
+ _comp_obj_heading_.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1to4"];
_comp_obj_heading_.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
_comp_obj_heading_.tags.in_segment_html = _comp_obj_heading_.tags.anchor_tag_html;
_comp_obj_heading_.tags.heading_lev_anchor_tag = lev_anchor_tag;
_comp_obj_heading_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- _comp_obj_heading_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ _comp_obj_heading_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
_comp_obj_heading_.metainfo.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
_comp_obj_heading_.metainfo.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
_comp_obj_heading_.metainfo.parent_ocn = p_["object_number"];
@@ -7673,8 +7673,8 @@ invariant() {
_comp_obj_heading_.has.inline_notes_reg = flag_notes_reg;
_comp_obj_heading_.has.inline_notes_star = flag_notes_star;
_comp_obj_heading_.has.inline_links = flag_links;
- tag_assoc[_comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = _comp_obj_heading_.tags.in_segment_html;
- tag_assoc[_comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = _comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[_comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = _comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[_comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = _comp_obj_heading_.tags.segment_anchor_tag_epub;
debug(_node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("* ", _node.to!string);
diff --git a/org/out_xmls.org b/org/out_xmls.org
index ef96b34..964f43d 100644
--- a/org/out_xmls.org
+++ b/org/out_xmls.org
@@ -612,7 +612,7 @@ import
"$1");
}
if (_xml_type == "seg" || _xml_type == "epub") {
- seg_lvs = (_xml_type == "epub") ? "seg_lv1_to_4" : "seg_lv4";
+ seg_lvs = (_xml_type == "epub") ? "seg_lv1to4" : "seg_lv4";
foreach (m; _txt.match(rgx.inline_link_hash)) {
if (m.captures["hash"] in doc_matters.has.tag_associations) {
if (
diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d
index f4ca976..2524664 100644
--- a/src/doc_reform/io_out/xmls.d
+++ b/src/doc_reform/io_out/xmls.d
@@ -471,7 +471,7 @@ template outputXHTMLs() {
"$1");
}
if (_xml_type == "seg" || _xml_type == "epub") {
- seg_lvs = (_xml_type == "epub") ? "seg_lv1_to_4" : "seg_lv4";
+ seg_lvs = (_xml_type == "epub") ? "seg_lv1to4" : "seg_lv4";
foreach (m; _txt.match(rgx.inline_link_hash)) {
if (m.captures["hash"] in doc_matters.has.tag_associations) {
if (
diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d
index 28ce990..3099d84 100644
--- a/src/doc_reform/meta/metadoc_from_src.d
+++ b/src/doc_reform/meta/metadoc_from_src.d
@@ -134,7 +134,7 @@ template docAbstraction() {
string[string] tag_in_seg;
string lev_anchor_tag;
string[string][string] tag_assoc;
- string[] lv0_to_3_tags;
+ string[] lv0to3_tags;
/+ enum +/
enum DocStructMarkupHeading {
h_sect_A,
@@ -418,8 +418,8 @@ template docAbstraction() {
static auto rgx = RgxI();
if (auto m = an_object["substantive"].match(rgx.inline_link_anchor)) {
if (m.captures[1] !in tag_assoc) {
- tag_assoc[(m.captures[1])]["seg_lv4"] = tag_in_seg["seg_lv4"];
- tag_assoc[(m.captures[1])]["seg_lv1_to_4"] = tag_in_seg["seg_lv1_to_4"];
+ tag_assoc[(m.captures[1])]["seg_lv4"] = tag_in_seg["seg_lv4"];
+ tag_assoc[(m.captures[1])]["seg_lv1to4"] = tag_in_seg["seg_lv1to4"];
} else {
writeln("a tag named already exists, check text line\n ", an_object["substantive"]);
}
@@ -567,8 +567,8 @@ template docAbstraction() {
comp_obj_heading_.tags.anchor_tags = ["toc"];
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 1, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 1, 0, 0, 0, 0, 0];
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
auto toc_head = comp_obj_heading_;
html_segnames_ptr_cntr++;
the_document_toc_section = [toc_head];
@@ -706,8 +706,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
the_document_glossary_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
{
comp_obj_heading_ = comp_obj_heading_.init;
@@ -732,8 +732,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 1, 0, 0, 0, 0, 0];
comp_obj_heading_.tags.anchor_tags = ["glossary"];
the_document_glossary_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
} else {
an_object = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
@@ -829,8 +829,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
the_document_blurb_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
{
comp_obj_heading_ = comp_obj_heading_.init;
@@ -855,8 +855,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 1, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 1, 0, 0, 0, 0, 0];
the_document_blurb_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
} else if (line.matchFirst(rgx.headings)
&& (opt_action.backmatter && opt_action.section_blurb)) {
@@ -879,8 +879,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.parent_ocn = 1;
comp_obj_heading_.metainfo.parent_lev_markup = 0;
the_document_blurb_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
} else {
an_object = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
comp_obj_para = comp_obj_para.init;
@@ -1073,9 +1073,9 @@ template docAbstraction() {
"code block status: none"
);
if (_new_doc) {
- tag_assoc = tag_assoc.init;
- lv0_to_3_tags = lv0_to_3_tags.init;
- tag_in_seg = tag_in_seg.init;
+ tag_assoc = tag_assoc.init;
+ lv0to3_tags = lv0to3_tags.init;
+ tag_in_seg = tag_in_seg.init;
}
if (pith["txt_is"] == eN.txt_is.heading
&& line_occur["heading"] > eN.bi.off
@@ -1098,26 +1098,26 @@ template docAbstraction() {
if (
an_object["lev_markup_number"].to!int == 4
&& (!(anchor_tag.empty)
- || (lv0_to_3_tags.length > 0))
+ || (lv0to3_tags.length > 0))
) {
- tag_in_seg["seg_lv4"] = anchor_tag;
- tag_in_seg["seg_lv1_to_4"] = anchor_tag;
+ tag_in_seg["seg_lv4"] = anchor_tag;
+ tag_in_seg["seg_lv1to4"] = anchor_tag;
lev_anchor_tag = anchor_tag;
- tag_assoc[anchor_tag]["seg_lv4"] = tag_in_seg["seg_lv4"];
- tag_assoc[anchor_tag]["seg_lv1_to_4"] = tag_in_seg["seg_lv1_to_4"];
- if (lv0_to_3_tags.length > 0) { /+ names used for html markup segments 1 to 4 (rather than epub which has separate segments for A to D) +/
- foreach (lv0_to_lv3_html_tag; lv0_to_3_tags) {
+ tag_assoc[anchor_tag]["seg_lv4"] = tag_in_seg["seg_lv4"];
+ tag_assoc[anchor_tag]["seg_lv1to4"] = tag_in_seg["seg_lv1to4"];
+ if (lv0to3_tags.length > 0) { /+ names used for html markup segments 1 to 4 (rather than epub which has separate segments for A to D) +/
+ foreach (lv0_to_lv3_html_tag; lv0to3_tags) {
tag_assoc[lv0_to_lv3_html_tag]["seg_lv4"] = anchor_tag;
}
}
anchor_tag_ = anchor_tag;
- lv0_to_3_tags = lv0_to_3_tags.init;
+ lv0to3_tags = lv0to3_tags.init;
} else if (an_object["lev_markup_number"].to!int > 4) {
- tag_in_seg["seg_lv4"] = anchor_tag_;
- tag_in_seg["seg_lv1_to_4"] = anchor_tag_;
- lev_anchor_tag = anchor_tag;
+ tag_in_seg["seg_lv4"] = anchor_tag_;
+ tag_in_seg["seg_lv1to4"] = anchor_tag_;
+ lev_anchor_tag = anchor_tag;
tag_assoc[anchor_tag]["seg_lv4"] = tag_in_seg["seg_lv4"];
- tag_assoc[anchor_tag]["seg_lv1_to_4"] = tag_in_seg["seg_lv1_to_4"];
+ tag_assoc[anchor_tag]["seg_lv1to4"] = tag_in_seg["seg_lv1to4"];
} else if (an_object["lev_markup_number"].to!int < 4) {
string segn;
switch (an_object["lev_markup_number"].to!int) { /+ names used for epub markup segments A to D +/
@@ -1137,10 +1137,10 @@ template docAbstraction() {
++cnt3;
goto default;
default:
- lv0_to_3_tags ~= obj_cite_digits.object_number.to!string;
- lv0_to_3_tags ~= segn;
- tag_in_seg["seg_lv4"] = segn; // for html segname need following lv4 not yet known
- tag_in_seg["seg_lv1_to_4"] = segn;
+ lv0to3_tags ~= obj_cite_digits.object_number.to!string;
+ lv0to3_tags ~= segn;
+ tag_in_seg["seg_lv4"] = segn; // for html segname need following lv4 not yet known
+ tag_in_seg["seg_lv1to4"] = segn;
break;
}
}
@@ -1164,7 +1164,7 @@ template docAbstraction() {
html_segnames_ptr_cntr++;
}
if (an_object["lev_markup_number"].to!int <= 4) {
- segnames["epub"] ~= tag_in_seg["seg_lv1_to_4"];
+ segnames["epub"] ~= tag_in_seg["seg_lv1to4"];
}
auto comp_obj_heading
= node_construct.node_emitter_heading(
@@ -1189,7 +1189,7 @@ template docAbstraction() {
debug(segments) {
writeln(an_object["lev_markup_number"]);
writeln(tag_in_seg["seg_lv4"]);
- writeln(tag_in_seg["seg_lv1_to_4"]);
+ writeln(tag_in_seg["seg_lv1to4"]);
}
the_document_body_section ~= comp_obj_heading;
debug(objectrelated1) { // check
@@ -1236,7 +1236,7 @@ template docAbstraction() {
comp_obj_para.metainfo.is_a = "para";
comp_obj_para.text = an_object["substantive"].to!string.strip;
comp_obj_para.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_para.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_para.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_para.metainfo.ocn = obj_cite_digits.object_number;
comp_obj_para.metainfo.identifier = obj_cite_digits.identifier;
comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off == 0) ? true : false; // TODO
@@ -1334,8 +1334,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0];
the_document_xml_dom_tail_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
auto en_tuple
= note_section.endnote_objects(obj_cite_digits, opt_action);
@@ -1402,8 +1402,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 0, 0, 0, 0, 0, 0];
the_document_bibliography_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
{
comp_obj_heading_ = comp_obj_heading_.init;
@@ -1428,8 +1428,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = [ 1, 1, 1, 0, 0, 0, 0, 0];
comp_obj_heading_.tags.anchor_tags = ["bibliography"];
the_document_bibliography_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
}
{
string out_;
@@ -2068,7 +2068,7 @@ template docAbstraction() {
tag_assoc[(obj.metainfo.identifier)]["seg_lv4"]
= obj.tags.html_segment_anchor_tag_is;
}
- tag_assoc[(obj.metainfo.identifier)]["seg_lv1_to_4"]
+ tag_assoc[(obj.metainfo.identifier)]["seg_lv1to4"]
= obj.tags.epub_segment_anchor_tag_is;
}
if (obj.metainfo.is_a == "heading") {
@@ -2490,10 +2490,10 @@ template docAbstraction() {
document_section_keys_sequenced["seg"] ~= "tail";
}
string[] segnames_4 = segnames["html"].dup;
- string[] segnames_lv1_to_4 = segnames["epub"].dup;
+ string[] segnames_lv1to4 = segnames["epub"].dup;
debug(segnames) {
- writeln("segnames_lv4: ", segnames_4);
- writeln("segnames_lv1_to_4: ", segnames_lv1_to_4);
+ writeln("segnames_lv4: ", segnames_4);
+ writeln("segnames_lv1to4: ", segnames_lv1to4);
}
destroy(the_document_head_section);
destroy(the_document_toc_section);
@@ -3054,7 +3054,7 @@ template docAbstraction() {
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3117,7 +3117,7 @@ template docAbstraction() {
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3163,7 +3163,7 @@ template docAbstraction() {
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3226,7 +3226,7 @@ template docAbstraction() {
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3516,7 +3516,7 @@ template docAbstraction() {
comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
@@ -3590,7 +3590,7 @@ template docAbstraction() {
comp_obj_block.metainfo.lang = an_object["lang"];
comp_obj_block.metainfo.attrib = an_object["attrib"];
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3642,7 +3642,7 @@ template docAbstraction() {
comp_obj_block.metainfo.lang = an_object["lang"];
comp_obj_block.metainfo.attrib = an_object["attrib"];
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3694,7 +3694,7 @@ template docAbstraction() {
comp_obj_block.metainfo.lang = an_object["lang"];
comp_obj_block.metainfo.attrib = an_object["attrib"];
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3784,7 +3784,7 @@ template docAbstraction() {
comp_obj_code.metainfo.attrib = an_object["attrib"];
comp_obj_code.code_block.linenumbers = (an_object["attrib"].match(rgx.code_numbering)) ? true : false;
comp_obj_code.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_code.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_code.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_code.text = an_object["substantive"];
comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3827,7 +3827,7 @@ template docAbstraction() {
comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
@@ -5506,8 +5506,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.parent_lev_markup = 0;
comp_obj_heading.has.inline_links = true;
bookindex_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
{
@@ -5532,8 +5532,8 @@ template docAbstraction() {
comp_obj_heading.has.inline_links = false;
comp_obj_heading_.tags.anchor_tags = ["bookindex"];
bookindex_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
import std.array : appender;
@@ -5746,8 +5746,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.parent_ocn = 1;
comp_obj_heading_.metainfo.parent_lev_markup = 0;
the_document_endnotes_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
{
@@ -5771,8 +5771,8 @@ template docAbstraction() {
comp_obj_heading_.metainfo.parent_lev_markup = 0;
comp_obj_heading_.tags.anchor_tags = ["endnotes"];
the_document_endnotes_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
} else {
@@ -5944,7 +5944,7 @@ template docAbstraction() {
comp_obj_location.metainfo.ocn = obj_cite_digits.object_number;
comp_obj_location.metainfo.identifier = obj_cite_digits.identifier;
comp_obj_location.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
- comp_obj_location.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_location.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1to4"];
comp_obj_location.tags.heading_lev_anchor_tag = lev_anchor_tag;
comp_obj_location.metainfo.parent_ocn = p_["object_number"];
comp_obj_location.metainfo.parent_lev_markup = p_["lev_markup_number"];
@@ -6095,12 +6095,12 @@ template docAbstraction() {
_comp_obj_heading_.metainfo.object_number_off = obj_cite_digits.off;
// _comp_obj_heading_.metainfo.o_n_book_index = obj_cite_digits.bkidx;
_comp_obj_heading_.metainfo.object_number_type = obj_cite_digits.type;
- _comp_obj_heading_.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
+ _comp_obj_heading_.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1to4"];
_comp_obj_heading_.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
_comp_obj_heading_.tags.in_segment_html = _comp_obj_heading_.tags.anchor_tag_html;
_comp_obj_heading_.tags.heading_lev_anchor_tag = lev_anchor_tag;
_comp_obj_heading_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- _comp_obj_heading_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ _comp_obj_heading_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"];
_comp_obj_heading_.metainfo.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
_comp_obj_heading_.metainfo.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
_comp_obj_heading_.metainfo.parent_ocn = p_["object_number"];
@@ -6112,8 +6112,8 @@ template docAbstraction() {
_comp_obj_heading_.has.inline_notes_reg = flag_notes_reg;
_comp_obj_heading_.has.inline_notes_star = flag_notes_star;
_comp_obj_heading_.has.inline_links = flag_links;
- tag_assoc[_comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = _comp_obj_heading_.tags.in_segment_html;
- tag_assoc[_comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = _comp_obj_heading_.tags.segment_anchor_tag_epub;
+ tag_assoc[_comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = _comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[_comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = _comp_obj_heading_.tags.segment_anchor_tag_epub;
debug(_node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("* ", _node.to!string);
diff --git a/sundry/spine_search_cgi/src/spine_search.d b/sundry/spine_search_cgi/src/spine_search.d
index 2f9de26..e1e0c93 100644
--- a/sundry/spine_search_cgi/src/spine_search.d
+++ b/sundry/spine_search_cgi/src/spine_search.d
@@ -7,7 +7,7 @@
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- - Copyright: (C) 2015 - 2021 Ralph Amissah, All Rights
+ - Copyright: (C) 2015 - 2022 Ralph Amissah, All Rights
Reserved.
- License: AGPL 3 or later:
@@ -41,7 +41,7 @@
- docReform object numbering
- standard SiSU object citation numbering & system
- - Hompages:
+ - Homepages:
[https://www.doc_reform.org]
[https://www.sisudoc.org]
@@ -68,9 +68,7 @@ void cgi_function_intro(Cgi cgi) {
string http_request_type;
string http_host;
// string server_name;
- string web_doc_root_path;
- string doc_collection_sub_root;
- string cgi_root;
+ string doc_collection_subroot;
string cgi_script_name;
string cgi_search_form_title;
string cgi_search_form_html_title;
@@ -84,9 +82,7 @@ void cgi_function_intro(Cgi cgi) {
auto conf = Config();
conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type);
conf.http_host = environment.get("SERVER_NAME", _cfg.http_host);
- conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root);
- conf.doc_collection_sub_root = "/spine/static"; // (output_path - web_doc_root_path)
- conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath);
+ conf.doc_collection_subroot = _cfg.www_doc_subroot;
conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename);
conf.cgi_search_form_title = _cfg.cgi_search_form_title; // ≅ SiSU spine search form
conf.cgi_search_form_html_title = "<a href=\""
@@ -95,7 +91,7 @@ void cgi_function_intro(Cgi cgi) {
~ "\">"
~ _cfg.cgi_search_form_title
~ "</a>";
- conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ "/" ~ conf.cgi_script_name ~ "?";
+ conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script_name ~ "?";
conf.query_string = environment.get("QUERY_STRING", "");
conf.http_url = environment.get("HTTP_REFERER", conf.query_base_url ~ conf.query_string);
conf.request_method = environment.get("REQUEST_METHOD", "POST");
@@ -1684,6 +1680,7 @@ SELECT
doc_objects.body,
doc_objects.seg_name,
doc_objects.ocn,
+ doc_objects.lev,
metadata_and_text.uid
FROM
doc_objects,
@@ -1734,7 +1731,7 @@ LIMIT %s OFFSET %s
~ "<hr><div class=\"publication\">"
~ "<p class=\"publication\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
~ row["src_filename_base"].as!string ~ "/"
~ "toc.html"
@@ -1751,16 +1748,16 @@ LIMIT %s OFFSET %s
);
}
if (cv.results_type == "txt") {
- if (row["ocn"].as!string != "0") {
+ if ((row["lev"].as!int < 4)
+ || (row["ocn"].as!string == "0")) {
cgi.write(
"<div class=\"flex-container\">"
~ "<div class=\"textview_ocn\" style=\"flex: 0 0 1.2em\">"
~ "<p class=\"ocn_is\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/"
- ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
+ ~ row["src_filename_base"].as!string ~ "/toc.html"
~ "\">"
~ row["ocn"].as!string
~ "</a>:</p>"
@@ -1776,9 +1773,10 @@ LIMIT %s OFFSET %s
~ "<div class=\"textview_ocn\" style=\"flex: 0 0 1.2em\">"
~ "<p class=\"ocn_is\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/toc.html"
+ ~ row["src_filename_base"].as!string ~ "/"
+ ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
~ "\">"
~ row["ocn"].as!string
~ "</a>:</p>"
@@ -1790,15 +1788,15 @@ LIMIT %s OFFSET %s
);
}
} else {
- if (row["ocn"].as!string != "0") {
+ if ((row["lev"].as!int < 4)
+ || (row["ocn"].as!string == "0")) {
cgi.write(
_matched_ocn_open
~ "<a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/"
- ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
+ ~ row["src_filename_base"].as!string ~ "/toc.html"
~ "\">"
~ row["ocn"].as!string
~ "</a>, "
@@ -1808,9 +1806,10 @@ LIMIT %s OFFSET %s
_matched_ocn_open
~ "<a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/toc.html"
+ ~ row["src_filename_base"].as!string ~ "/"
+ ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
~ "\">"
~ row["ocn"].as!string
~ "</a>, "
@@ -1820,7 +1819,6 @@ LIMIT %s OFFSET %s
}
}
cgi.write( previous_next);
-
} else { // offset_not_beyond_limit = false;
cgi.write("select_query_results empty<p>\n");
}
diff --git a/sundry/spine_search_cgi/src/spine_search.d_ b/sundry/spine_search_cgi/src/spine_search.d_
index 10dc9c3..3703659 100755
--- a/sundry/spine_search_cgi/src/spine_search.d_
+++ b/sundry/spine_search_cgi/src/spine_search.d_
@@ -69,9 +69,7 @@ void cgi_function_intro(Cgi cgi) {
string http_request_type;
string http_host;
// string server_name;
- string web_doc_root_path;
- string doc_collection_sub_root;
- string cgi_root;
+ string doc_collection_subroot;
string cgi_script_name;
string cgi_search_form_title;
string cgi_search_form_html_title;
@@ -86,9 +84,7 @@ void cgi_function_intro(Cgi cgi) {
conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type);
conf.http_host = environment.get("SERVER_NAME", _cfg.http_host);
// conf.http_host = environment.get("HTTP_HOST", _cfg.http_host);
- conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root);
- conf.doc_collection_sub_root = "/spine/static"; // (output_path - web_doc_root_path)
- conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath);
+ conf.doc_collection_subroot = _cfg.www_doc_subroot;
conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename);
conf.cgi_search_form_title = _cfg.cgi_search_form_title; // ≅ SiSU spine search form
conf.cgi_search_form_html_title = "<a href=\""
@@ -97,7 +93,7 @@ void cgi_function_intro(Cgi cgi) {
~ "\">"
~ _cfg.cgi_search_form_title
~ "</a>";
- conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ "/" ~ conf.cgi_script_name ~ "?";
+ conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script_name ~ "?";
conf.query_string = environment.get("QUERY_STRING", "");
conf.http_url = environment.get("HTTP_REFERER", conf.query_base_url ~ conf.query_string);
conf.request_method = environment.get("REQUEST_METHOD", "POST");
@@ -1686,6 +1682,7 @@ SELECT
doc_objects.body,
doc_objects.seg_name,
doc_objects.ocn,
+ doc_objects.lev,
metadata_and_text.uid
FROM
doc_objects,
@@ -1736,7 +1733,7 @@ LIMIT %s OFFSET %s
~ "<hr><div class=\"publication\">"
~ "<p class=\"publication\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
~ row["src_filename_base"].as!string ~ "/"
~ "toc.html"
@@ -1753,16 +1750,16 @@ LIMIT %s OFFSET %s
);
}
if (cv.results_type == "txt") {
- if (row["ocn"].as!string != "0") {
+ if ((row["lev"].as!int < 4)
+ || (row["ocn"].as!string == "0")) {
cgi.write(
"<div class=\"flex-container\">"
~ "<div class=\"textview_ocn\" style=\"flex: 0 0 1.2em\">"
~ "<p class=\"ocn_is\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/"
- ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
+ ~ row["src_filename_base"].as!string ~ "/toc.html"
~ "\">"
~ row["ocn"].as!string
~ "</a>:</p>"
@@ -1778,9 +1775,10 @@ LIMIT %s OFFSET %s
~ "<div class=\"textview_ocn\" style=\"flex: 0 0 1.2em\">"
~ "<p class=\"ocn_is\"><a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/toc.html"
+ ~ row["src_filename_base"].as!string ~ "/"
+ ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
~ "\">"
~ row["ocn"].as!string
~ "</a>:</p>"
@@ -1792,15 +1790,15 @@ LIMIT %s OFFSET %s
);
}
} else {
- if (row["ocn"].as!string != "0") {
+ if ((row["lev"].as!int < 4)
+ || (row["ocn"].as!string == "0")) {
cgi.write(
_matched_ocn_open
~ "<a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/"
- ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
+ ~ row["src_filename_base"].as!string ~ "/toc.html"
~ "\">"
~ row["ocn"].as!string
~ "</a>, "
@@ -1810,9 +1808,10 @@ LIMIT %s OFFSET %s
_matched_ocn_open
~ "<a href=\""
~ conf.http_request_type ~ "://"
- ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
+ ~ conf.http_host ~ conf.doc_collection_subroot ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
- ~ row["src_filename_base"].as!string ~ "/toc.html"
+ ~ row["src_filename_base"].as!string ~ "/"
+ ~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
~ "\">"
~ row["ocn"].as!string
~ "</a>, "
diff --git a/sundry/spine_search_cgi/views/configuration.txt b/sundry/spine_search_cgi/views/configuration.txt
index e810d68..51a8963 100644
--- a/sundry/spine_search_cgi/views/configuration.txt
+++ b/sundry/spine_search_cgi/views/configuration.txt
@@ -1,10 +1,8 @@
struct Cfg {
string http_request_type = "http";
string http_host = "localhost";
- string www_url_doc_root = "http://localhost";
- string www_doc_root = "/srv/www/spine/static";
- string cgi_bin_subpath = "";
- string cgi_filename = "spine_search"; // "spine-search"
+ string www_doc_subroot = "/spine";
+ string cgi_filename = "spine_search";
string cgi_search_form_title = "≅ SiSU Spine search";
string db_sqlite_path = "/var/www/sqlite";
string db_sqlite_filename = "spine.search.db";
diff --git a/sundry/spine_search_cgi/views/configuration_example.txt b/sundry/spine_search_cgi/views/configuration_example.txt
index 3552861..ea43fde 100644
--- a/sundry/spine_search_cgi/views/configuration_example.txt
+++ b/sundry/spine_search_cgi/views/configuration_example.txt
@@ -2,10 +2,8 @@
struct Cfg {
string http_request_type = "http";
string http_host = "localhost";
- string www_url_doc_root = "http://localhost";
- string www_doc_root = "/srv/www/spine";
- string cgi_bin_subpath = "/cgi-bin";
- string cgi_filename = "spine_search"; // "spine-search"
+ string www_doc_subroot = "/spine";
+ string cgi_filename = "spine_search";
string cgi_search_form_title = "≅ SiSU Spine search";
string db_sqlite_path = "/var/www/sqlite";
string db_sqlite_filename = "spine.search.db";
diff --git a/views/configuration.txt b/views/configuration.txt
index 2a98b07..8d35668 100644
--- a/views/configuration.txt
+++ b/views/configuration.txt
@@ -2,7 +2,7 @@ struct Cfg {
string www_http = "http";
string www_host = "localhost";
string www_url_doc_root = "http://localhost";
- string www_doc_root = "/srv/www/spine/static";
+ string www_doc_root = "/srv/www/spine";
string www_host_doc_root = "localhost";
string cgi_bin_root = "/var/www/cgi/cgi-bin";
string cgi_bin_subpath = "";