aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/doc_reform.org75
-rw-r--r--org/output_hub.org2
2 files changed, 57 insertions, 20 deletions
diff --git a/org/doc_reform.org b/org/doc_reform.org
index 47a26c7..f55349d 100644
--- a/org/doc_reform.org
+++ b/org/doc_reform.org
@@ -81,16 +81,32 @@ void main(string[] args) {
<<doc_reform_mixin>>
<<doc_reform_args>>
<<doc_reform_do_selected>>
- if (_manifests.length > 1) { // _manifests[0] initialized dummy element
- foreach(manifest; parallel(_manifests[1..$])) {
- if (!empty(manifest.src.filename)) {
- <<doc_reform_each_file_do_scope>>
- <<doc_reform_each_file_do_abstraction>>
- <<doc_reform_each_file_do_debugs_checkdoc>>
- <<doc_reform_each_file_do_selected_output>>
- <<doc_reform_each_file_do_scope_exit>>
- } else {
- <<doc_reform_no_filename_provided>>
+ if (_manifests.length > 1 // _manifests[0] initialized dummy element
+ && _opt_action.abstraction) {
+ if (_opt_action.parallelise) { // note cannot parallelise sqlite shared db
+ foreach(manifest; parallel(_manifests[1..$])) {
+ if (!empty(manifest.src.filename)) {
+ <<doc_reform_each_file_do_scope>>
+ <<doc_reform_each_file_do_abstraction>>
+ <<doc_reform_each_file_do_debugs_checkdoc>>
+ <<doc_reform_each_file_do_selected_output>>
+ <<doc_reform_each_file_do_scope_exit>>
+ } else {
+ <<doc_reform_no_filename_provided>>
+ }
+ }
+ } else {
+ foreach(manifest; _manifests[1..$]) {
+ writeln("parallelisation off: actions include sqlite shared db");
+ if (!empty(manifest.src.filename)) {
+ <<doc_reform_each_file_do_scope>>
+ <<doc_reform_each_file_do_abstraction>>
+ <<doc_reform_each_file_do_debugs_checkdoc>>
+ <<doc_reform_each_file_do_selected_output>>
+ <<doc_reform_each_file_do_scope_exit>>
+ } else {
+ <<doc_reform_no_filename_provided>>
+ }
}
}
}
@@ -237,7 +253,8 @@ bool[string] opts = [
"html-scroll" : false,
"manifest" : false,
"ocn" : true,
- "pp2" : false,
+ "parallelise" : true,
+ "parallelise-subprocesses" : false,
"quiet" : false,
"sisupod" : false,
"source" : false,
@@ -281,7 +298,8 @@ auto helpInfo = getopt(args,
"html-scroll", "--html-seg process html output", &opts["html-scroll"],
"manifest", "--manifest process manifest output", &opts["manifest"],
"ocn", "--ocn object cite numbers (default)", &opts["ocn"],
- "pp2", "--pp2 nested parallelisation", &opts["pp2"],
+ "parallelise", "--parallelise parallelisation", &opts["parallelise"],
+ "parallelise-subprocesses", "--parallelise-subprocesses nested parallelisation", &opts["parallelise-subprocesses"],
"quiet", "--quiet output to terminal", &opts["quiet"],
"sisupod", "--sisupod sisupod source content bundled", &opts["sisupod"],
"source", "--source markup source text content", &opts["source"],
@@ -412,14 +430,29 @@ struct OptActions {
: false;
return _is;
}
- auto sqlite_insert() {
- return opts["sqlite-insert"];
- }
auto sqlite_delete() {
return opts["sqlite-delete"];
}
auto sqlite_update() {
- return opts["sqlite-update"];
+ bool _is = (
+ opts["sqlite-update"]
+ || opts["sqlite-insert"]
+ )
+ ? true
+ : false;
+ return _is;
+ }
+ auto sqlite_shared_db_action() {
+ bool _is = (
+ opts["sqlite-db-recreate"]
+ || opts["sqlite-db-create"]
+ || opts["sqlite-delete"]
+ || opts["sqlite-insert"]
+ || opts["sqlite-update"]
+ )
+ ? true
+ : false;
+ return _is;
}
auto text() {
return opts["text"];
@@ -475,8 +508,13 @@ struct OptActions {
auto sqlite_filename() {
return settings["sqlite-filename"];
}
- auto pp2() {
- return opts["pp2"];
+ auto parallelise() {
+ bool _is = ( opts["parallelise"]) ? true : false;
+ _is = ( sqlite_shared_db_action ) ? false : true;
+ return _is;
+ }
+ auto parallelise_subprocesses() {
+ return opts["parallelise-subprocesses"];
}
auto output_task_scheduler() {
int[] schedule;
@@ -514,7 +552,6 @@ struct OptActions {
|| source
|| sqlite_discrete
|| sqlite_delete
- || sqlite_insert
|| sqlite_update
)
? true
diff --git a/org/output_hub.org b/org/output_hub.org
index 9345458..6cb7f9b 100644
--- a/org/output_hub.org
+++ b/org/output_hub.org
@@ -37,7 +37,7 @@ template outputHub() {
auto msg = Msg!()(doc_matters);
<<output_scheduled_task>>
}
- if (!(doc_matters.opt.action.pp2)) {
+ if (!(doc_matters.opt.action.parallelise_subprocesses)) {
foreach(schedule; doc_matters.opt.action.output_task_scheduler) {
Scheduled!()(schedule, doc_abstraction, doc_matters);
}