From 18b44eb25e8a8521eadd5e73a4e82bbee954e744 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 8 Nov 2018 22:39:07 -0500 Subject: --workon flag, for some under construction code --- src/doc_reform/doc_reform.d | 5 ++++ src/doc_reform/output/xmls.d | 59 +++++++++++++++++++++++++++++--------------- 2 files changed, 44 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d index 1d39909..30b79a9 100755 --- a/src/doc_reform/doc_reform.d +++ b/src/doc_reform/doc_reform.d @@ -95,6 +95,7 @@ void main(string[] args) { "section_blurb" : true, "backmatter" : true, "skip-output" : false, + "workon" : false, ]; string[string] settings = [ "output-dir" : "", @@ -142,6 +143,7 @@ void main(string[] args) { "section-blurb", "--section-blurb process document blurb (default)", &opts["section_blurb"], "backmatter", "--section-backmatter process document backmatter (default)", &opts["backmatter"], "skip-output", "--skip-output", &opts["skip-output"], + "workon", "--workon (reserved for some matters under development & testing)", &opts["workon"], "output-dir", "--output-dir=[dir path]", &settings["output-dir"], "site-config-dir", "--site-config-dir=[dir path]", &settings["site-config-dir"], "sqlite-filename", "--sqlite-filename=[filename].sqlite", &settings["sqlite-filename"], @@ -310,6 +312,9 @@ void main(string[] args) { auto skip_output() { return opts["skip-output"]; } + auto workon() { + return opts["workon"]; + } auto languages_set() { return settings["lang"].split(","); } diff --git a/src/doc_reform/output/xmls.d b/src/doc_reform/output/xmls.d index 6f1f925..fad0bdf 100644 --- a/src/doc_reform/output/xmls.d +++ b/src/doc_reform/output/xmls.d @@ -158,7 +158,7 @@ template outputXHTMLs() { .replaceAll( rgx.br_nl, ""); } else { - _locations = "

DocReform

\n

www.sisudoc.org

\n

sources / git

"; + _locations = "

doc-reform

\n

sources / git

\n

www.sisudoc.org

"; } string o; o = format(q"¶
@@ -174,21 +174,32 @@ template outputXHTMLs() { string _action="http://www.sisudoc.org/cgi-bin/search.cgi"; string _db="DocReform.7a.manual"; string o; - o = format(q"¶
- -
- - - - - -
- - -
+ string _form; + if (doc_matters.opt.action.workon) { + _form = format(q"¶ + +
+ + + + + +
+ + +
+ ¶", + _action, + _db, + ); + } else { + _form = format(q"¶%s¶", + "", + ); + } + o = format(q"¶
%s
¶", - _action, - _db, + _form, ); return o; } @@ -196,6 +207,17 @@ template outputXHTMLs() { M doc_matters, string type, ) { + string _manifest = ""; + if (doc_matters.opt.action.workon) { + _manifest = format(q"¶ + + + [ document manifest ] + + + ¶", + ); + } string o; o = format(q"¶ @@ -217,11 +239,7 @@ template outputXHTMLs() {
%s %s%s¶", doc_matters.conf_make_meta.meta.title_full, @@ -234,6 +252,7 @@ template outputXHTMLs() { : "../../css/html_scroll.css"), doc_matters.src.language, site_info_button(doc_matters), + _manifest, inline_search_form(doc_matters), ((type == "seg") ? "" : "\n
"), ); -- cgit v1.2.3