diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-05-08 18:45:02 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-08-19 14:42:40 -0400 |
commit | 6b46ba599b7f687a592e2e50fdd007ed31319243 (patch) | |
tree | 9ba93fc931804a14506bae682eadaaef413f0024 /org/output_xmls.org | |
parent | book index sort: Aa-Zz (replaces A-Za-z) (diff) |
0.7.0 meta_abstruction, doc "has" struct replaces several tuples
Diffstat (limited to 'org/output_xmls.org')
-rw-r--r-- | org/output_xmls.org | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/org/output_xmls.org b/org/output_xmls.org index 21f4876..14d4f24 100644 --- a/org/output_xmls.org +++ b/org/output_xmls.org @@ -489,10 +489,10 @@ auto inline_links(O,M)( if (_xml_type == "seg" || _xml_type == "epub") { seg_lvs = (_xml_type == "epub") ? "seg_lv1_to_4" : "seg_lv4"; foreach (m; _txt.match(rgx.inline_link_hash)) { - if (m.captures[3] in doc_matters.xml.tag_associations) { + if (m.captures[3] in doc_matters.has.tag_associations) { if ( m.captures[3] - == doc_matters.xml.tag_associations[(m.captures[3])][seg_lvs] + == doc_matters.has.tag_associations[(m.captures[3])][seg_lvs] ) { _txt = _txt.replaceFirst( rgx.inline_link_hash, @@ -502,7 +502,7 @@ auto inline_links(O,M)( _txt = _txt.replaceFirst( rgx.inline_link_hash, "┥$1┝┤" - ~ doc_matters.xml.tag_associations[(m.captures[3])][seg_lvs] + ~ doc_matters.has.tag_associations[(m.captures[3])][seg_lvs] ~ _suffix ~ "#" ~ "$3" ~ "├" ); @@ -1486,7 +1486,7 @@ void scroll(D,M)( #+name: output_html_scroll #+BEGIN_SRC d - foreach (part; doc_matters.xml.keys_seq.scroll) { + foreach (part; doc_matters.has.keys_seq.scroll) { foreach (obj; doc_abstraction[part]) { delimit = xhtml_format.div_delimit(part, previous_part); string _txt = xhtml_format.special_characters(obj); @@ -1726,7 +1726,7 @@ void seg(D,M)( #+name: output_html_seg #+BEGIN_SRC d - foreach (part; doc_matters.xml.keys_seq.seg) { + foreach (part; doc_matters.has.keys_seq.seg) { foreach (obj; doc_abstraction[part]) { delimit = xhtml_format.div_delimit(part, previous_part); string _txt = xhtml_format.special_characters(obj); @@ -2022,7 +2022,7 @@ void seg_write_output(M,D,E)( if (!exists(pth_html.seg(doc_matters.src.filename))) { pth_html.seg(doc_matters.src.filename).mkdirRecurse; } - foreach (seg_filename; doc_matters.xml.segnames) { + foreach (seg_filename; doc_matters.has.segnames_lv4) { auto f = File(pth_html.fn_seg(doc_matters.src.filename, seg_filename), "w"); foreach (docseg; doc_html[seg_filename]) { f.writeln(docseg); @@ -2247,7 +2247,7 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { content ~= " " ~ "</guide>" ~ "\n "; content ~= "" ~ "</package>"; debug(epubmanifest) { - foreach (part; doc_matters.xml.keys_seq.seg) { // TODO + foreach (part; doc_matters.has.keys_seq.seg) { // TODO foreach (obj; doc_abstraction[part]) { if (obj.metainfo.is_a == "heading") { if (obj.metainfo.heading_lev_markup == 4) { @@ -2297,7 +2297,7 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { <nav epub:type=\"toc\" id=\"toc\">\n", doc_matters.conf_make_meta.meta.title_full, ); - foreach (sect; doc_matters.xml.keys_seq.seg) { + foreach (sect; doc_matters.has.keys_seq.seg) { foreach (obj; doc_abstraction[sect]) { if (obj.metainfo.is_a == "heading") { string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip; @@ -2403,7 +2403,7 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) { (doc_matters.conf_make_meta.meta.creator_author.empty) ? "" : doc_matters.conf_make_meta.meta.creator_author, // author ); - foreach (sect; doc_matters.xml.keys_seq.seg) { + foreach (sect; doc_matters.has.keys_seq.seg) { foreach (obj; doc_abstraction[sect]) { if (obj.metainfo.is_a == "heading") { string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip; @@ -2489,14 +2489,13 @@ void outputEPub3(D,I)( string[] doc_parts; } auto epubWrite = writeOut(); - // writeln(doc_matters.xml.keys_seq.seg); #+END_SRC **** ↻ the loop (sections & objects) format output #+name: output_epub3_xhtml_seg #+BEGIN_SRC d - foreach (part; doc_matters.xml.keys_seq.seg) { + foreach (part; doc_matters.has.keys_seq.seg) { foreach (obj; doc_abstraction[part]) { string _txt = xhtml_format.special_characters(obj); #+END_SRC @@ -2874,7 +2873,7 @@ void epub3_write_output_files(W,I)( } } { /+ OEBPS/[segments].xhtml (the document contents) +/ - foreach (seg_filename; doc_matters.xml.segnames_lv_0_to_4) { + foreach (seg_filename; doc_matters.has.segnames_lv_0_to_4) { string fn = pth_epub3.fn_oebps_content_xhtml(doc_matters.src.filename, seg_filename); auto zip_arc_member_file = new ArchiveMember(); zip_arc_member_file.name = fn; |