From 3fc4e5b88546121b881c98fbc3bed9c0e1c425c2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 20 Dec 2019 19:47:36 -0500 Subject: xmls, minor, internal links (metadata, images) --- org/out_metadata.org | 22 ++++++++--------- org/out_xmls.org | 67 ++++++++++++++++++++-------------------------------- 2 files changed, 36 insertions(+), 53 deletions(-) (limited to 'org') diff --git a/org/out_metadata.org b/org/out_metadata.org index f48d6ac..f3c069c 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -120,6 +120,17 @@ if (!(doc_matters.conf_make_meta.meta.notes_summary.empty)) { } else if (doc_matters.opt.action.debug_do) { writeln("WARNING no summary of text provided in document header ", doc_matters.src.filename_base); } +metadata_ ~= "

source: " ~ doc_matters.src.filename_base ~ "

"; +metadata_ ~= "

● markup source: [" + ~ " zipped pod ] " + ~ "[" + ~ " pod tree ]

"; +metadata_ ~= "

● outputs: [" + ~ " html scroll ] " + ~ "[" + ~ " html seg ]" + ~ "[" + ~ " epub ]

"; if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) { metadata_ ~= "

Topics:

"; string[] _top = ["", "", "", "", ""]; @@ -217,17 +228,6 @@ if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) { } else if (doc_matters.opt.action.debug_do) { writeln("WARNING no topic_register classification of text provided in document header ", doc_matters.src.filename_base); } -metadata_ ~= "

source: " ~ doc_matters.src.filename_base ~ "

"; -metadata_ ~= "

markup source: [" - ~ " zipped pod ] " - ~ "[" - ~ " pod tree ]

"; -metadata_ ~= "

outputs: [" - ~ " html scroll ] " - ~ "[" - ~ " html seg ]" - ~ "[" - ~ " epub ]

"; metadata_write_output(doc_matters, metadata_); #+END_SRC diff --git a/org/out_xmls.org b/org/out_xmls.org index 112f294..df095ec 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -245,7 +245,8 @@ string inline_search_form(M)( string o; string _form; if (doc_matters.opt.action.workon) { - _form = format(q"┃ + o = format(q"┃ +
@@ -257,17 +258,14 @@ string inline_search_form(M)(
+
┃", _action, _db, ); } else { - _form = format(q"┃%s┃", ""); + o = ""; } - o = format(q"┃
%s -
┃", - _form, - ); return o; } #+END_SRC @@ -279,18 +277,7 @@ string inline_search_form(M)( string html_head(M)( M doc_matters, string type, -) @safe { -string _manifest = ""; -if (doc_matters.opt.action.workon) { - _manifest = format(q"┃ - - - [ document manifest ] - - - ┃", - ); -} +) { string o; o = format(q"┃ @@ -303,7 +290,7 @@ if (doc_matters.opt.action.workon) { %s - + @@ -313,21 +300,27 @@ if (doc_matters.opt.action.workon) { %s
%s -
- %s%s┃", + %s%s┃", doc_matters.conf_make_meta.meta.title_full, (doc_matters.conf_make_meta.meta.creator_author.empty) ? "" : ", " ~ doc_matters.conf_make_meta.meta.creator_author, header_metadata(doc_matters), - ((type == "seg") ? "../../../" : "../../") ~ "image/rb7.ico", + ((type == "seg") ? "../" : ""), ((type == "seg") ? "../../../css/html_seg.css" : "../../css/html_scroll.css"), doc_matters.src.language, site_info_button(doc_matters), - _manifest, + ((doc_matters.opt.action.harvest_link) + ? format(q"┃

[ m | A | T ]

┃", + (type == "seg") ? "../" : "", + doc_matters.src.filename_base, + (type == "seg") ? "../" : "", + (type == "seg") ? "../" : "", + ) + : ""), inline_search_form(doc_matters), - ((type == "seg") ? "" : "\n"), + (type == "seg") ? "" : "\n", ); return o; } @@ -379,7 +372,7 @@ string epub3_seg_head(M)( - + @@ -435,12 +428,11 @@ string inline_images(O,M)( string _xml_type = "seg", ) @safe { string _img_pth; - if (_xml_type == "epub") { - _img_pth = "image/"; - } else if (_xml_type == "scroll") { - _img_pth = "../../image/"; - } else if (_xml_type == "seg") { - _img_pth = "../../../image/"; + switch (_xml_type) { + case "epub": _img_pth = "image/"; break; + case "scroll": _img_pth = format(q"┃%s/image/┃", "../.."); break; + case "seg": _img_pth = format(q"┃%s/image/┃", "../../.."); break; + default: break; } if (_txt.match(rgx.inline_image)) { _txt = _txt @@ -754,9 +746,6 @@ auto nav_pre_next_svg(O,M)( M doc_matters, ) @safe { string prev, next, toc; - string harvest_link = (doc_matters.opt.action.harvest_link) - ? format(q"┃

[ m | A | T ]

┃", doc_matters.src.filename_base) - : ""; if (obj.tags.segment_anchor_tag_epub == "toc") { toc = ""; prev = ""; @@ -796,9 +785,7 @@ auto nav_pre_next_svg(O,M)( obj.tags.segname_next, ); } - string _toc_pre_next = format(q"┃
- %s -
┃", - harvest_link, toc, prev, next, ); - string _pre_next = format(q"┃
- %s -
┃", - harvest_link, prev, next, ); -- cgit v1.2.3