aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/default_paths.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-04-14 16:39:52 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit479e71e90146b1067120faf489af1b13a5a0cf3d (patch)
tree5e725994ae345dd89687fae2fe90979eb3cf6f8d /org/default_paths.org
parent0.26.0 sqlite single statement insertion of objects (diff)
sqlite3 some stuff & rearrange files, dlang, org
Diffstat (limited to 'org/default_paths.org')
-rw-r--r--org/default_paths.org42
1 files changed, 30 insertions, 12 deletions
diff --git a/org/default_paths.org b/org/default_paths.org
index cc78c46..af96bea 100644
--- a/org/default_paths.org
+++ b/org/default_paths.org
@@ -880,6 +880,27 @@ template SiSUoutPaths() {
return _PathsStruct();
}
}
+template SiSUoutPathSQLite() {
+ auto SiSUoutPathSQLite(Po)(
+ Po output_pth_root,
+ ) {
+ struct _PathsStruct {
+ string output_root() {
+ string out_root_;
+ if (output_pth_root.length > 0) {
+ out_root_ = output_pth_root;
+ } else {
+ out_root_ = "sisugen";
+ }
+ return out_root_;
+ }
+ string output_base() {
+ return asNormalizedPath(output_root).array;
+ }
+ }
+ return _PathsStruct();
+ }
+}
#+END_SRC
** set
@@ -891,7 +912,6 @@ template SiSUoutPathsFnPd() {
auto SiSUoutPathsFnPd(Fn,Pn)(
Fn fn_src_pth,
Pn pod_name
- // Pn pod_name = "",
) {
struct _PathsStruct {
string base_filename() {
@@ -1092,14 +1112,16 @@ template SiSUpathsSQLiteDiscrete() {
Po output_pth_root,
Lng lng,
) {
- auto out_pth = SiSUoutPaths!()(output_pth_root, lng);
- string base_dir = "sqlite";
struct _PathsStruct {
string base_filename(string fn_src) {
return fn_src.baseName.stripExtension;
}
string base() {
- return asNormalizedPath((out_pth.output_root).chainPath(base_dir)).array;
+ auto out_pth = SiSUoutPaths!()(output_pth_root, lng);
+ string base_dir = "sqlite";
+ return asNormalizedPath((out_pth.output_base).chainPath(base_dir)).array;
+ // return asNormalizedPath((out_pth.output_root).chainPath(base_dir)).array; // single file for each file, multiple languages
+ // return asNormalizedPath((out_pth.output_base).chainPath(base_dir)).array; // separate files for each language
}
string seg(string fn_src) {
return asNormalizedPath(base.chainPath(base_filename(fn_src))).array;
@@ -1120,23 +1142,19 @@ template SiSUpathsSQLiteDiscrete() {
template SiSUpathsSQLite() {
mixin SiSUrgxInit;
static auto rgx = Rgx();
- auto SiSUpathsSQLite(Po,Lng)(
+ auto SiSUpathsSQLite(Po)(
Po output_pth_root,
- Lng lng,
) {
- auto out_pth = SiSUoutPaths!()(output_pth_root, lng);
- string base_dir = "sqlite";
struct _PathsStruct {
string base_filename(string fn_src) {
return fn_src.baseName.stripExtension;
}
string base() {
+ auto out_pth = SiSUoutPathSQLite!()(output_pth_root); // decide whether to have separate files for each language
+ string base_dir = "sqlite";
return asNormalizedPath((out_pth.output_root).chainPath(base_dir)).array;
}
- string seg(string fn_src) {
- return asNormalizedPath(base.chainPath(base_filename(fn_src))).array;
- }
- string sqlite_file(string fn_src) {
+ string sqlite_file(string fn_src = "sdp-niu") {
return asNormalizedPath(base.chainPath(base_filename(fn_src) ~ ".sqlite")).array;
}
}