From 08549c763cd731531d4e1c52c86fe265cbef92f2 Mon Sep 17 00:00:00 2001
From: Ralph Amissah <ralph.amissah@gmail.com>
Date: Sat, 11 Apr 2020 19:43:06 -0400
Subject: uid, select separator that works better with sqlite

---
 org/default_misc.org                |  3 ++-
 org/default_paths.org               | 22 +++++++++++-----------
 org/default_regex.org               |  1 +
 src/doc_reform/io_in/paths_source.d | 22 +++++++++++-----------
 src/doc_reform/io_out/defaults.d    |  3 ++-
 src/doc_reform/meta/defaults.d      |  3 ++-
 src/doc_reform/meta/rgx.d           |  1 +
 7 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/org/default_misc.org b/org/default_misc.org
index d96e2bb..ab7033f 100644
--- a/org/default_misc.org
+++ b/org/default_misc.org
@@ -291,7 +291,8 @@ template InternalMarkup() {
     string tc_c                   = "┚";
     string tc_p                   = "┆";
     string img                    = "☼";
-    string sep                    = "␣"; // "~";
+    string sep                    = "␣"; // "~";"␣"; // "~";
+    string uid_sep                = ":";
     string on_o  = "「";       string on_c  = "」";
     string mk_bullet               = "● ";
     static string indent_by_spaces_provided(int indent, string _indent_spaces ="░░") {
diff --git a/org/default_paths.org b/org/default_paths.org
index 3af1019..6db48af 100644
--- a/org/default_paths.org
+++ b/org/default_paths.org
@@ -246,12 +246,12 @@ template PathMatters() {
             string _uid;
             if (is_pod && !(pod_name_with_path.empty)) {
               if (pod_name_with_path.baseName == filename_base) {
-                _uid = filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng;
+                _uid = filename_base ~ "." ~ filename_extension ~ mkup.uid_sep ~ lng;
               } else {
-                _uid = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng;
+                _uid = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base ~ "." ~ filename_extension ~ mkup.uid_sep ~ lng;
               }
             } else {
-              _uid = mkup.sep ~ filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng;
+              _uid = mkup.uid_sep ~ filename_base ~ "." ~ filename_extension ~ mkup.uid_sep ~ lng;
             }
             return _uid;
           }
@@ -261,7 +261,7 @@ template PathMatters() {
               if (pod_name_with_path.baseName == filename_base) {
                 _uid = filename_base ~ "." ~ lng;
               } else {
-                _uid = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ "." ~ lng;
+                _uid = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base ~ "." ~ lng;
               }
             } else {
               _uid = "_" ~ filename_base ~ "." ~ lng;
@@ -271,18 +271,18 @@ template PathMatters() {
           @safe string docname_composite_unique_per_src_doc() {
             string _fn;
             if (pod_name_with_path.baseName == filename_base) {
-              _fn = filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng;
+              _fn = filename_base ~ mkup.uid_sep ~ filename_extension ~ mkup.uid_sep ~ lng;
             } else if (!(pod_name_with_path.empty)) {
-              _fn = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng;
+              _fn = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base ~ mkup.uid_sep ~ filename_extension ~ mkup.uid_sep ~ lng;
             } else {
-              _fn = "_" ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng;
+              _fn = "_" ~ mkup.uid_sep ~ filename_base ~ mkup.uid_sep ~ filename_extension ~ mkup.uid_sep ~ lng;
             }
             return _fn;
           }
           @safe string docname_composite_unique_per_src_pod() {
           /+
             z pod name if any + src filename (without lng code)
-             filename ~ mkup.sep ~ lng
+             filename ~ mkup.uid_sep ~ lng
              * unique per src pod
              used by
              - pod (multilingual collection)
@@ -290,11 +290,11 @@ template PathMatters() {
           +/
             string _fn;
             if (pod_name_with_path.baseName == filename_base) {
-              _fn = filename_base ~ mkup.sep ~ filename_extension;
+              _fn = filename_base ~ mkup.uid_sep ~ filename_extension;
             } else if (!(pod_name_with_path.empty)) {
-              _fn = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension;
+              _fn = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base ~ mkup.uid_sep ~ filename_extension;
             } else {
-              _fn = "_" ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension;
+              _fn = "_" ~ mkup.uid_sep ~ filename_base ~ mkup.uid_sep ~ filename_extension;
             }
             return _fn;
           }
diff --git a/org/default_regex.org b/org/default_regex.org
index a768a65..4ddaeca 100644
--- a/org/default_regex.org
+++ b/org/default_regex.org
@@ -50,6 +50,7 @@ static template spineRgxIn() {
 /+ misc +/
 // static true_dollar                                    = ctRegex!(`\$`, "gm");
 static sep                                            = ctRegex!(`␣`, "gm");
+static uid_sep                                        = ctRegex!(`:`, "gm"); // ctRegex!(`␣`, "gm");
 static flag_action                                    = ctRegex!(`^(--[a-z][a-z0-9-]+)$`);
 static within_quotes                                  = ctRegex!(`"(.+?)"`, "m");
 static yaml_tag_is_str                                = ctRegex!(`:str$`);
diff --git a/src/doc_reform/io_in/paths_source.d b/src/doc_reform/io_in/paths_source.d
index 432b484..c504c77 100644
--- a/src/doc_reform/io_in/paths_source.d
+++ b/src/doc_reform/io_in/paths_source.d
@@ -193,12 +193,12 @@ template PathMatters() {
             string _uid;
             if (is_pod && !(pod_name_with_path.empty)) {
               if (pod_name_with_path.baseName == filename_base) {
-                _uid = filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng;
+                _uid = filename_base ~ "." ~ filename_extension ~ mkup.uid_sep ~ lng;
               } else {
-                _uid = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng;
+                _uid = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base ~ "." ~ filename_extension ~ mkup.uid_sep ~ lng;
               }
             } else {
-              _uid = mkup.sep ~ filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng;
+              _uid = mkup.uid_sep ~ filename_base ~ "." ~ filename_extension ~ mkup.uid_sep ~ lng;
             }
             return _uid;
           }
@@ -208,7 +208,7 @@ template PathMatters() {
               if (pod_name_with_path.baseName == filename_base) {
                 _uid = filename_base ~ "." ~ lng;
               } else {
-                _uid = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ "." ~ lng;
+                _uid = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base ~ "." ~ lng;
               }
             } else {
               _uid = "_" ~ filename_base ~ "." ~ lng;
@@ -218,18 +218,18 @@ template PathMatters() {
           @safe string docname_composite_unique_per_src_doc() {
             string _fn;
             if (pod_name_with_path.baseName == filename_base) {
-              _fn = filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng;
+              _fn = filename_base ~ mkup.uid_sep ~ filename_extension ~ mkup.uid_sep ~ lng;
             } else if (!(pod_name_with_path.empty)) {
-              _fn = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng;
+              _fn = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base ~ mkup.uid_sep ~ filename_extension ~ mkup.uid_sep ~ lng;
             } else {
-              _fn = "_" ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng;
+              _fn = "_" ~ mkup.uid_sep ~ filename_base ~ mkup.uid_sep ~ filename_extension ~ mkup.uid_sep ~ lng;
             }
             return _fn;
           }
           @safe string docname_composite_unique_per_src_pod() {
           /+
             z pod name if any + src filename (without lng code)
-             filename ~ mkup.sep ~ lng
+             filename ~ mkup.uid_sep ~ lng
              * unique per src pod
              used by
              - pod (multilingual collection)
@@ -237,11 +237,11 @@ template PathMatters() {
           +/
             string _fn;
             if (pod_name_with_path.baseName == filename_base) {
-              _fn = filename_base ~ mkup.sep ~ filename_extension;
+              _fn = filename_base ~ mkup.uid_sep ~ filename_extension;
             } else if (!(pod_name_with_path.empty)) {
-              _fn = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension;
+              _fn = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base ~ mkup.uid_sep ~ filename_extension;
             } else {
-              _fn = "_" ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension;
+              _fn = "_" ~ mkup.uid_sep ~ filename_base ~ mkup.uid_sep ~ filename_extension;
             }
             return _fn;
           }
diff --git a/src/doc_reform/io_out/defaults.d b/src/doc_reform/io_out/defaults.d
index 36e1428..eea786a 100644
--- a/src/doc_reform/io_out/defaults.d
+++ b/src/doc_reform/io_out/defaults.d
@@ -34,7 +34,8 @@ template InternalMarkup() {
     string tc_c                   = "┚";
     string tc_p                   = "┆";
     string img                    = "☼";
-    string sep                    = "␣"; // "~";
+    string sep                    = "␣"; // "~";"␣"; // "~";
+    string uid_sep                = ":";
     string on_o  = "「";       string on_c  = "」";
     string mk_bullet               = "● ";
     static string indent_by_spaces_provided(int indent, string _indent_spaces ="░░") {
diff --git a/src/doc_reform/meta/defaults.d b/src/doc_reform/meta/defaults.d
index 8d34069..e592be7 100644
--- a/src/doc_reform/meta/defaults.d
+++ b/src/doc_reform/meta/defaults.d
@@ -187,7 +187,8 @@ template InternalMarkup() {
     string tc_c                   = "┚";
     string tc_p                   = "┆";
     string img                    = "☼";
-    string sep                    = "␣"; // "~";
+    string sep                    = "␣"; // "~";"␣"; // "~";
+    string uid_sep                = ":";
     string on_o  = "「";       string on_c  = "」";
     string mk_bullet               = "● ";
     static string indent_by_spaces_provided(int indent, string _indent_spaces ="░░") {
diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d
index a5a153e..7508a67 100644
--- a/src/doc_reform/meta/rgx.d
+++ b/src/doc_reform/meta/rgx.d
@@ -7,6 +7,7 @@ static template spineRgxIn() {
     /+ misc +/
     // static true_dollar                                    = ctRegex!(`\$`, "gm");
     static sep                                            = ctRegex!(`␣`, "gm");
+    static uid_sep                                        = ctRegex!(`:`, "gm"); // ctRegex!(`␣`, "gm");
     static flag_action                                    = ctRegex!(`^(--[a-z][a-z0-9-]+)$`);
     static within_quotes                                  = ctRegex!(`"(.+?)"`, "m");
     static yaml_tag_is_str                                = ctRegex!(`:str$`);
-- 
cgit v1.2.3