diff options
Diffstat (limited to 'src/sdp/meta')
-rw-r--r-- | src/sdp/meta/conf_make_meta_sdlang.d | 12 | ||||
-rw-r--r-- | src/sdp/meta/defaults.d | 44 | ||||
-rw-r--r-- | src/sdp/meta/doc_debugs.d | 42 | ||||
-rw-r--r-- | src/sdp/meta/metadoc.d | 186 | ||||
-rw-r--r-- | src/sdp/meta/metadoc_from_src.d | 410 | ||||
-rw-r--r-- | src/sdp/meta/metadoc_summary.d | 8 | ||||
-rw-r--r-- | src/sdp/meta/read_config_files.d | 24 | ||||
-rw-r--r-- | src/sdp/meta/read_source_files.d | 43 | ||||
-rw-r--r-- | src/sdp/meta/rgx.d | 1 |
9 files changed, 419 insertions, 351 deletions
diff --git a/src/sdp/meta/conf_make_meta_sdlang.d b/src/sdp/meta/conf_make_meta_sdlang.d index 728f095..ef395d0 100644 --- a/src/sdp/meta/conf_make_meta_sdlang.d +++ b/src/sdp/meta/conf_make_meta_sdlang.d @@ -24,8 +24,8 @@ static template SiSUextractSDLang() { debug(asserts){ static assert(is(typeof(src_header) == char[])); } - char[][] source_header_arr = - (cast(char[]) src_header).split(rgx.newline_eol_delimiter); + char[][] source_header_arr + = (cast(char[]) src_header).split(rgx.newline_eol_delimiter); char[] _src_header; foreach(header_line; source_header_arr) { if (!match(header_line, rgx.comments)) { @@ -207,12 +207,12 @@ static template SiSUextractSDLang() { Tag _maintag = header_sdlang.getTag("title"); if (_maintag !is null) { if ("main" in _maintag.maybe.tags) { - _conf_composite.meta.title_main = - to!string(_maintag.getTagValues("main")); + _conf_composite.meta.title_main + = to!string(_maintag.getTagValues("main")); } else if ("main" !in _maintag.maybe.attributes) { writeln(_maintag.values[0]); // document title - _conf_composite.meta.title_main = - (_maintag.values[0]).to!string; // test that this exists + _conf_composite.meta.title_main + = (_maintag.values[0]).to!string; // test that this exists } } } diff --git a/src/sdp/meta/defaults.d b/src/sdp/meta/defaults.d index e598aa8..7f0586e 100644 --- a/src/sdp/meta/defaults.d +++ b/src/sdp/meta/defaults.d @@ -178,8 +178,8 @@ template SiSUregisters() { } return _conf_composite_string; } - static auto ptr_head_main = - [ + static auto ptr_head_main + = [ "classify", "creator", "date", @@ -191,24 +191,24 @@ template SiSUregisters() { "rights", "title" ]; - static auto ptr_head_sub_classify = - [ + static auto ptr_head_sub_classify + = [ "dewey", "keywords", "loc", "subject", "topic_register" ]; - static auto ptr_head_sub_creator = - [ + static auto ptr_head_sub_creator + = [ "author", "author_email", "cover", "illustrator", "translator" ]; - static auto ptr_head_sub_date = - [ + static auto ptr_head_sub_date + = [ "added_to_site", "available", "created", @@ -217,15 +217,15 @@ template SiSUregisters() { "published", "valid" ]; - static auto ptr_head_sub_identifier = - [ + static auto ptr_head_sub_identifier + = [ "isbn", "oclc", "pg" ]; /+ make +/ - static auto ptr_head_sub_make = - [ + static auto ptr_head_sub_make + = [ "cover_image", "home_button_image", "home_button_text", @@ -239,28 +239,28 @@ template SiSUregisters() { "texpdf_font", "css" ]; - static auto ptr_head_sub_notes = - [ + static auto ptr_head_sub_notes + = [ "abstract", "description" ]; - static auto ptr_head_sub_original = - [ + static auto ptr_head_sub_original + = [ "language", "source", "title" ]; - static auto ptr_head_sub_publisher = - [ "name" ]; - static auto ptr_head_sub_rights = - [ + static auto ptr_head_sub_publisher + = [ "name" ]; + static auto ptr_head_sub_rights + = [ "copyright", "cover", "illustrations", "license" ]; - static auto ptr_head_sub_title = - [ + static auto ptr_head_sub_title + = [ "edition", "full", "language", diff --git a/src/sdp/meta/doc_debugs.d b/src/sdp/meta/doc_debugs.d index 2b274a3..255ea92 100644 --- a/src/sdp/meta/doc_debugs.d +++ b/src/sdp/meta/doc_debugs.d @@ -37,7 +37,7 @@ template SiSUdebugs() { __FILE__, __LINE__, ); - foreach (key; doc_matters.keys_seq.seg) { + foreach (key; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[key]) { if (obj.of_part != "empty") { if (obj.is_a == "heading") { @@ -60,14 +60,16 @@ template SiSUdebugs() { __FILE__, __LINE__, ); - foreach (obj; contents[key]) { - if (obj.of_part != "empty") { - writefln( - "[%s][%s]\n%s", - obj.obj_cite_number, - obj.is_a, - obj.text - ); + if (key.length > 0) { + foreach (obj; contents[key]) { + if (obj.of_part != "empty") { + writefln( + "[%s][%s]\n%s", + obj.obj_cite_number, + obj.is_a, + obj.text + ); + } } } } @@ -115,7 +117,7 @@ template SiSUdebugs() { } debug(toc_nav_dom) { enum DomTags { none, open, close, close_and_open, open_still, } - foreach (sect; doc_matters.keys_seq.seg) { + foreach (sect; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[sect]) { if (obj.is_a == "heading") { foreach_reverse (k; 0 .. 7) { @@ -142,7 +144,7 @@ template SiSUdebugs() { } } writeln("--------------------"); - foreach (sect; doc_matters.keys_seq.seg) { + foreach (sect; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[sect]) { if (obj.is_a == "heading") { foreach_reverse (k; 0 .. 7) { @@ -401,7 +403,7 @@ template SiSUdebugs() { __FILE__, __LINE__, ); - foreach (k; doc_matters.keys_seq.seg) { + foreach (k; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[k]) { if (obj.is_a == "heading") { writefln( @@ -417,7 +419,7 @@ template SiSUdebugs() { } } debug(heading) { // heading - foreach (k; doc_matters.keys_seq.seg) { + foreach (k; doc_matters.xml.keys_seq.seg) { foreach (o; contents[k]) { if (o.is_a == "heading") { writefln( @@ -438,7 +440,7 @@ template SiSUdebugs() { __FILE__, __LINE__, ); - foreach (k; doc_matters.keys_seq.seg) { + foreach (k; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[k]) { if (obj.is_a == "heading") { writefln( @@ -458,10 +460,10 @@ template SiSUdebugs() { ]; } debug(checkdoc) { - if ((doc_matters.opt_action.do_debug)) { + if ((doc_matters.opt.action.debug_do)) { debug(checkdoc) { - if (auto mfn=match(doc_matters.source_filename, rgx.src_fn)) { - if (doc_matters.opt_action.assertions) { + if (auto mfn=match(doc_matters.src.filename, rgx.src_fn)) { + if (doc_matters.opt.action.assertions) { switch (mfn.captures[2]) { // live manual: case "live-manual.ssm": @@ -580,7 +582,7 @@ template SiSUdebugs() { // error in bookindex ... (ch7 ... building the cc machine, an extra semi colon) break; default: - writeln(doc_matters.source_filename); + writeln(doc_matters.src.filename); break; } } @@ -591,11 +593,11 @@ template SiSUdebugs() { auto return ref const S contents, auto return ref T doc_matters, ) { - foreach (key; doc_matters.keys_seq.seg) { + foreach (key; doc_matters.xml.keys_seq.seg) { if (contents[key].length > 1) { foreach (obj; contents[key]) { if (obj.heading_lev_markup == 4) { - writeln(obj.ptr_html_segnames, ". (", doc_matters.segnames[obj.ptr_html_segnames], ") -> ", obj.text); + writeln(obj.ptr_html_segnames, ". (", doc_matters.xml.segnames[obj.ptr_html_segnames], ") -> ", obj.text); } } } diff --git a/src/sdp/meta/metadoc.d b/src/sdp/meta/metadoc.d index 44807b2..129e53c 100644 --- a/src/sdp/meta/metadoc.d +++ b/src/sdp/meta/metadoc.d @@ -46,8 +46,8 @@ template SiSUabstraction() { ": step1 commence → (get document header & body & insert file list & if needed image list)" ); } - auto _header_body_insertfilelist_imagelist = - SiSUrawMarkupContent!()(_opt_action, _manifest.src_path_and_fn); + auto _header_body_insertfilelist_imagelist + = SiSUrawMarkupContent!()(_opt_action, _manifest.src.path_and_fn); static assert(!isTypeTuple!(_header_body_insertfilelist_imagelist)); static assert(_header_body_insertfilelist_imagelist.length==4); debug(steps) { @@ -64,8 +64,11 @@ template SiSUabstraction() { ": step2 commence → (doc header: make & meta as struct)" ); } - auto _make_and_meta_struct = - docHeaderMakeAndMetaTupExtractAndConvertToStruct!()(conf_files_composite_make, _header_body_insertfilelist_imagelist[headBody.header]); // breakage ... + auto _make_and_meta_struct + = docHeaderMakeAndMetaTupExtractAndConvertToStruct!()( + conf_files_composite_make, + _header_body_insertfilelist_imagelist[headBody.header] + ); // breakage ... debug(steps) { writeln(__LINE__, ":", __FILE__, ": step2 complete"); } @@ -92,84 +95,135 @@ template SiSUabstraction() { writeln(__LINE__, ":", __FILE__, ": step4 commence → (doc_matters)"); } struct DocumentMatters { - auto opt_action() { - /+ getopt options, commandline instructions, raw - - processing instructions --epub --html etc. - - command line config instructions --output-path - +/ - return _opt_action; - } auto conf_make_meta() { // TODO meld with all make instructions auto _k = _make_and_meta_struct; return _k; } - auto environment() { + auto env() { struct Env_ { auto pwd() { - return _manifest.pwd; + return _manifest.env.pwd; } auto home() { - return _manifest.home; + return _manifest.env.home; } } return Env_(); } - auto is_pod() { - return _manifest.is_pod; - } - auto source_filename() { - return _manifest.src_fn; + auto opt() { + struct Opt_ { + auto action() { + /+ getopt options, commandline instructions, raw + - processing instructions --epub --html etc. + - command line config instructions --output-path + +/ + return _opt_action; + } + } + return Opt_(); } - auto src_path_info() { // consider, reconsider? - auto _k = SiSUpathsSRC!()(_manifest.pwd, _manifest.src_fn); - return _k; + auto src() { + struct SRC_ { + auto is_pod() { + return _manifest.src.is_pod; + } + auto filename() { + return _manifest.src.filename; + } + auto language() { + return _manifest.src.lng; + } + auto path_info() { + auto _k = SiSUpathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path + return _k; + } + auto file_with_absolute_path() { + auto _k = _manifest.src.file_with_absolute_path; + return _k; + } + auto absolute_path_to_src() { + auto _k = _manifest.src.absolute_path_to_src; + return _k; + } + auto base_dir() { + auto _k = _manifest.src.base_dir; + return _k; + } + auto base_parent_dir_path() { + auto _k = _manifest.src.base_parent_dir_path; + return _k; + } + auto base_dir_path() { + auto _k = _manifest.src.base_dir_path; + return _k; + } + auto media_dir_path() { + auto _k = _manifest.src.media_dir_path; + return _k; + } + auto base_parent_dir() { + auto _k = _manifest.src.base_parent_dir; + return _k; + } + auto file_insert_list() { + string[] _k = _header_body_insertfilelist_imagelist[headBody.insert_file_list]; + return _k; + } + auto image_list() { + return _images; + } + } + return SRC_(); } - auto language() { - return _manifest.src_lng; + auto pod() { + struct Pod_ { + auto src_is_pod() { + return _manifest.pod.src_is_pod; + } + auto manifest_list_of_filenames() { + return _manifest.pod.manifest_list_of_filenames; + } + auto manifest_list_of_languages() { + return _manifest.pod.manifest_list_of_languages; + } + auto manifest_filename() { + return _manifest.pod.manifest_filename; + } + auto manifest_path() { + return _manifest.pod.manifest_path; + } + auto manifest_file_with_path() { + return _manifest.pod.manifest_file_with_path; + } + auto config_dirs() { + return _manifest.pod.config_dirs; + } + auto image_dirs() { + return _manifest.pod.image_dirs; + } + } + return Pod_(); + } + auto xml() { + struct XML_ { + auto keys_seq() { + /+ contains .seg & .scroll sequences +/ + auto _k = _document_section_keys_sequenced; + return _k; + } + string[] segnames() { + string[] _k = _doc_html_segnames; + return _k; + } + string[] segnames_lv_0_to_4() { + string[] _k = _doc_epub_segnames_0_4; + return _k; + } + } + return XML_(); } auto output_path() { - return _manifest.output_path; - } - auto pod_manifest_list_of_filenames() { - return _manifest.pod_manifest_list_of_filenames; - } - auto pod_manifest_list_of_languages() { - return _manifest.pod_manifest_list_of_languages; - } - auto pod_manifest_filename() { - return _manifest.pod_manifest_filename; - } - auto pod_manifest_path() { - return _manifest.pod_manifest_path; - } - auto pod_manifest_file_with_path() { - return _manifest.pod_manifest_file_with_path; - } - auto pod_config_dirs() { - return _manifest.pod_config_dirs; - } - auto pod_image_dirs() { - return _manifest.pod_image_dirs; - } - auto file_insert_list() { - string[] _k = _header_body_insertfilelist_imagelist[headBody.insert_file_list]; - return _k; - } - auto image_list() { - return _images; - } - auto keys_seq() { - /+ contains .seg & .scroll sequences +/ - auto _k = _document_section_keys_sequenced; - return _k; - } - string[] segnames() { - string[] _k = _doc_html_segnames; - return _k; - } - string[] segnames_lv_0_to_4() { - string[] _k = _doc_epub_segnames_0_4; - return _k; + return _manifest.output.path; } } auto doc_matters = DocumentMatters(); diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d index 917b66f..a8014e3 100644 --- a/src/sdp/meta/metadoc_from_src.d +++ b/src/sdp/meta/metadoc_from_src.d @@ -779,8 +779,8 @@ template SiSUdocAbstraction() { : ocn_emit(OCNstatus.on); // : ocn_emit(obj_type_status["ocn_status"]); an_object["is"] = "heading"; an_object_key="body_nugget"; - auto substantive_object_and_anchor_tags_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_object_and_anchor_tags_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_object_and_anchor_tags_tuple[sObj.content]; anchor_tags = substantive_object_and_anchor_tags_tuple[sObj.anchor_tags]; if (an_object["lev_markup_number"].to!int == 4) { @@ -814,10 +814,10 @@ template SiSUdocAbstraction() { break; } } - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to); + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to); /+ (incrementally build toc) table of contents here! +/ _anchor_tag=to!string(obj_cite_digits.on); the_table_of_contents_section = obj_im.table_of_contents_gather_headings( @@ -833,8 +833,8 @@ template SiSUdocAbstraction() { html_segnames_ptr = html_segnames_ptr_cntr; html_segnames_ptr_cntr++; } - auto comp_obj_heading = - node_construct.node_emitter_heading( + auto comp_obj_heading + = node_construct.node_emitter_heading( an_object["substantive"], // string an_object["lev"], // string an_object["lev_markup_number"], // string @@ -868,13 +868,13 @@ template SiSUdocAbstraction() { && (line_occur["para"] > State.off)) { /+ paragraph object (current line empty) +/ obj_cite_digits = ocn_emit(obj_type_status["ocn_status"]); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to); + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to); an_object["is"] = "para"; - auto comp_obj_heading = - node_construct.node_location_emitter( + auto comp_obj_heading + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -882,8 +882,8 @@ template SiSUdocAbstraction() { heading_ptr-1, an_object["is"], ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_para = comp_obj_para.init; @@ -968,8 +968,8 @@ template SiSUdocAbstraction() { } } /+ ← closed: loop markup document/text line by line +/ /+ ↓ post loop markup document/text +/ - auto en_tuple = - note_section.endnote_objects(obj_cite_digits, opt_action); + auto en_tuple + = note_section.endnote_objects(obj_cite_digits, opt_action); static assert(!isTypeTuple!(en_tuple)); auto the_endnotes_section = en_tuple[0]; obj_cite_digits = en_tuple[1]; @@ -1010,8 +1010,8 @@ template SiSUdocAbstraction() { } auto biblio_unsorted_incomplete = biblio_arr_json.dup; auto biblio = Bibliography(); - auto biblio_ordered = - biblio._bibliography_(biblio_unsorted_incomplete, bib_arr_json); + auto biblio_ordered + = biblio._bibliography_(biblio_unsorted_incomplete, bib_arr_json); if (biblio_ordered.length > 0) { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.of_part = "backmatter"; @@ -1104,8 +1104,8 @@ template SiSUdocAbstraction() { } } auto bi = BookIndexReportSection(); - auto bi_tuple = - bi.bookindex_build_abstraction_section( + auto bi_tuple + = bi.bookindex_build_abstraction_section( bookindex_unordered_hashes, obj_cite_digits, opt_action, @@ -1894,8 +1894,8 @@ template SiSUdocAbstraction() { obj_type_status["ocn_status"] = OCNstatus.on; } } else { - obj_type_status["ocn_status"] = - obj_type_status["ocn_status_off_for_multiple_objects"]; + obj_type_status["ocn_status"] + = obj_type_status["ocn_status_off_for_multiple_objects"]; } } } else if ((!line.empty) && (obj_type_status["ocn_status_off_for_multiple_objects"] > TriState.off)) { @@ -2250,8 +2250,8 @@ template SiSUdocAbstraction() { ); } an_object["is"] = "verse"; - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; @@ -2308,8 +2308,8 @@ template SiSUdocAbstraction() { heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; @@ -2351,8 +2351,8 @@ template SiSUdocAbstraction() { } processing.remove("verse"); an_object["is"] = "verse"; - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; @@ -2400,8 +2400,8 @@ template SiSUdocAbstraction() { } processing.remove("verse"); an_object["is"] = "verse"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -2409,8 +2409,8 @@ template SiSUdocAbstraction() { heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; @@ -2631,8 +2631,8 @@ template SiSUdocAbstraction() { } switch (biblio_tag_name) { case "author_raw": // author_arr author (fn sn) - j["author_arr"] = - header_tag_value.split(rgx.arr_delimiter); + j["author_arr"] + = header_tag_value.split(rgx.arr_delimiter); string tmp; biblioAuthorLoop: foreach (au; j["author_arr"].array) { @@ -2646,8 +2646,8 @@ template SiSUdocAbstraction() { j["author"].str = tmp; goto default; case "editor_raw": // editor_arr editor (fn sn) - j["editor_arr"] = - header_tag_value.split(rgx.arr_delimiter); + j["editor_arr"] + = header_tag_value.split(rgx.arr_delimiter); string tmp; biblioEditorLoop: foreach (ed; j["editor_arr"].array) { @@ -2701,8 +2701,8 @@ template SiSUdocAbstraction() { ) { comp_obj_block = comp_obj_block.init; obj_cite_digits = ocn_emit(OCNstatus.on); - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -2711,8 +2711,8 @@ template SiSUdocAbstraction() { "table" ); an_object["is"] = "table"; - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; comp_obj_block.ocn = obj_cite_digits.on; comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; @@ -2751,17 +2751,17 @@ template SiSUdocAbstraction() { assertions_flag_types_block_status_none_or_closed(obj_type_status); if (obj_type_status["quote"] == TriState.closing) { obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "quote"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -2769,8 +2769,8 @@ template SiSUdocAbstraction() { heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; @@ -2795,17 +2795,17 @@ template SiSUdocAbstraction() { ++cntr; } else if (obj_type_status["group"] == TriState.closing) { obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "group"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -2813,8 +2813,8 @@ template SiSUdocAbstraction() { heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; @@ -2839,17 +2839,17 @@ template SiSUdocAbstraction() { ++cntr; } else if (obj_type_status["block"] == TriState.closing) { obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "block"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -2857,8 +2857,8 @@ template SiSUdocAbstraction() { heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; comp_obj_block = comp_obj_block.init; comp_obj_block.of_part = "body"; @@ -2881,17 +2881,17 @@ template SiSUdocAbstraction() { processing.remove("verse"); ++cntr; } else if (obj_type_status["poem"] == TriState.closing) { - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "verse"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -2917,17 +2917,17 @@ template SiSUdocAbstraction() { processing.remove("verse"); } else if (obj_type_status["code"] == TriState.closing) { obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "code"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -2935,8 +2935,8 @@ template SiSUdocAbstraction() { heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_code = comp_obj_code.init; @@ -2962,17 +2962,17 @@ template SiSUdocAbstraction() { } else if (obj_type_status["table"] == TriState.closing) { comp_obj_block = comp_obj_block.init; obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + =("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "table"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -2980,9 +2980,9 @@ template SiSUdocAbstraction() { heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); - an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; + auto substantive_obj_misc_tuple + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; comp_obj_block = comp_obj_block.init; comp_obj_block.ocn = obj_cite_digits.on; comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; @@ -3078,8 +3078,8 @@ template SiSUdocAbstraction() { debug(headingsfound) { writeln(dochead_make_identify_unmarked_headings); } - char[][] make_headings_spl = - (cast(char[]) dochead_make_identify_unmarked_headings) + char[][] make_headings_spl + = (cast(char[]) dochead_make_identify_unmarked_headings) .split(rgx.make_heading_delimiter); debug(headingsfound) { writeln(make_headings_spl.length); @@ -3088,58 +3088,58 @@ template SiSUdocAbstraction() { switch (make_headings_spl.length) { case 7 : if (!empty(make_headings_spl[6])) { - heading_match_str["h_4"] = - "^(" ~ make_headings_spl[6].to!string ~ ")"; - heading_match_rgx["h_4"] = - regex(heading_match_str["h_4"]); + heading_match_str["h_4"] + = "^(" ~ make_headings_spl[6].to!string ~ ")"; + heading_match_rgx["h_4"] + = regex(heading_match_str["h_4"]); } goto case; case 6 : if (!empty(make_headings_spl[5])) { - heading_match_str["h_3"] = - "^(" ~ make_headings_spl[5].to!string ~ ")"; - heading_match_rgx["h_3"] = - regex(heading_match_str["h_3"]); + heading_match_str["h_3"] + = "^(" ~ make_headings_spl[5].to!string ~ ")"; + heading_match_rgx["h_3"] + = regex(heading_match_str["h_3"]); } goto case; case 5 : if (!empty(make_headings_spl[4])) { - heading_match_str["h_2"] = - "^(" ~ make_headings_spl[4].to!string ~ ")"; - heading_match_rgx["h_2"] = - regex(heading_match_str["h_2"]); + heading_match_str["h_2"] + = "^(" ~ make_headings_spl[4].to!string ~ ")"; + heading_match_rgx["h_2"] + = regex(heading_match_str["h_2"]); } goto case; case 4 : if (!empty(make_headings_spl[3])) { - heading_match_str["h_1"] = - "^(" ~ make_headings_spl[3].to!string ~ ")"; - heading_match_rgx["h_1"] = - regex(heading_match_str["h_1"]); + heading_match_str["h_1"] + = "^(" ~ make_headings_spl[3].to!string ~ ")"; + heading_match_rgx["h_1"] + = regex(heading_match_str["h_1"]); } goto case; case 3 : if (!empty(make_headings_spl[2])) { - heading_match_str["h_D"] = - "^(" ~ make_headings_spl[2].to!string ~ ")"; - heading_match_rgx["h_D"] = - regex(heading_match_str["h_D"]); + heading_match_str["h_D"] + = "^(" ~ make_headings_spl[2].to!string ~ ")"; + heading_match_rgx["h_D"] + = regex(heading_match_str["h_D"]); } goto case; case 2 : if (!empty(make_headings_spl[1])) { - heading_match_str["h_C"] = - "^(" ~ make_headings_spl[1].to!string ~ ")"; - heading_match_rgx["h_C"] = - regex(heading_match_str["h_C"]); + heading_match_str["h_C"] + = "^(" ~ make_headings_spl[1].to!string ~ ")"; + heading_match_rgx["h_C"] + = regex(heading_match_str["h_C"]); } goto case; case 1 : if (!empty(make_headings_spl[0])) { - heading_match_str["h_B"] = - "^(" ~ make_headings_spl[0].to!string ~ ")"; - heading_match_rgx["h_B"] = - regex(heading_match_str["h_B"]); + heading_match_str["h_B"] + = "^(" ~ make_headings_spl[0].to!string ~ ")"; + heading_match_rgx["h_B"] + = regex(heading_match_str["h_B"]); } break; default: @@ -3252,8 +3252,8 @@ template SiSUdocAbstraction() { .replaceFirst(rgx.variable_doc_author, conf_make_meta.meta.creator_author); collapsed_lev["h0"] = 0; - an_object["lev_collapsed_number"] = - collapsed_lev["h0"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h0"].to!string; lv["lv"] = DocStructMarkupHeading.h_sect_A; ++lv["h0"]; lv["h1"] = State.off; @@ -3266,8 +3266,8 @@ template SiSUdocAbstraction() { goto default; case "B": collapsed_lev["h1"] = collapsed_lev["h0"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h1"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h1"].to!string; lv["lv"] = DocStructMarkupHeading.h_sect_B; ++lv["h1"]; lv["h2"] = State.off; @@ -3279,8 +3279,8 @@ template SiSUdocAbstraction() { goto default; case "C": collapsed_lev["h2"] = collapsed_lev["h1"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h2"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h2"].to!string; lv["lv"] = DocStructMarkupHeading.h_sect_C; ++lv["h2"]; lv["h3"] = State.off; @@ -3291,8 +3291,8 @@ template SiSUdocAbstraction() { goto default; case "D": collapsed_lev["h3"] = collapsed_lev["h2"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h3"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h3"].to!string; lv["lv"] = DocStructMarkupHeading.h_sect_D; ++lv["h3"]; lv["h4"] = State.off; @@ -3310,8 +3310,8 @@ template SiSUdocAbstraction() { } else if (lv["h0"] > State.off) { collapsed_lev["h4"] = collapsed_lev["h0"] + 1; } - an_object["lev_collapsed_number"] = - collapsed_lev["h4"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h4"].to!string; lv["lv"] = DocStructMarkupHeading.h_text_1; ++lv["h4"]; lv["h5"] = State.off; @@ -3320,12 +3320,12 @@ template SiSUdocAbstraction() { goto default; case "2": if (lv["h5"] > State.off) { - an_object["lev_collapsed_number"] = - collapsed_lev["h5"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h5"].to!string; } else if (lv["h4"] > State.off) { collapsed_lev["h5"] = collapsed_lev["h4"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h5"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h5"].to!string; } lv["lv"] = DocStructMarkupHeading.h_text_2; ++lv["h5"]; @@ -3334,12 +3334,12 @@ template SiSUdocAbstraction() { goto default; case "3": if (lv["h6"] > State.off) { - an_object["lev_collapsed_number"] = - collapsed_lev["h6"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h6"].to!string; } else if (lv["h5"] > State.off) { collapsed_lev["h6"] = collapsed_lev["h5"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h6"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h6"].to!string; } lv["lv"] = DocStructMarkupHeading.h_text_3; ++lv["h6"]; @@ -3347,12 +3347,12 @@ template SiSUdocAbstraction() { goto default; case "4": if (lv["h7"] > State.off) { - an_object["lev_collapsed_number"] = - collapsed_lev["h7"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h7"].to!string; } else if (lv["h6"] > State.off) { collapsed_lev["h7"] = collapsed_lev["h6"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h7"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h7"].to!string; } lv["lv"] = DocStructMarkupHeading.h_text_4; ++lv["h7"]; @@ -3818,8 +3818,8 @@ template SiSUdocAbstraction() { rgx.inline_notes_curly_sp_asterisk, (mkup.en_a_o ~ "*" ~ " $1" ~ mkup.en_a_c) ); - obj_txt_in = - obj_txt_in.replaceAll( + obj_txt_in + = obj_txt_in.replaceAll( rgx.inline_notes_curly_sp_plus, (mkup.en_a_o ~ "+" ~ " $1" ~ mkup.en_a_c) ); @@ -4313,7 +4313,7 @@ template SiSUdocAbstraction() { heading_num_3 = 0; } else if ( heading_num_top_level - == obj_["lev_markup_number"].to!uint + == obj_["lev_markup_number"].to!uint ) { heading_num_0 ++; heading_num_1 = 0; @@ -4321,26 +4321,26 @@ template SiSUdocAbstraction() { heading_num_3 = 0; } else if ( heading_num_top_level - == (obj_["lev_markup_number"].to!uint - 1) + == (obj_["lev_markup_number"].to!uint - 1) ) { heading_num_1 ++; heading_num_2 = 0; heading_num_3 = 0; } else if ( heading_num_top_level - == (obj_["lev_markup_number"].to!uint - 2) + == (obj_["lev_markup_number"].to!uint - 2) ) { heading_num_2 ++; heading_num_3 = 0; } else if ( heading_num_top_level - == (obj_["lev_markup_number"].to!uint - 3) + == (obj_["lev_markup_number"].to!uint - 3) ) { heading_num_3 ++; } if (heading_num_3 > 0) { - heading_number_auto_composite = - (heading_num_depth == 3) + heading_number_auto_composite + = (heading_num_depth == 3) ? ( heading_num_0.to!string ~ "." ~ heading_num_1.to!string ~ "." ~ heading_num_2.to!string ~ "." @@ -4348,8 +4348,8 @@ template SiSUdocAbstraction() { ) : ""; } else if (heading_num_2 > 0) { - heading_number_auto_composite = - ((heading_num_depth >= 2) + heading_number_auto_composite + = ((heading_num_depth >= 2) && (heading_num_depth <= 3)) ? ( heading_num_0.to!string ~ "." ~ heading_num_1.to!string ~ "." @@ -4357,16 +4357,16 @@ template SiSUdocAbstraction() { ) : ""; } else if (heading_num_1 > 0) { - heading_number_auto_composite = - ((heading_num_depth >= 1) + heading_number_auto_composite + = ((heading_num_depth >= 1) && (heading_num_depth <= 3)) ? ( heading_num_0.to!string ~ "." ~ heading_num_1.to!string ) : ""; } else if (heading_num_0 > 0) { - heading_number_auto_composite = - ((heading_num_depth >= 0) + heading_number_auto_composite + = ((heading_num_depth >= 0) && (heading_num_depth <= 3)) ? (heading_num_0.to!string) : ""; @@ -4706,10 +4706,10 @@ template SiSUdocAbstraction() { oa_j.object["obj_cite_number"] = _comp_obj_heading.ocn; oa_j.object["lev_markup_number"] = _comp_obj_heading.heading_lev_markup; oa_j.object["lev_collapsed_number"] = _comp_obj_heading.heading_lev_collapsed; - oa_j.object["heading_ptr"] = - _comp_obj_heading.ptr_heading; - oa_j.object["doc_object_ptr"] = - _comp_obj_heading.ptr_doc_object; + oa_j.object["heading_ptr"] + = _comp_obj_heading.ptr_heading; + oa_j.object["doc_object_ptr"] + = _comp_obj_heading.ptr_doc_object; } oa_j.object["parent_obj_cite_number"] = _comp_obj_heading.parent_ocn; oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.parent_lev_markup; @@ -4747,11 +4747,11 @@ template SiSUdocAbstraction() { body { static auto rgx = Rgx(); if (!bookindex_section.empty) { - auto bi_main_terms_split_arr = - bookindex_section.split(rgx.bi_main_terms_split); + auto bi_main_terms_split_arr + = bookindex_section.split(rgx.bi_main_terms_split); foreach (bi_main_terms_content; bi_main_terms_split_arr) { - auto bi_main_term_and_rest = - bi_main_terms_content.split(rgx.bi_main_term_plus_rest_split); + auto bi_main_term_and_rest + = bi_main_terms_content.split(rgx.bi_main_term_plus_rest_split); if (auto m = bi_main_term_and_rest[0].match( rgx.bi_term_and_obj_cite_numbers_match) ) { @@ -4768,8 +4768,8 @@ template SiSUdocAbstraction() { bi[main_term]["_a"] ~= obj_cite_numbers; obj_cite_numbers=null; if (bi_main_term_and_rest.length > 1) { - auto bi_sub_terms_split_arr = - bi_main_term_and_rest[1].split( + auto bi_sub_terms_split_arr + = bi_main_term_and_rest[1].split( rgx.bi_sub_terms_plus_obj_cite_number_offset_split ); foreach (sub_terms_bits; bi_sub_terms_split_arr) { @@ -4806,14 +4806,14 @@ template SiSUdocAbstraction() { debug(asserts) { static assert(is(typeof(bookindex_unordered_hashes) == string[][string][string])); } - auto mainkeys= - bookindex_unordered_hashes.byKey.array.sort().release; + auto mainkeys + = bookindex_unordered_hashes.byKey.array.sort().release; foreach (mainkey; mainkeys) { debug(bookindex1) { writeln(mainkey); } - auto subkeys= - bookindex_unordered_hashes[mainkey].byKey.array.sort().release; + auto subkeys + = bookindex_unordered_hashes[mainkey].byKey.array.sort().release; foreach (subkey; subkeys) { debug(bookindex1) { writeln(" ", subkey); @@ -4846,8 +4846,8 @@ template SiSUdocAbstraction() { } writeln(" \\\\"); bookindex_unordered_hashes[mainkey].remove("_a"); - auto subkeys= - bookindex_unordered_hashes[mainkey].byKey.array.sort().release; + auto subkeys + = bookindex_unordered_hashes[mainkey].byKey.array.sort().release; foreach (subkey; subkeys) { write(" ", subkey, ", "); foreach (ref_; bookindex_unordered_hashes[mainkey][subkey]) { @@ -4877,8 +4877,8 @@ template SiSUdocAbstraction() { int heading_lev_markup, heading_lev_collapsed; string attrib; int[string] indent; - auto mainkeys = - bookindex_unordered_hashes.byKey.array.sort().release; + auto mainkeys + = bookindex_unordered_hashes.byKey.array.sort().release; ObjGenericComposite[][string] bookindex_section; ObjGenericComposite comp_obj_heading_, comp_obj_para; auto node_para_int_ = node_metadata_para_int; @@ -4941,8 +4941,8 @@ template SiSUdocAbstraction() { auto bkidx_lnk_seg(string locs) { string markup = ""; if (auto m = locs.matchFirst(rgx.book_index_go_seg)) { - markup = - munge.url_links("{ " ~ m["link"] ~ " }" + markup + = munge.url_links("{ " ~ m["link"] ~ " }" ~ mkup.mark_internal_site_lnk ~ m["seg"] ~ ".fnSuffix" ~ "#" ~ m["ocn"] ~ ", "); } else { @@ -4953,8 +4953,8 @@ template SiSUdocAbstraction() { auto bkidx_lnk_scroll(string locs) { string markup = ""; if (auto m = locs.matchFirst(rgx.book_index_go)) { - markup = - munge.url_links("{ " ~ m["link"] ~ " }" + markup + = munge.url_links("{ " ~ m["link"] ~ " }" ~ mkup.mark_internal_site_lnk ~ "#" ~ m["ocn"] ~ ", "); } else { @@ -4969,8 +4969,8 @@ template SiSUdocAbstraction() { bi_tmp_scroll ~= " \\\\\n "; bi_tmp_seg ~= " \\\\\n "; bookindex_unordered_hashes[mainkey].remove("_a"); - auto subkeys = - bookindex_unordered_hashes[mainkey].byKey.array.sort().release; + auto subkeys + = bookindex_unordered_hashes[mainkey].byKey.array.sort().release; foreach (subkey; subkeys) { bi_tmp_scroll ~= subkey ~ ", "; buffer.clear(); @@ -5214,8 +5214,8 @@ template SiSUdocAbstraction() { } } body { - JSONValue[] biblio_unsorted = - _biblio_unsorted_complete_(biblio_unsorted_incomplete, bib_arr_json); + JSONValue[] biblio_unsorted + = _biblio_unsorted_complete_(biblio_unsorted_incomplete, bib_arr_json); biblio_arr_json = []; biblio_unsorted_incomplete = []; JSONValue[] biblio_sorted__ = biblio_sort(biblio_unsorted); @@ -5265,8 +5265,8 @@ template SiSUdocAbstraction() { } bib_arr_json ~= j; } - JSONValue[] biblio_unsorted_array_of_json_objects = - bib_arr_json.dup; + JSONValue[] biblio_unsorted_array_of_json_objects + = bib_arr_json.dup; destroy(bib_arr_json); return biblio_unsorted_array_of_json_objects; } @@ -5275,8 +5275,8 @@ template SiSUdocAbstraction() { static assert(is(typeof(biblio_unordered) == JSONValue[])); } JSONValue[] biblio_sorted_; - biblio_sorted_ = - sort!((a, b){ + biblio_sorted_ + = sort!((a, b){ return ((a["sortby_deemed_author_year_title"].str) < (b["sortby_deemed_author_year_title"].str)); })(biblio_unordered).array; debug(bibliosorted) { @@ -5426,24 +5426,24 @@ template SiSUdocAbstraction() { lv = DocStructMarkupHeading.h_sect_B; lv1 = obj_cite_digit; lv2=0; lv3=0; lv4=0; lv5=0; lv6=0; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_A; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_A; p_["obj_cite_number"] = lv0; break; case 2: lv = DocStructMarkupHeading.h_sect_C; lv2 = obj_cite_digit; lv3=0; lv4=0; lv5=0; lv6=0; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_B; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_B; p_["obj_cite_number"] = lv1; break; case 3: lv = DocStructMarkupHeading.h_sect_D; lv3=obj_cite_digit; lv4=0; lv5=0; lv6=0; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_C; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_C; p_["obj_cite_number"] = lv2; break; case 4: @@ -5451,20 +5451,20 @@ template SiSUdocAbstraction() { lv4 = obj_cite_digit; lv5=0; lv6=0; lv7=0; if (lv3 > State.off) { - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_D; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_D; p_["obj_cite_number"] = lv3; } else if (lv2 > State.off) { - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_C; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_C; p_["obj_cite_number"] = lv2; } else if (lv1 > State.off) { - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_B; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_B; p_["obj_cite_number"] = lv1; } else { - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_A; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_A; p_["obj_cite_number"] = lv0; } break; @@ -5472,23 +5472,23 @@ template SiSUdocAbstraction() { lv = DocStructMarkupHeading.h_text_2; lv5 = obj_cite_digit; lv6=0; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_text_1; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_text_1; p_["obj_cite_number"] = lv4; break; case 6: lv = DocStructMarkupHeading.h_text_3; lv6 = obj_cite_digit; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_text_2; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_text_2; p_["obj_cite_number"] = lv5; break; case 7: lv = DocStructMarkupHeading.h_text_4; lv7 = obj_cite_digit; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_text_3; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_text_3; p_["obj_cite_number"] = lv6; break; default: diff --git a/src/sdp/meta/metadoc_summary.d b/src/sdp/meta/metadoc_summary.d index c1e3f76..ac2477e 100644 --- a/src/sdp/meta/metadoc_summary.d +++ b/src/sdp/meta/metadoc_summary.d @@ -2,7 +2,7 @@ module sdp.meta.metadoc_summary; template SiSUabstractionSummary() { auto SiSUabstractionSummary(S,T)( auto return ref const S doc_abstraction, - auto return ref T doc_matters, + auto return ref T doc_matters, ) { import sdp.meta.defaults, @@ -20,13 +20,13 @@ template SiSUabstractionSummary() { std.conv : to; mixin InternalMarkup; auto markup = InlineMarkup(); - if (doc_matters.opt_action.verbose) { + if (doc_matters.opt.action.verbose) { string[string] check = [ "last_obj_cite_number" : "NA [debug \"checkdoc\" not run]", "last_obj_cite_number_body" : "0", "last_obj_cite_number_bkidx" : "0", ]; - foreach (k; doc_matters.keys_seq.seg) { + foreach (k; doc_matters.xml.keys_seq.seg) { foreach (obj; doc_abstraction[k]) { if (obj.of_part != "empty") { if (!empty(obj.obj_cite_number)) { @@ -56,7 +56,7 @@ template SiSUabstractionSummary() { markup.repeat_character_by_number_provided("-", char_repeat_number), doc_matters.conf_make_meta.meta.title_full, doc_matters.conf_make_meta.meta.creator_author, - doc_matters.source_filename, + doc_matters.src.filename, markup.repeat_character_by_number_provided("-", char_repeat_number), "length toc arr:", to!int(doc_abstraction["toc_seg"].length), diff --git a/src/sdp/meta/read_config_files.d b/src/sdp/meta/read_config_files.d index 57aba7f..52446e8 100644 --- a/src/sdp/meta/read_config_files.d +++ b/src/sdp/meta/read_config_files.d @@ -12,9 +12,13 @@ static template configInSite() { std.path; final string configInSite(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_site; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations_local_site; + string conf_sdl = conf_file_details.possible_config_path_locations.config_filename_site; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations.local_site; string config_file_str; + debug(io) { + writeln("in config filename: ", conf_sdl); + writeln("in config possible path locations: ", possible_config_path_locations); + } foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { @@ -22,8 +26,8 @@ static template configInSite() { } try { if (exists(conf_file)) { - debug(configfile) { - writeln(conf_file); + debug(io) { + writeln("in config file found: ", conf_file); } config_file_str = conf_file.readText; break; @@ -46,8 +50,12 @@ static template configInDoc() { final string configInDoc(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); string conf_sdl = conf_file_details.config_filename_document; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations_document; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations.document; string config_file_str; + debug(io) { + writeln("in config filename: ", conf_sdl); + writeln("in config possible path locations: ", possible_config_path_locations); + } foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { @@ -55,8 +63,8 @@ static template configInDoc() { } try { if (exists(conf_file)) { - debug(configfile) { - writeln(conf_file); + debug(io) { + writeln("in config file found: ", conf_file); } config_file_str = conf_file.readText; break; @@ -104,7 +112,7 @@ static template configReadSite() { final auto configReadSite(M,E)(M manifest, E env) { auto configuration = configInSite!()(manifest, env); auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_site; + string conf_sdl = conf_file_details.possible_config_path_locations.config_filename_site; auto sdl_root = ConfigSDLang!()(configuration, conf_sdl); return sdl_root; } diff --git a/src/sdp/meta/read_source_files.d b/src/sdp/meta/read_source_files.d index 95a9dbe..0e53e73 100644 --- a/src/sdp/meta/read_source_files.d +++ b/src/sdp/meta/read_source_files.d @@ -25,37 +25,37 @@ static template SiSUrawMarkupContent() { } auto rawsrc = RawMarkupContent(); auto SiSUrawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) { - auto _0_header_1_body_content_2_insert_filelist_tuple = - rawsrc.sourceContentSplitIntoHeaderAndBody(_opt_action, rawsrc.sourceContent(fn_src), fn_src); + auto _0_header_1_body_content_2_insert_filelist_tuple + = rawsrc.sourceContentSplitIntoHeaderAndBody(_opt_action, rawsrc.sourceContent(fn_src), fn_src); return _0_header_1_body_content_2_insert_filelist_tuple; } struct RawMarkupContent { final sourceContent(in string fn_src) { auto raw = MarkupRawUnit(); - auto source_txt_str = - raw.markupSourceReadIn(fn_src); + auto source_txt_str + = raw.markupSourceReadIn(fn_src); return source_txt_str; } final auto sourceContentSplitIntoHeaderAndBody(O)(O _opt_action, in string source_txt_str, in string fn_src="") { auto raw = MarkupRawUnit(); string[] insert_file_list; string[] images_list; - auto t = - raw.markupSourceHeaderContentRawLineTupleArray(source_txt_str); + auto t + = raw.markupSourceHeaderContentRawLineTupleArray(source_txt_str); auto header_raw = t[0]; auto sourcefile_body_content = t[1]; if (fn_src.match(rgx.src_fn_master)) { // filename with path needed if master file (.ssm) not otherwise auto ins = Inserts(); - auto tu = - ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); + auto tu + = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); static assert(!isTypeTuple!(tu)); sourcefile_body_content = tu[0]; insert_file_list = tu[1].dup; images_list = tu[2].dup; } else if (_opt_action.source || _opt_action.sisupod) { auto ins = Inserts(); - auto tu = - ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); + auto tu + = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); static assert(!isTypeTuple!(tu)); images_list = tu[2].dup; } @@ -80,6 +80,9 @@ static template SiSUrawMarkupContent() { string source_txt_str; try { if (exists(fn_src)) { + debug(io) { + writeln("in src, markup source file found: ", fn_src); + } source_txt_str = fn_src.readText; } } @@ -108,8 +111,8 @@ static template SiSUrawMarkupContent() { return header_and_content; } final private char[][] markupSourceLineArray(in char[] src_text) { - char[][] source_line_arr = - (cast(char[]) src_text).split(rgx.newline_eol_strip_preceding); + char[][] source_line_arr + = (cast(char[]) src_text).split(rgx.newline_eol_strip_preceding); return source_line_arr; } auto markupSourceReadIn(in string fn_src) { @@ -205,11 +208,11 @@ static template SiSUrawMarkupContent() { type1["header_meta"] = 0; auto insert_fn = m.captures[2]; auto insert_sub_pth = m.captures[1]; - auto fn_src_insert = - chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array; + auto fn_src_insert + = chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array; auto raw = MarkupRawUnit(); - auto markup_sourcesubfile_insert_content = - raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts); + auto markup_sourcesubfile_insert_content + = raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts); debug(insert_file) { tell_l("red", line); tell_l("red", fn_src_insert); @@ -285,8 +288,8 @@ static template SiSUrawMarkupContent() { } else if (auto m = line.match(rgx.insert_src_fn_ssi_or_sst)) { auto insert_fn = m.captures[2]; auto insert_sub_pth = m.captures[1]; - auto fn_src_insert = - chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array; + auto fn_src_insert + = chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array; insert_file_list ~= to!string(fn_src_insert); auto raw = MarkupRawUnit(); /+ TODO +/ @@ -294,8 +297,8 @@ static template SiSUrawMarkupContent() { /+ .sst when inserted, not used: headers and heading level ^:?A~ so remove +/ writeln(__LINE__); writeln(ma); } - auto markup_sourcefile_insert_content = - raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts); + auto markup_sourcefile_insert_content + = raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts); debug(insert_file) { tell_l("red", line); tell_l("red", fn_src_insert); diff --git a/src/sdp/meta/rgx.d b/src/sdp/meta/rgx.d index 37db8e7..c196ad2 100644 --- a/src/sdp/meta/rgx.d +++ b/src/sdp/meta/rgx.d @@ -211,6 +211,7 @@ static template SiSUrgxInit() { 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 src_base_parent_dir_name = ctRegex!(`[/](?P<dir>(?:[a-zA-Z0-9._-]+))(?:/media/text/[a-z]{2})$`); // formalizes dir structure /+ inline markup footnotes endnotes +/ static inline_notes_al = ctRegex!(`【(?:[*+]\s+|\s*)(.+?)】`, "mg"); static inline_notes_al_gen = ctRegex!(`【.+?】`, "m"); |