aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output
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
parentsdp, select language source to process (diff)
0.20.1 struct for opt_actions
Diffstat (limited to 'src/sdp/output')
-rw-r--r--src/sdp/output/epub3.d20
-rw-r--r--src/sdp/output/html.d36
-rw-r--r--src/sdp/output/hub.d82
-rw-r--r--src/sdp/output/source_sisupod.d20
-rw-r--r--src/sdp/output/sqlite.d40
-rw-r--r--src/sdp/output/sqlite_discrete.d36
6 files changed, 117 insertions, 117 deletions
diff --git a/src/sdp/output/epub3.d b/src/sdp/output/epub3.d
index b6987ae..78603b2 100644
--- a/src/sdp/output/epub3.d
+++ b/src/sdp/output/epub3.d
@@ -356,13 +356,13 @@ template outputEPub3() {
doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case 8: .. case 9:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
}
break;
@@ -380,14 +380,14 @@ template outputEPub3() {
doc_epub3_endnotes[segment_filename] ~= t[1];
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;
@@ -403,7 +403,7 @@ template outputEPub3() {
doc_epub3_endnotes[segment_filename] ~= t[1];
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
@@ -442,14 +442,14 @@ template outputEPub3() {
doc_epub3_endnotes[segment_filename] ~= t[1];
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;
@@ -485,14 +485,14 @@ template outputEPub3() {
doc_epub3_endnotes[segment_filename] ~= t[1];
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;
@@ -501,7 +501,7 @@ template outputEPub3() {
case "comment":
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
}
break;
diff --git a/src/sdp/output/html.d b/src/sdp/output/html.d
index 7ed649e..b0b0405 100644
--- a/src/sdp/output/html.d
+++ b/src/sdp/output/html.d
@@ -40,14 +40,14 @@ template outputHTML() {
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
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;
@@ -64,7 +64,7 @@ template outputHTML() {
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
@@ -93,14 +93,14 @@ template outputHTML() {
doc_html ~= xhtml_format.table(obj, _txt);
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;
@@ -130,14 +130,14 @@ template outputHTML() {
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
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;
@@ -146,7 +146,7 @@ template outputHTML() {
case "comment":
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
@@ -254,13 +254,13 @@ template outputHTML() {
doc_html_endnotes[segment_filename] ~= t[1];
break;
case 8: .. case 9:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
}
break;
@@ -277,14 +277,14 @@ template outputHTML() {
doc_html[segment_filename] ~= to!string(t[0]);
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_a);
}
break;
@@ -300,7 +300,7 @@ template outputHTML() {
doc_html_endnotes[segment_filename] ~= t[1];
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
@@ -338,14 +338,14 @@ template outputHTML() {
doc_html_endnotes[segment_filename] ~= "";
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;
@@ -381,14 +381,14 @@ template outputHTML() {
doc_html_endnotes[segment_filename] ~= t[1];
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;
@@ -397,7 +397,7 @@ template outputHTML() {
case "comment":
break;
default:
- if ((doc_matters.opt_action["debug"])) {
+ if ((doc_matters.opt_action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
}
break;
diff --git a/src/sdp/output/hub.d b/src/sdp/output/hub.d
index 4f5a363..1600dd2 100644
--- a/src/sdp/output/hub.d
+++ b/src/sdp/output/hub.d
@@ -16,73 +16,73 @@ template outputHub() {
void outputHub(D,I)(D doc_abstraction, I doc_matters) {
mixin SiSUoutputRgxInit;
static auto rgx = Rgx();
- if ((doc_matters.opt_action["verbose"])) {
+ if ((doc_matters.opt_action.verbose)) {
writeln(doc_matters.keys_seq.seg);
}
- if ((doc_matters.opt_action["source"])
- || (doc_matters.opt_action["sisupod"])) {
- if ((doc_matters.opt_action["verbose"])
- && (doc_matters.opt_action["source"]))
+ if ((doc_matters.opt_action.source)
+ || (doc_matters.opt_action.sisupod)) {
+ if ((doc_matters.opt_action.verbose)
+ && (doc_matters.opt_action.source))
{ writeln("sisu source processing... "); }
- if ((doc_matters.opt_action["verbose"])
- && (doc_matters.opt_action["sisupod"]))
+ if ((doc_matters.opt_action.verbose)
+ && (doc_matters.opt_action.sisupod))
{ writeln("sisupod source processing... "); }
SiSUpod!()(doc_matters);
- if ((doc_matters.opt_action["verbose"])
- && (doc_matters.opt_action["debug"])
- && (doc_matters.opt_action["source"]))
+ if ((doc_matters.opt_action.verbose)
+ && (doc_matters.opt_action.debug_do)
+ && (doc_matters.opt_action.source))
{ writeln("sisu source done"); }
- if ((doc_matters.opt_action["verbose"])
- && (doc_matters.opt_action["debug"])
- && (doc_matters.opt_action["sisupod"]))
+ if ((doc_matters.opt_action.verbose)
+ && (doc_matters.opt_action.debug_do)
+ && (doc_matters.opt_action.sisupod))
{ writeln("sisupod done"); }
}
- if (doc_matters.opt_action["text"]) {
+ if (doc_matters.opt_action.text) {
/+ mixin outputText; +/
- if ((doc_matters.opt_action["verbose"])) { writeln("text processing... "); }
+ if ((doc_matters.opt_action.verbose)) { writeln("text processing... "); }
}
- if (doc_matters.opt_action["html"]) {
- if ((doc_matters.opt_action["verbose"])) { writeln("html scroll processing... "); }
+ if (doc_matters.opt_action.html) {
+ if ((doc_matters.opt_action.verbose)) { writeln("html scroll processing... "); }
outputHTML!().scroll(doc_abstraction, doc_matters);
- if ((doc_matters.opt_action["verbose"]) && (doc_matters.opt_action["debug"])) { writeln("html scroll done"); }
- if ((doc_matters.opt_action["verbose"])) { writeln("html seg processing... "); }
+ if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("html scroll done"); }
+ if ((doc_matters.opt_action.verbose)) { writeln("html seg processing... "); }
outputHTML!().seg(doc_abstraction, doc_matters);
- if ((doc_matters.opt_action["verbose"]) && (doc_matters.opt_action["debug"])) { writeln("html seg done"); }
+ if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("html seg done"); }
outputHTML!().css(doc_matters);
- } else if (doc_matters.opt_action["html-seg"]) {
- if ((doc_matters.opt_action["verbose"])) { writeln("html seg processing... "); }
+ } else if (doc_matters.opt_action.html_seg) {
+ if ((doc_matters.opt_action.verbose)) { writeln("html seg processing... "); }
outputHTML!().seg(doc_abstraction, doc_matters);
- if ((doc_matters.opt_action["verbose"]) && (doc_matters.opt_action["debug"])) { writeln("html seg done"); }
+ if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("html seg done"); }
outputHTML!().css(doc_matters);
- } else if (doc_matters.opt_action["html-scroll"]) {
- if ((doc_matters.opt_action["verbose"])) { writeln("html scroll processing... "); }
+ } else if (doc_matters.opt_action.html_scroll) {
+ if ((doc_matters.opt_action.verbose)) { writeln("html scroll processing... "); }
outputHTML!().scroll(doc_abstraction, doc_matters);
- if ((doc_matters.opt_action["verbose"]) && (doc_matters.opt_action["debug"])) { writeln("html scroll done"); }
+ if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("html scroll done"); }
outputHTML!().css(doc_matters);
}
- if (doc_matters.opt_action["epub"]) {
- if ((doc_matters.opt_action["verbose"])) { writeln("epub3 processing... "); }
+ if (doc_matters.opt_action.epub) {
+ if ((doc_matters.opt_action.verbose)) { writeln("epub3 processing... "); }
outputEPub3!()(doc_abstraction, doc_matters);
// epub.css_write;
- if ((doc_matters.opt_action["verbose"]) && (doc_matters.opt_action["debug"])) { writeln("epub3 done"); }
+ if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("epub3 done"); }
}
- if (doc_matters.opt_action["pdf"]) {
+ if (doc_matters.opt_action.pdf) {
/+ mixin outputPDF; +/
writeln("pdf processing");
}
- if (doc_matters.opt_action["odt"]) {
+ if (doc_matters.opt_action.odt) {
/+ mixin outputODT; +/
writeln("odt processing");
}
- if (doc_matters.opt_action["sqlite-discrete"]) {
- if ((doc_matters.opt_action["verbose"])) { writeln("sqlite processing... "); }
+ if (doc_matters.opt_action.sqlite_discrete) {
+ if ((doc_matters.opt_action.verbose)) { writeln("sqlite processing... "); }
SQLiteDiscreteBuildTablesAndPopulate!()(doc_abstraction, doc_matters);
}
- if (doc_matters.opt_action["sqlite-update"]) {
- if ((doc_matters.opt_action["verbose"])) { writeln("sqlite processing... "); }
+ if (doc_matters.opt_action.sqlite_update) {
+ if ((doc_matters.opt_action.verbose)) { writeln("sqlite processing... "); }
SQLiteBuildTablesAndPopulate!()(doc_abstraction, doc_matters);
}
- if (doc_matters.opt_action["postgresql"]) {
+ if (doc_matters.opt_action.postgresql) {
/+ mixin outputPostgreSQL; +/
writeln("pgsql processing");
}
@@ -98,15 +98,15 @@ template outputHubOp() {
sdp.output.source_sisupod,
sdp.output.create_zip_file,
sdp.output.paths_output;
- void outputHubOp(C)(C config) {
+ void outputHubOp(O)(O opt_action) {
mixin SiSUoutputRgxInit;
static auto rgx = Rgx();
- if ((config["sqlite-create"])) {
- if ((config["verbose"])) { writeln("sqlite create table... "); }
+ if ((opt_action.sqlite_create)) {
+ if ((opt_action.verbose)) { writeln("sqlite create table... "); }
SQLiteTablesCreate!()();
}
- if ((config["sqlite-drop"])) {
- if ((config["verbose"])) { writeln("sqlite drop table... "); }
+ if ((opt_action.sqlite_drop)) {
+ if ((opt_action.verbose)) { writeln("sqlite drop table... "); }
SQLiteTablesDrop!()();
}
}
diff --git a/src/sdp/output/source_sisupod.d b/src/sdp/output/source_sisupod.d
index d83ae87..6e06667 100644
--- a/src/sdp/output/source_sisupod.d
+++ b/src/sdp/output/source_sisupod.d
@@ -30,7 +30,7 @@ template SiSUpod() {
// used both by sisupod zipped (& sisupod filesystem (unzipped) which makes its own recursive dirs)
pths_sisupod.sisupod_dir_().mkdirRecurse;
}
- if (doc_matters.opt_action["source"]) {
+ if (doc_matters.opt_action.source) {
if (!exists(pths_sisupod.text_root(doc_matters.source_filename).filesystem_open_zpod)) {
pths_sisupod.text_root(doc_matters.source_filename).filesystem_open_zpod.mkdirRecurse;
}
@@ -70,10 +70,10 @@ template SiSUpod() {
auto fn_src_out_sisupod_zip_base = pths_sisupod.image_root(doc_matters.source_filename).zpod.to!string ~ "/" ~ image;
auto fn_src_out_filesystem = pths_sisupod.image_root(doc_matters.source_filename).filesystem_open_zpod.to!string ~ "/" ~ image;
if (exists(fn_src_in)) {
- if (doc_matters.opt_action["source"]) {
+ if (doc_matters.opt_action.source) {
fn_src_in.copy(fn_src_out_filesystem);
}
- if (doc_matters.opt_action["sisupod"]) {
+ if (doc_matters.opt_action.sisupod) {
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn_src_out_sisupod_zip_base;
auto zip_data = new OutBuffer();
@@ -88,10 +88,10 @@ template SiSUpod() {
auto fn_src_out_sisupod_zip_base = pths_sisupod.conf_root(doc_matters.source_filename).zpod.to!string ~ "/" ~ "sisu_document_make";
auto fn_src_out_filesystem = pths_sisupod.conf_root(doc_matters.source_filename).filesystem_open_zpod.to!string ~ "/" ~ "sisu_document_make";
if (exists(fn_src_in)) {
- if (doc_matters.opt_action["source"]) {
+ if (doc_matters.opt_action.source) {
fn_src_in.copy(fn_src_out_filesystem);
}
- if (doc_matters.opt_action["sisupod"]) {
+ if (doc_matters.opt_action.sisupod) {
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn_src_out_sisupod_zip_base;
auto zip_data = new OutBuffer();
@@ -110,14 +110,14 @@ template SiSUpod() {
if (exists(fn_src_in)) {
filelist_src_out_sisupod_arr ~= fn_src_out_sisupod_zip_base;
filelist_src_zpod_arr ~= fn_src_out_inside_pod;
- if (doc_matters.opt_action["source"]) {
+ if (doc_matters.opt_action.source) {
auto filelist = File(pths_sisupod.fn_pod_filelist(doc_matters.source_filename).filesystem_open_zpod, "w");
foreach (source_pth_and_fn; filelist_src_zpod_arr) {
filelist.writeln(source_pth_and_fn);
}
fn_src_in.copy(fn_src_out_filesystem);
}
- if (doc_matters.opt_action["sisupod"]) {
+ if (doc_matters.opt_action.sisupod) {
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn_src_out_sisupod_zip_base;
auto zip_data = new OutBuffer();
@@ -150,10 +150,10 @@ template SiSUpod() {
insert_file,
).filesystem_open_zpod.to!string;
if (exists(fn_src_in)) {
- if (doc_matters.opt_action["source"]) {
+ if (doc_matters.opt_action.source) {
fn_src_in.copy(fn_src_out_filesystem);
}
- if (doc_matters.opt_action["sisupod"]) {
+ if (doc_matters.opt_action.sisupod) {
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn_src_out_sisupod_zip_base;
auto zip_data = new OutBuffer();
@@ -168,7 +168,7 @@ template SiSUpod() {
} {
auto fn_src_in = doc_matters.source_filename;
if (exists(fn_src_in)) {
- if (doc_matters.opt_action["sisupod"]) {
+ if (doc_matters.opt_action.sisupod) {
createZipFile!()(fn_sisupod, zip.build());
}
}
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
diff --git a/src/sdp/output/sqlite_discrete.d b/src/sdp/output/sqlite_discrete.d
index 132d312..7415f4c 100644
--- a/src/sdp/output/sqlite_discrete.d
+++ b/src/sdp/output/sqlite_discrete.d
@@ -44,7 +44,7 @@ template SQLiteDiscreteBuildTablesAndPopulate() {
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 SQLiteDiscreteBuildTablesAndPopulate() {
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 SQLiteDiscreteBuildTablesAndPopulate() {
"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 SQLiteDiscreteBuildTablesAndPopulate() {
"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 SQLiteDiscreteBuildTablesAndPopulate() {
"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 SQLiteDiscreteBuildTablesAndPopulate() {
"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 SQLiteDiscreteBuildTablesAndPopulate() {
"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 SQLiteDiscreteBuildTablesAndPopulate() {
"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 SQLiteDiscreteBuildTablesAndPopulate() {
"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 SQLiteDiscreteBuildTablesAndPopulate() {
"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"]);
}
@@ -908,14 +908,14 @@ template SQLiteDiscreteBuildTablesAndPopulate() {
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;
@@ -937,7 +937,7 @@ template SQLiteDiscreteBuildTablesAndPopulate() {
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;
@@ -966,14 +966,14 @@ template SQLiteDiscreteBuildTablesAndPopulate() {
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;
@@ -1003,14 +1003,14 @@ template SQLiteDiscreteBuildTablesAndPopulate() {
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;
@@ -1019,7 +1019,7 @@ template SQLiteDiscreteBuildTablesAndPopulate() {
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