aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output_hub.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/output_hub.org')
-rw-r--r--org/output_hub.org111
1 files changed, 42 insertions, 69 deletions
diff --git a/org/output_hub.org b/org/output_hub.org
index 89be2ca..08d47fe 100644
--- a/org/output_hub.org
+++ b/org/output_hub.org
@@ -27,12 +27,27 @@
module sdp.output.hub;
template outputHub() {
<<output_imports>>
+ import std.parallelism;
void outputHub(D,I)(D doc_abstraction, I doc_matters) {
mixin SiSUoutputRgxInit;
mixin Msg;
auto msg = Msg!()(doc_matters);
static auto rgx = Rgx();
- <<output_options>>
+ enum outTask { sisupod, source, sqlite, sqlite_multi, epub, html_scroll, html_seg, html_stuff }
+ void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) {
+ auto msg = Msg!()(doc_matters);
+ <<output_scheduled_task>>
+ }
+ if (!(doc_matters.opt.action.pp2)) {
+ foreach(schedule; doc_matters.opt.action.output_task_scheduler) {
+ Scheduled!()(schedule, doc_abstraction, doc_matters);
+ }
+ } else {
+ foreach(schedule; parallel(doc_matters.opt.action.output_task_scheduler)) {
+ Scheduled!()(schedule, doc_abstraction, doc_matters);
+ }
+ }
+ <<output_shared_sqlite_db>>
}
}
template outputHubOp() {
@@ -59,92 +74,50 @@ import sdp.output,
sdp.output.paths_output;
#+END_SRC
-** output options
-*** verbose
-
-#+name: output_options
-#+BEGIN_SRC d
-if (doc_matters.opt.action.verbose) {
- writeln(doc_matters.xml.keys_seq.seg);
-}
-#+END_SRC
-
-*** output source: _sisusrc_ &/or _sisupod_
-- [[./output_sisupod.org][output_sisupod]]
-
-#+name: output_options
+#+name: output_scheduled_task
#+BEGIN_SRC d
-if ((doc_matters.opt.action.source)
-|| (doc_matters.opt.action.sisupod)) {
- if (doc_matters.opt.action.source) {
- msg.v("sisu source processing...");
- }
- if (doc_matters.opt.action.sisupod) {
- msg.v("sisupod source processing...");
- }
+if (sched == outTask.sisupod) {
+ msg.v("sisu source processing... ");
SiSUpod!()(doc_matters);
- if (doc_matters.opt.action.source) {
- msg.vv("sisu source done");
- }
- if (doc_matters.opt.action.sisupod) {
- msg.v("sisupod source done");
- }
+ msg.vv("sisu source done");
}
-#+END_SRC
-
-*** html
-- [[./output_xmls.org][output_xmls]]
-
-#+name: output_options
-#+BEGIN_SRC d
-if (doc_matters.opt.action.html_seg) {
- msg.v("html seg source processing...");
- outputHTML!().seg(doc_abstraction, doc_matters);
- msg.vv("html seg done");
+if (sched == outTask.sqlite) {
+ msg.v("sqlite processing... ");
+ SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_abstraction, doc_matters);
+ msg.vv("sqlite done");
}
-if (doc_matters.opt.action.html_scroll) {
- msg.v("html scroll source processing...");
+if (sched == outTask.epub) {
+ msg.v("epub3 processing... ");
+ outputEPub3!()(doc_abstraction, doc_matters);
+ msg.vv("epub3 done");
+}
+if (sched == outTask.html_scroll) {
+ msg.v("html scroll processing... ");
outputHTML!().scroll(doc_abstraction, doc_matters);
msg.vv("html scroll done");
}
-if (doc_matters.opt.action.html_stuff) {
- msg.v("html copying images & css...");
+if (sched == outTask.html_seg) {
+ msg.v("html seg processing... ");
+ outputHTML!().seg(doc_abstraction, doc_matters);
+ msg.vv("html seg done");
+}
+if (sched == outTask.html_stuff) {
outputHTML!().css(doc_matters);
outputHTML!().images_cp(doc_matters);
msg.vv("html css & images done");
}
#+END_SRC
-*** epub
-- [[./output_xmls.org][output_xmls]]
-
-#+name: output_options
-#+BEGIN_SRC d
-if (doc_matters.opt.action.epub) {
- msg.v("epub3 source processing...");
- outputEPub3!()(doc_abstraction, doc_matters);
- msg.vv("epub3 done");
-}
-#+END_SRC
-
-*** sqlite
-- [[./output_sqlite.org][output_sqlite]]
-
-**** discrete
+** output options
+*** verbose
-#+name: output_options
-#+BEGIN_SRC d
-if (doc_matters.opt.action.sqlite_discrete) {
- msg.v("sqlite processing...");
- SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_abstraction, doc_matters);
- msg.vv("sqlite done");
-}
-#+END_SRC
+*** output source: _sisusrc_ &/or _sisupod_
+- [[./output_sisupod.org][output_sisupod]]
**** collection
***** update / populate
-#+name: output_options
+#+name: output_shared_sqlite_db
#+BEGIN_SRC d
if (doc_matters.opt.action.sqlite_insert
|| doc_matters.opt.action.sqlite_update