diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2022-01-25 14:36:59 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2022-01-25 20:58:41 -0500 |
commit | 3c2da303eed87e506533c738c1bcfda154944790 (patch) | |
tree | 0e5125110e58ef64ce13a980b281328f325740c6 /org/out_xmls.org | |
parent | metadata, topic register to json removed, unused (diff) |
doc presentation, add option to include date with title and author
Diffstat (limited to 'org/out_xmls.org')
-rw-r--r-- | org/out_xmls.org | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/org/out_xmls.org b/org/out_xmls.org index ca202c4..ef96b34 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -34,6 +34,7 @@ template outputXHTMLs() { static auto rgx = RgxO(); <<xhtml_format_objects_div_delimit>> <<xhtml_format_objects_special_characters_text>> + <<xhtml_format_objects_special_characters_date>> <<xhtml_format_objects_breaks_indents_bullets>> <<xhtml_format_objects_font_face>> <<xhtml_format_objects_xml_anchor_tags>> @@ -158,6 +159,22 @@ import .replaceAll(rgx.xhtml_quotation, """) // """ .replaceAll(rgx.xhtml_less_than, "<") // "<" .replaceAll(rgx.xhtml_greater_than, ">") // ">" + .replaceAll(rgx.br_line, "<br>") + .replaceAll(rgx.br_nl, "<br>") + .replaceAll(rgx.nbsp_char, " "); + return _txt; +} +#+END_SRC + +**** special characters date + +#+NAME: xhtml_format_objects_special_characters_date +#+BEGIN_SRC d +@safe string special_characters_date(string _txt) { + _txt = _txt + .replaceAll(regex(r"(?:-00)+"), "") + .replaceAll(rgx.br_line, "<br>") + .replaceAll(rgx.br_nl, "<br>") .replaceAll(rgx.nbsp_char, " "); return _txt; } @@ -286,7 +303,7 @@ import special_characters_text(doc_matters.conf_make_meta.meta.title_full), special_characters_text(doc_matters.conf_make_meta.meta.creator_author), _publisher, - special_characters_text(doc_matters.conf_make_meta.meta.date_published), + special_characters_date(doc_matters.conf_make_meta.meta.date_published), special_characters_text(doc_matters.conf_make_meta.meta.date_created), special_characters_text(doc_matters.conf_make_meta.meta.date_issued), special_characters_text(doc_matters.conf_make_meta.meta.date_available), @@ -490,7 +507,7 @@ import special_characters_text(doc_matters.conf_make_meta.meta.title_full), (doc_matters.conf_make_meta.meta.creator_author.empty) ? "" : ", " ~ special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - special_characters_text(doc_matters.conf_make_meta.meta.date_published), + special_characters_date(doc_matters.conf_make_meta.meta.date_published), special_characters_text(doc_matters.conf_make_meta.meta.date_created), special_characters_text(doc_matters.conf_make_meta.meta.date_issued), special_characters_text(doc_matters.conf_make_meta.meta.date_available), @@ -2430,7 +2447,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), doc_matters.src.language, // language, fix (needed in dochead metadata) (doc_matters.conf_make_meta.meta.date_published.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.date_published), + ? "" : xhtml_format.special_characters_date(doc_matters.conf_make_meta.meta.date_published), (doc_matters.conf_make_meta.meta.rights_copyright.empty) ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright), _uuid, |