From eed0938b23d13ec4f2ef4588ccdb2e7abc0c1552 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 29 Mar 2020 18:29:44 -0400 Subject: 0.10.0 search sqlite & cgi --- org/output_hub.org | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'org/output_hub.org') diff --git a/org/output_hub.org b/org/output_hub.org index e6b429c..560cc2e 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -58,7 +58,7 @@ template outputHub() { } template outputHubOp() { <> - @system void outputHubOp(E,O)(E env, O opt_action) { + @system void outputHubOp(E,O,M)(E env, O opt_action, M make_and_meta_struct) { mixin spineRgxOut; static auto rgx = RgxO(); <> @@ -73,7 +73,6 @@ template outputHubOp() { import doc_reform.io_out, doc_reform.io_out.metadata, doc_reform.io_out.xmls, - doc_reform.io_out.odt, doc_reform.io_out.create_zip_file, doc_reform.io_out.paths_output; #+END_SRC @@ -240,6 +239,7 @@ if ((opt_action.sqlite_db_drop)) { #+BEGIN_SRC d if ((opt_action.sqlite_db_create)) { if ((opt_action.verbose)) { + auto pth_sqlite_db = spinePathsSQLite!()(opt_action.cgi_sqlite_search_filename, opt_action.output_dir_set); writeln("sqlite create table..."); } import doc_reform.io_out.sqlite; @@ -250,4 +250,31 @@ if ((opt_action.sqlite_db_create)) { } #+END_SRC +**** cgi sqlite search form + +#+NAME: output_options_op +#+BEGIN_SRC d +if ((opt_action.cgi_search_form_codegen)) { + if ((opt_action.verbose)) { + string _sqlite_db_fn = (opt_action.sqlite_filename.empty) + ? make_and_meta_struct.conf.w_srv_db_sqlite + : opt_action.sqlite_filename; + string _cgi_search_script = (opt_action.cgi_sqlite_search_filename.empty) + ? make_and_meta_struct.conf.w_srv_cgi_search_script + : opt_action.cgi_sqlite_search_filename; + string _cgi_search_script_raw_fn_d = (opt_action.cgi_sqlite_search_filename_d.empty) + ? make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d + : opt_action.cgi_sqlite_search_filename_d; + auto pth_sqlite_cgi = spinePathsSQLiteCGI!()(_cgi_search_script_raw_fn_d, _cgi_search_script, opt_action.output_dir_set); + writeln("sqlite cgi search form..."); + writeln(" ", pth_sqlite_cgi.search_form_path_out); + } + import doc_reform.io_out.cgi_sqlite_search_form; + CGIsearchSQLite!()(env, opt_action, make_and_meta_struct); + if ((opt_action.very_verbose)) { + writeln("sqlite cgi search form done"); + } +} +#+END_SRC + * __END__ -- cgit v1.2.3