aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output/sqlite.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-11-23 16:09:14 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit916e227028ab19e58a4ae1e5ebb1fa38691633bd (patch)
tree3b0134a4e5fd7dd7f872be87559ee7d41c0c930c /src/sdp/output/sqlite.d
parentsdp, select language source to process (diff)
0.20.1 struct for opt_actions
Diffstat (limited to 'src/sdp/output/sqlite.d')
-rw-r--r--src/sdp/output/sqlite.d40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/sdp/output/sqlite.d b/src/sdp/output/sqlite.d
index 6a9acd2..591b002 100644
--- a/src/sdp/output/sqlite.d
+++ b/src/sdp/output/sqlite.d
@@ -44,7 +44,7 @@ template SQLiteBuildTablesAndPopulate() {
if (_urls.length > 0) {
_txt ~= _urls;
}
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
writeln(_txt, "\n");
}
debug(sql_text_clean) {
@@ -96,7 +96,7 @@ template SQLiteBuildTablesAndPopulate() {
if (_notes.length > 0) {
_txt ~= _notes;
}
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
writeln(_txt, "\n");
}
return _txt;
@@ -303,7 +303,7 @@ template SQLiteBuildTablesAndPopulate() {
"text": generic_munge_sanitize_text_for_search(obj.text),
"html": html_heading(obj)
];
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
debug(sql_txt) {
writeln(obj_txt["text"]);
}
@@ -322,7 +322,7 @@ template SQLiteBuildTablesAndPopulate() {
"text": generic_munge_sanitize_text_for_search(obj.text),
"html": html_para(obj)
];
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
debug(sql_txt) {
writeln(obj_txt["text"]);
}
@@ -341,7 +341,7 @@ template SQLiteBuildTablesAndPopulate() {
"text": generic_munge_sanitize_text_for_search(obj.text),
"html": html_quote(obj)
];
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
debug(sql_txt) {
writeln(obj_txt["text"]);
}
@@ -360,7 +360,7 @@ template SQLiteBuildTablesAndPopulate() {
"text": generic_munge_sanitize_text_for_search(obj.text),
"html": html_group(obj)
];
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
debug(sql_txt) {
writeln(obj_txt["text"]);
}
@@ -379,7 +379,7 @@ template SQLiteBuildTablesAndPopulate() {
"text": generic_munge_sanitize_text_for_search(obj.text),
"html": html_block(obj)
];
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
debug(sql_txt) {
writeln(obj_txt["text"]);
}
@@ -398,7 +398,7 @@ template SQLiteBuildTablesAndPopulate() {
"text": generic_munge_sanitize_text_for_search(obj.text),
"html": html_verse(obj)
];
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
debug(sql_txt) {
writeln(obj_txt["text"]);
}
@@ -417,7 +417,7 @@ template SQLiteBuildTablesAndPopulate() {
"text": generic_munge_sanitize_text_for_search(obj.text),
"html": html_code(obj)
];
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
debug(sql_txt) {
writeln(obj_txt["text"]);
}
@@ -436,7 +436,7 @@ template SQLiteBuildTablesAndPopulate() {
"text": generic_munge_sanitize_text_for_search(obj.text),
"html": html_table(obj)
];
- if (doc_matters.opt_action["debug"]) {
+ if (doc_matters.opt_action.debug_do) {
debug(sql_txt) {
writeln(obj_txt["text"]);
}
@@ -459,8 +459,8 @@ template SQLiteBuildTablesAndPopulate() {
auto pth_sqlite = SiSUpathsSQLite!()(doc_matters.src_path_info, doc_matters.language);
auto db = Database(pth_sqlite.sqlite_file(doc_matters.environment["pwd"].baseName));
// auto db = Database(":memory:"); // open database in memory
- if (doc_matters.opt_action["sqlite-create"]) {
- if ((doc_matters.opt_action["verbose"])) { writeln("sqlite create tables... "); }
+ if (doc_matters.opt_action.sqlite_create) {
+ if ((doc_matters.opt_action.verbose)) { writeln("sqlite create tables... "); }
db.run("
DROP TABLE IF EXISTS metadata_and_text;
DROP TABLE IF EXISTS doc_objects;
@@ -911,14 +911,14 @@ template SQLiteBuildTablesAndPopulate() {
obj_txt = format_and_sqlite_load.heading(obj);
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -940,7 +940,7 @@ template SQLiteBuildTablesAndPopulate() {
obj_txt = format_and_sqlite_load.para(obj);
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
@@ -969,14 +969,14 @@ template SQLiteBuildTablesAndPopulate() {
obj_txt = format_and_sqlite_load.table(obj);
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -1006,14 +1006,14 @@ template SQLiteBuildTablesAndPopulate() {
obj_txt = format_and_sqlite_load.para(obj);
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -1022,7 +1022,7 @@ template SQLiteBuildTablesAndPopulate() {
case "comment":
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.of_part); // check where empty value could come from
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from