aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/out_sqlite.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/out_sqlite.org')
-rw-r--r--org/out_sqlite.org46
1 files changed, 29 insertions, 17 deletions
diff --git a/org/out_sqlite.org b/org/out_sqlite.org
index 3a201e7..a90e6fd 100644
--- a/org/out_sqlite.org
+++ b/org/out_sqlite.org
@@ -67,8 +67,10 @@ module doc_reform.io_out.sqlite;
#+NAME: sqlite_common
#+BEGIN_SRC d
mixin spineRgxOut;
+mixin spineRgxXHTML;
mixin InternalMarkup;
static auto rgx = RgxO();
+static auto rgx_xhtml = RgxXHTML();
static auto mkup = InlineMarkup();
long _metadata_tid_lastrowid;
#+END_SRC
@@ -188,6 +190,7 @@ template SQLiteFormatAndLoadObject() {
M doc_matters,
) {
mixin spineRgxOut;
+ mixin spineRgxXHTML;
struct sqlite_format_and_load_objects {
<<sanitize_text_for_search>>
<<sanitize_and_munge_inline_html_munge>>
@@ -369,8 +372,13 @@ if (opt_action.sqlite_db_create) {
? config.conf.w_srv_db_sqlite_path
: "";
if (db_filename.length > 0 && db_path.length > 0) {
- if ((opt_action.vox_gt1)) {
- writeln("db name & path: ", db_path, db_filename);
+ if (opt_action.vox_gt2) {
+ writeln("db name: ", db_filename);
+ writeln("db path: ", db_path);
+ writeln("db name & path: ", db_path, "/", db_filename);
+ }
+ if (opt_action.vox_gt1) {
+ writeln("attempting to create db: ", db_path, "/", db_filename);
}
auto pth_sqlite = spinePathsSQLite!()(db_filename, db_path);
pth_sqlite.base.mkdirRecurse;
@@ -484,7 +492,10 @@ template SQLiteDbDrop() {
#+NAME: sqlite_imports
#+BEGIN_SRC d
-import doc_reform.io_out;
+import
+ doc_reform.io_out,
+ doc_reform.io_out.rgx,
+ doc_reform.io_out.rgx_xhtml;
import
std.file,
std.uri;
@@ -563,15 +574,15 @@ string munge_html(M,O)(
) {
string _html_special_characters(string _txt){
_txt = _txt
- .replaceAll(rgx.xhtml_ampersand, "&#38;")
- .replaceAll(rgx.xhtml_quotation, "&#34;")
- .replaceAll(rgx.xhtml_less_than, "&#60;")
- .replaceAll(rgx.xhtml_greater_than, "&#62;")
+ .replaceAll(rgx_xhtml.ampersand, "&#38;")
+ .replaceAll(rgx_xhtml.quotation, "&#34;")
+ .replaceAll(rgx_xhtml.less_than, "&#60;")
+ .replaceAll(rgx_xhtml.greater_than, "&#62;")
.replaceAll(rgx.nbsp_char, " ")
.replaceAll(rgx.br_line_inline, "<br />")
.replaceAll(rgx.br_line, "<br />")
.replaceAll(rgx.br_line_spaced, "<br /><br />")
- .replaceAll(rgx.xhtml_line_break, "<br />");
+ .replaceAll(rgx_xhtml.line_break, "<br />");
return _txt;
}
string _html_font_face(string _txt){
@@ -606,15 +617,15 @@ string munge_html(M,O)(
#+BEGIN_SRC d
string html_special_characters(string _txt){
_txt = _txt
- .replaceAll(rgx.xhtml_ampersand, "&#38;")
- .replaceAll(rgx.xhtml_quotation, "&#34;")
- .replaceAll(rgx.xhtml_less_than, "&#60;")
- .replaceAll(rgx.xhtml_greater_than, "&#62;")
+ .replaceAll(rgx_xhtml.ampersand, "&#38;")
+ .replaceAll(rgx_xhtml.quotation, "&#34;")
+ .replaceAll(rgx_xhtml.less_than, "&#60;")
+ .replaceAll(rgx_xhtml.greater_than, "&#62;")
.replaceAll(rgx.nbsp_char, " ")
.replaceAll(rgx.br_line_inline, "<br />")
.replaceAll(rgx.br_line, "<br />")
.replaceAll(rgx.br_line_spaced, "<br /><br />")
- .replaceAll(rgx.xhtml_line_break, "<br />");
+ .replaceAll(rgx_xhtml.line_break, "<br />");
return _txt;
}
#+END_SRC
@@ -625,10 +636,10 @@ string html_special_characters(string _txt){
#+BEGIN_SRC d
string html_special_characters_code(string _txt){
_txt = _txt
- .replaceAll(rgx.xhtml_ampersand, "&#38;")
- .replaceAll(rgx.xhtml_quotation, "&#34;")
- .replaceAll(rgx.xhtml_less_than, "&#60;")
- .replaceAll(rgx.xhtml_greater_than, "&#62;")
+ .replaceAll(rgx_xhtml.ampersand, "&#38;")
+ .replaceAll(rgx_xhtml.quotation, "&#34;")
+ .replaceAll(rgx_xhtml.less_than, "&#60;")
+ .replaceAll(rgx_xhtml.greater_than, "&#62;")
.replaceAll(rgx.nbsp_char, " ");
return _txt;
}
@@ -667,6 +678,7 @@ string inline_grouped_text_bullets_indents(M,O)(
string _xml_type = "seg",
) {
static auto rgx = RgxO();
+ static auto rgx_xhtml = RgxXHTML();
if (obj.metainfo.is_a == "group") {
_txt = (_txt)
.replaceAll(rgx.grouped_para_indent_1,