aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/out_sqlite.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-01-20 15:20:01 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-01-21 09:20:00 -0500
commit845f6440b8d2a672769f553a45aa1406c17d4c4f (patch)
tree4c0c0360922170f8b3c01c6a3199b9cdece92716 /org/out_sqlite.org
parentorg files naming, minor (diff)
xmls, html group text output (bullets & indents)
Diffstat (limited to 'org/out_sqlite.org')
-rw-r--r--org/out_sqlite.org63
1 files changed, 63 insertions, 0 deletions
diff --git a/org/out_sqlite.org b/org/out_sqlite.org
index 21e1cea..ecbfbe9 100644
--- a/org/out_sqlite.org
+++ b/org/out_sqlite.org
@@ -191,6 +191,7 @@ template SQLiteFormatAndLoadObject() {
<<sanitize_and_munge_inline_html_special_characters>>
<<sanitize_and_munge_inline_html_special_characters_code>>
<<sanitize_and_munge_inline_html_font_face>>
+ <<sanitize_and_munge_inline_html_grouped_text_bullets_indents>>
<<sanitize_and_munge_inline_html_images>>
<<sanitize_and_munge_inline_html_inline_links>>
<<sanitize_and_munge_inline_html_inline_notes_scroll>>
@@ -611,6 +612,63 @@ string html_font_face(string _txt){
#+END_SRC
****** inline markup
+******* grouped text
+
+#+NAME: sanitize_and_munge_inline_html_grouped_text_bullets_indents
+#+BEGIN_SRC d
+string inline_grouped_text_bullets_indents(M,O)(
+ M doc_matters,
+ const O obj,
+ string _txt,
+ string _suffix = ".html",
+ string _xml_type = "seg",
+) {
+ static auto rgx = RgxO();
+ if (obj.metainfo.is_a == "group") {
+ _txt = (_txt)
+ .replaceAll(rgx.grouped_para_indent_1,
+ "&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_2,
+ "&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_3,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_4,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_5,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_6,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_7,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_8,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_9,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_hang, "&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet, "●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_1,
+ "&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_2,
+ "&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_3,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_4,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_5,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_6,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_7,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_8,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_9,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;");
+ }
+ return _txt;
+}
+#+END_SRC
+
******* images
#+NAME: sanitize_and_munge_inline_html_images
@@ -798,6 +856,9 @@ string inline_markup(M,O)(
const O obj,
string _txt,
) {
+ if (obj.metainfo.is_a == "group") {
+ _txt = inline_grouped_text_bullets_indents(doc_matters, obj, _txt, xml_type);
+ }
_txt = inline_images(doc_matters, obj, _txt, xml_type);
_txt = inline_links(doc_matters, obj, _txt, xml_type);
_txt = inline_notes_scroll(doc_matters, obj, _txt);
@@ -915,6 +976,7 @@ string html_group(M,O)(
assert(obj.metainfo.is_of_type == "block");
assert(obj.metainfo.is_a == "group");
string _txt = munge_html(doc_matters, obj);
+ _txt = inline_markup(doc_matters, obj, _txt);
string o = format(q"┃<p class="%s">
%s
</p>┃",
@@ -938,6 +1000,7 @@ string html_block(M,O)(
assert(obj.metainfo.is_of_type == "block");
assert(obj.metainfo.is_a == "block");
string _txt = munge_html(doc_matters, obj);
+ _txt = inline_markup(doc_matters, obj, _txt);
string o = format(q"┃
<p class="%s">%s</p>┃",
obj.metainfo.is_a,