From 25c30732826b75420bab6287bfe7cbbc9f75e3b5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 6 Jun 2017 17:54:49 -0400 Subject: getopt, fixes, & naming command line options related --- org/output_hub.org | 69 +++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) (limited to 'org/output_hub.org') diff --git a/org/output_hub.org b/org/output_hub.org index 0cf300a..5855810 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -52,7 +52,7 @@ import sdp.output, #+name: output_options #+BEGIN_SRC d -if ((doc_matters.opt_action_bool["verbose"])) { +if ((doc_matters.opt_action["verbose"])) { writeln(doc_matters.keys_seq.seg); } #+END_SRC @@ -62,20 +62,20 @@ if ((doc_matters.opt_action_bool["verbose"])) { #+name: output_options #+BEGIN_SRC d -if ((doc_matters.opt_action_bool["source"]) -|| (doc_matters.opt_action_bool["sisupod"])) { - if ((doc_matters.opt_action_bool["verbose"]) - && (doc_matters.opt_action_bool["source"])) - { write("sisu source processing... "); } - if ((doc_matters.opt_action_bool["verbose"]) - && (doc_matters.opt_action_bool["sisupod"])) - { write("sisupod source processing... "); } +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"])) + { writeln("sisupod source processing... "); } SiSUpod!()(doc_matters); - if ((doc_matters.opt_action_bool["verbose"]) - && (doc_matters.opt_action_bool["source"])) + if ((doc_matters.opt_action["verbose"]) + && (doc_matters.opt_action["source"])) { writeln("sisu source done"); } - if ((doc_matters.opt_action_bool["verbose"]) - && (doc_matters.opt_action_bool["sisupod"])) + if ((doc_matters.opt_action["verbose"]) + && (doc_matters.opt_action["sisupod"])) { writeln("sisupod done"); } } #+END_SRC @@ -85,9 +85,9 @@ if ((doc_matters.opt_action_bool["source"]) #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action_bool["text"]) { +if (doc_matters.opt_action["text"]) { /+ mixin outputText; +/ - writeln("text processing"); + if ((doc_matters.opt_action["verbose"])) { writeln("text processing... "); } } #+END_SRC @@ -96,21 +96,21 @@ if (doc_matters.opt_action_bool["text"]) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action_bool["html"]) { - if ((doc_matters.opt_action_bool["verbose"])) { write("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_bool["verbose"])) { writeln("html scroll done"); } - if ((doc_matters.opt_action_bool["verbose"])) { write("html seg processing... "); } + if ((doc_matters.opt_action["verbose"])) { 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_bool["verbose"])) { writeln("html seg done"); } -} else if (doc_matters.opt_action_bool["html_seg"]) { - if ((doc_matters.opt_action_bool["verbose"])) { write("html seg processing... "); } + if ((doc_matters.opt_action["verbose"])) { writeln("html seg done"); } +} 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_bool["verbose"])) { writeln("html seg done"); } -} else if (doc_matters.opt_action_bool["html_scroll"]) { - if ((doc_matters.opt_action_bool["verbose"])) { write("html scroll processing... "); } + if ((doc_matters.opt_action["verbose"])) { writeln("html seg done"); } +} 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_bool["verbose"])) { writeln("html scroll done"); } + if ((doc_matters.opt_action["verbose"])) { writeln("html scroll done"); } } #+END_SRC @@ -119,11 +119,11 @@ if (doc_matters.opt_action_bool["html"]) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action_bool["epub"]) { - if ((doc_matters.opt_action_bool["verbose"])) { write("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_bool["verbose"])) { writeln("epub3 done"); } + if ((doc_matters.opt_action["verbose"])) { writeln("epub3 done"); } } #+END_SRC @@ -131,7 +131,7 @@ if (doc_matters.opt_action_bool["epub"]) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action_bool["pdf"]) { +if (doc_matters.opt_action["pdf"]) { /+ mixin outputPDF; +/ writeln("pdf processing"); } @@ -141,7 +141,7 @@ if (doc_matters.opt_action_bool["pdf"]) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action_bool["odt"]) { +if (doc_matters.opt_action["odt"]) { /+ mixin outputODT; +/ writeln("odt processing"); } @@ -151,9 +151,8 @@ if (doc_matters.opt_action_bool["odt"]) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action_bool["sqlite"]) { - /+ mixin outputSQLite; +/ - writeln("sqlite processing"); +if (doc_matters.opt_action["sqlite"]) { + if ((doc_matters.opt_action["verbose"])) { writeln("sqlite processing... "); } } #+END_SRC @@ -161,7 +160,7 @@ if (doc_matters.opt_action_bool["sqlite"]) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action_bool["postgresql"]) { +if (doc_matters.opt_action["postgresql"]) { /+ mixin outputPostgreSQL; +/ writeln("pgsql processing"); } -- cgit v1.2.3