From 02718313824caa0e87eb0f1448684ff8d2dbe4d1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 5 Oct 2021 12:39:53 -0400 Subject: primarily org related --- COPYRIGHT | 14 +- README.md | 2 +- org/COPYRIGHT | 2 +- org/cgi_spine_search.org | 2 +- org/compile_time_info.org | 2 +- org/config_d_cfte.org | 101 +- org/default_misc.org | 2 +- org/default_paths.org | 2 +- org/default_regex.org | 2 +- org/default_shared.org | 2 +- org/imports.org | 2 +- org/in_source_files.org | 12 +- org/meta_conf_make_meta.org | 32 +- org/meta_debugs.org | 2 +- org/metaverse.org | 2 +- org/out_cgi_search_sqlite.org | 2 +- org/out_curate_metadata.org | 2 +- org/out_latex.org | 2 +- org/out_metadata.org | 2 +- org/out_odt.org | 2 +- org/out_sqlite.org | 2 +- org/out_src_pod.org | 2 +- org/out_xmls.org | 2 +- org/out_xmls_css.org | 2 +- org/out_zip.org | 2 +- org/output_hub.org | 2 +- org/output_show.org | 2 +- org/spine.org | 123 +- org/spine_info.org | 20 +- org/util_cgi_d_sqlite_search.org | 2 +- org/util_cgi_rb_fcgi_sqlite_search.org | 2 +- src/COPYRIGHT | 14 +- src/doc_reform/COPYRIGHT | 14 +- src/doc_reform/conf/compile_time_info.d | 2 +- src/doc_reform/io_in/paths_source.d | 2 +- src/doc_reform/io_in/read_config_files.d | 10 +- src/doc_reform/io_in/read_source_files.d | 2 +- src/doc_reform/io_out/cgi_sqlite_search_form.d | 1044 +-- src/doc_reform/io_out/create_zip_file.d | 2 +- src/doc_reform/io_out/defaults.d | 2 +- src/doc_reform/io_out/epub3.d | 8 +- src/doc_reform/io_out/html.d | 4 +- src/doc_reform/io_out/hub.d | 2 +- src/doc_reform/io_out/latex.d | 396 +- src/doc_reform/io_out/metadata.d | 2 +- src/doc_reform/io_out/odt.d | 372 +- src/doc_reform/io_out/package.d | 2 +- src/doc_reform/io_out/paths_output.d | 2 +- src/doc_reform/io_out/rgx.d | 2 +- src/doc_reform/io_out/source_pod.d | 4 +- src/doc_reform/io_out/sqlite.d | 162 +- src/doc_reform/io_out/xmls.d | 2 +- src/doc_reform/io_out/xmls_css.d | 7388 ++++++++++---------- src/doc_reform/meta/conf_make_meta_json.d | 2 +- src/doc_reform/meta/conf_make_meta_structs.d | 2 +- src/doc_reform/meta/conf_make_meta_yaml.d | 8 +- src/doc_reform/meta/defaults.d | 2 +- src/doc_reform/meta/doc_debugs.d | 2 +- src/doc_reform/meta/metadoc.d | 254 +- src/doc_reform/meta/metadoc_curate.d | 2 +- src/doc_reform/meta/metadoc_curate_authors.d | 2 +- src/doc_reform/meta/metadoc_curate_topics.d | 2 +- src/doc_reform/meta/metadoc_from_src.d | 2 +- src/doc_reform/meta/metadoc_object_setter.d | 2 +- src/doc_reform/meta/metadoc_show_config.d | 2 +- src/doc_reform/meta/metadoc_show_make.d | 2 +- src/doc_reform/meta/metadoc_show_metadata.d | 2 +- src/doc_reform/meta/metadoc_show_summary.d | 2 +- src/doc_reform/meta/package.d | 2 +- src/doc_reform/meta/rgx.d | 2 +- src/doc_reform/share/defaults.d | 2 +- src/doc_reform/spine.d | 30 +- sundry/editor-syntax-etc/emacs/README | 4 + .../emacs/sisu-spine-mode-autoloads.el | 10 + sundry/editor-syntax-etc/emacs/sisu-spine-mode.el | 493 ++ sundry/editor-syntax-etc/vim/colors/def-sisu.vim | 223 + sundry/editor-syntax-etc/vim/colors/def.vim | 223 + .../vim/colors/frugal-cterm-sisu.vim | 66 + sundry/editor-syntax-etc/vim/colors/slate.vim | 75 + sundry/editor-syntax-etc/vim/filetype.vim | 8 + sundry/editor-syntax-etc/vim/ftplugin/sisu.vim | 224 + sundry/editor-syntax-etc/vim/templates/ssi.tpl | 30 + sundry/editor-syntax-etc/vim/templates/ssm.tpl | 30 + sundry/editor-syntax-etc/vim/templates/sst.tpl | 30 + sundry/editor-syntax-etc/vim/vim-sisu.yaml | 7 + .../d/cgi/search/src/spine_cgi_sqlite_search.d | 976 +-- sundry/misc/util/rb/tex/dr_tex.rb | 28 +- sundry/spine_search_cgi/src/spine_search.d_ | 34 +- sundry/util/d/tools/markup_conversion/README | 1 + .../endnotes_inline_from_binary.d | 123 + .../markup_changes_header_and_content.d | 244 + ...arkup_conversion_from_sisu_ruby_to_sisu_spine.d | 367 + sundry/util/rb/cgi/spine.search.cgi | 952 +++ 93 files changed, 8701 insertions(+), 5561 deletions(-) create mode 100644 sundry/editor-syntax-etc/emacs/README create mode 100644 sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el create mode 100644 sundry/editor-syntax-etc/emacs/sisu-spine-mode.el create mode 100644 sundry/editor-syntax-etc/vim/colors/def-sisu.vim create mode 100644 sundry/editor-syntax-etc/vim/colors/def.vim create mode 100644 sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim create mode 100644 sundry/editor-syntax-etc/vim/colors/slate.vim create mode 100644 sundry/editor-syntax-etc/vim/filetype.vim create mode 100644 sundry/editor-syntax-etc/vim/ftplugin/sisu.vim create mode 100644 sundry/editor-syntax-etc/vim/templates/ssi.tpl create mode 100644 sundry/editor-syntax-etc/vim/templates/ssm.tpl create mode 100644 sundry/editor-syntax-etc/vim/templates/sst.tpl create mode 100644 sundry/editor-syntax-etc/vim/vim-sisu.yaml create mode 100644 sundry/util/d/tools/markup_conversion/README create mode 100755 sundry/util/d/tools/markup_conversion/endnotes_inline_from_binary.d create mode 100755 sundry/util/d/tools/markup_conversion/markup_changes_header_and_content.d create mode 100755 sundry/util/d/tools/markup_conversion/markup_conversion_from_sisu_ruby_to_sisu_spine.d create mode 100755 sundry/util/rb/cgi/spine.search.cgi diff --git a/COPYRIGHT b/COPYRIGHT index 6995436..6f8b82e 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -40,7 +40,7 @@ - docReform object numbering (based on SiSU object citation numbering) - standard SiSU document object numbering - - Hompages: + - Homepages: [https://www.sisudoc.org] - Spine, Doc Reform (SiSU) markup samples @@ -64,7 +64,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/d2sqlite3] [https://code.dlang.org/packages/d2sqlite3] @@ -82,7 +82,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/D-YAML] [https://code.dlang.org/packages/dyaml] @@ -99,7 +99,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/lgvz/imageformats] [https://code.dlang.org/packages/imageformats] @@ -117,7 +117,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/tinyendian] [https://code.dlang.org/packages/tinyendian] @@ -137,7 +137,7 @@ [https://www.boost.org/LICENSE_1_0.txt] (Check the bottom of the file for details) - - Hompages: + - Homepages: [https://github.com/adamdruppe/arsd] @@ -152,5 +152,5 @@ - code: mkDub.nix (modified as needed) - License: MIT License - - Hompages: + - Homepages: [https://github.com/lionello/dub2nix] diff --git a/README.md b/README.md index 3a02b2f..ff3f066 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ project_name: Spine, Doc Reform license: "AGPL 3 or later" - hompage: [ + homepage: [ "https://www.doc_reform.org", "https://www.sisudoc.org" ] diff --git a/org/COPYRIGHT b/org/COPYRIGHT index c04e09b..5f52cb7 100644 --- a/org/COPYRIGHT +++ b/org/COPYRIGHT @@ -14,7 +14,7 @@ - docReform object numbering (based on SiSU object citation numbering) - standard SiSU document object numbering - - Hompages: + - Homepages: [https://www.sisudoc.org] - Spine, Doc Reform (SiSU) markup samples diff --git a/org/cgi_spine_search.org b/org/cgi_spine_search.org index 0a1b244..75d0ca1 100644 --- a/org/cgi_spine_search.org +++ b/org/cgi_spine_search.org @@ -2160,7 +2160,7 @@ see configuration_cfte.org - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/compile_time_info.org b/org/compile_time_info.org index 7f75ece..4591799 100644 --- a/org/compile_time_info.org +++ b/org/compile_time_info.org @@ -85,7 +85,7 @@ template CompileTimeInfo() { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/config_d_cfte.org b/org/config_d_cfte.org index 9efa9ea..ae3f9c4 100644 --- a/org/config_d_cfte.org +++ b/org/config_d_cfte.org @@ -63,7 +63,58 @@ version (Posix) { #+END_SRC ** set configuration SET :configuration: -*** shared settings SET + +SEE NOTES on configuration hierarchy in spine.org + +*** spine: configuration.txt SET + +#+HEADER: :tangle "../views/configuration_suggested.txt" +#+BEGIN_SRC d +/+ obt - org-mode generated file +/ +struct Cfg { + string www_http = "<>"; + string www_host = "<>"; + string www_url_doc_root = "<>"; + string www_doc_root = "<>"; + string www_host_doc_root = "localhost"; + string cgi_bin_root = "<>"; + string cgi_bin_subpath = "<>"; + string cgi_filename = "<>"; + string cgi_url_root = "<>://<><>"; + string cgi_port = ""; + string cgi_user = ""; + string cgi_url_action = "<>://<><>/<>"; + string cgi_search_form_title = "<>"; + string db_sqlite_path = "<>"; + string db_sqlite_filename = "<>"; + string default_language = "en"; + string default_papersize = "a4"; + string default_text_wrap = "80"; + string default_hash_digest = "sha256"; +} +enum _cfg = Cfg(); +#+END_SRC + +*** spine_search: configuration.txt SET + +#+HEADER: :tangle "../sundry/spine_search_cgi/views/configuration_suggested.txt" +#+BEGIN_SRC d +/+ obt - org-mode generated file +/ +struct Cfg { + string http_request_type = "<>"; + string http_host = "<>"; + string www_url_doc_root = "<>"; + string www_doc_root = "<>"; + string cgi_bin_subpath = "<>"; + string cgi_filename = "<>"; // "spine-search" + string cgi_search_form_title = "<>"; + string db_sqlite_path = "<>"; + string db_sqlite_filename = "<>"; +} +enum _cfg = Cfg(); +#+END_SRC + +*** shared settings SET defaults #+NAME: www_http #+BEGIN_SRC sh @@ -114,51 +165,3 @@ spine_search #+BEGIN_SRC sh spine.search.db #+END_SRC - -*** spine: configuration.txt SET - -#+HEADER: :tangle "../views/configuration_suggested.txt" -#+BEGIN_SRC d -/+ obt - org-mode generated file +/ -struct Cfg { - string www_http = "<>"; - string www_host = "<>"; - string www_url_doc_root = "<>"; - string www_doc_root = "<>"; - string www_host_doc_root = "localhost"; - string cgi_bin_root = "<>"; - string cgi_bin_subpath = "<>"; - string cgi_filename = "<>"; - string cgi_url_root = "<>://<><>"; - string cgi_port = ""; - string cgi_user = ""; - string cgi_url_action = "<>://<><>/<>"; - string cgi_search_form_title = "<>"; - string db_sqlite_path = "<>"; - string db_sqlite_filename = "<>"; - string default_language = "en"; - string default_papersize = "a4"; - string default_text_wrap = "80"; - string default_hash_digest = "sha256"; -} -enum _cfg = Cfg(); -#+END_SRC - -*** spine_search: configuration.txt SET - -#+HEADER: :tangle "../sundry/spine_search_cgi/views/configuration_suggested.txt" -#+BEGIN_SRC d -/+ obt - org-mode generated file +/ -struct Cfg { - string http_request_type = "<>"; - string http_host = "<>"; - string www_url_doc_root = "<>"; - string www_doc_root = "<>"; - string cgi_bin_subpath = "<>"; - string cgi_filename = "<>"; // "spine-search" - string cgi_search_form_title = "<>"; - string db_sqlite_path = "<>"; - string db_sqlite_filename = "<>"; -} -enum _cfg = Cfg(); -#+END_SRC diff --git a/org/default_misc.org b/org/default_misc.org index 0a1dad4..75db5d8 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -402,7 +402,7 @@ template spineLanguageCodes() { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/default_paths.org b/org/default_paths.org index 1eae1c7..30a2abf 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -1718,7 +1718,7 @@ template spinePathsSQLiteCGI() { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/default_regex.org b/org/default_regex.org index fdd9e01..5398aaa 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -636,7 +636,7 @@ static table_delimiter_row = ctRegex!("[ ]*\n", "mg"); - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/default_shared.org b/org/default_shared.org index d39b7ee..505d93b 100644 --- a/org/default_shared.org +++ b/org/default_shared.org @@ -100,7 +100,7 @@ template Msg() { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/imports.org b/org/imports.org index 63eb70c..6066622 100644 --- a/org/imports.org +++ b/org/imports.org @@ -129,7 +129,7 @@ public import - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/in_source_files.org b/org/in_source_files.org index db0f65e..205ac98 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -59,6 +59,8 @@ import *** read config files (config local site & dr document make) (yaml) **** site configuration +SEE NOTES on configuration hierarchy in spine.org + #+NAME: meta_config_file_hub_read_site_config #+BEGIN_SRC d template readConfigSite() { @@ -105,11 +107,11 @@ webserv: _cfg.www_doc_root, // doc root _cfg.www_http, // http _cfg.www_host, // host / domain - _cfg.www_http, // data http - _cfg.www_host, // data domain - _cfg.www_url_doc_root, // data root url + _cfg.www_http, // data "http" or "https" + _cfg.www_host, // data domain "localhost" + _cfg.www_url_doc_root, // data root url "http://locahost" "https://sisudoc.org" _cfg.www_doc_root, // data root path - _cfg.cgi_search_form_title, // cgi title + _cfg.cgi_search_form_title, // cgi title // e.g. "≅ SiSU Spine search" _cfg.www_http, // cgi http _cfg.www_host, // cgi host _cfg.cgi_url_root, // cgi bin url @@ -772,7 +774,7 @@ return t; - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index e9f770c..1bd2d7a 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -87,18 +87,18 @@ import doc_reform.meta.conf_make_meta_structs; #+BEGIN_SRC d <> module doc_reform.meta.conf_make_meta_structs; -<> -<> -<> -<> -<> -<> -<> +<> +<> +<> +<> +<> +<> +<> #+END_SRC ** initialize, imports etc. -#+NAME: meta_defaults_template_structs_0 +#+NAME: meta_defaults_template_structs_init #+BEGIN_SRC d import std.exception, @@ -121,7 +121,7 @@ static auto mkup = InlineMarkup(); ** struct Generic ConfComposite -#+NAME: meta_defaults_template_structs_1 +#+NAME: meta_defaults_template_structs_setup #+BEGIN_SRC d @safe string url_markup(string line) { string line_ = line @@ -233,7 +233,7 @@ struct confCompositeMakeBuild { ** initialize make & meta *** composite make -#+NAME: meta_defaults_template_structs_2 +#+NAME: meta_defaults_template_structs_composite_make_init #+BEGIN_SRC d struct ConfCompositeMakeInit { string[] bold; @@ -258,7 +258,9 @@ struct ConfCompositeMakeInit { *** struct: conf site local -#+NAME: meta_defaults_template_structs_3 +SEE NOTES on configuration hierarchy in spine.org + +#+NAME: meta_defaults_template_structs_conf_composite_site_local #+BEGIN_SRC d struct ConfCompositeSiteLocal { string w_srv_http; @@ -318,7 +320,7 @@ struct ConfCompositeSiteLocal { *** struct: composite meta -#+NAME: meta_defaults_template_structs_4 +#+NAME: meta_defaults_template_structs_meta_composite #+BEGIN_SRC d struct MetaComposite { string classify_dewey; @@ -378,7 +380,7 @@ struct MetaComposite { *** composite structs -#+NAME: meta_defaults_template_structs_5 +#+NAME: meta_defaults_template_structs_conf_composite #+BEGIN_SRC d struct ConfComposite { MetaComposite meta; @@ -390,7 +392,7 @@ struct ConfComposite { *** JSONValue -#+NAME: meta_defaults_template_structs_6 +#+NAME: meta_defaults_template_structs_json #+BEGIN_SRC d JSONValue config_jsonstr = `{ }`; @@ -2226,7 +2228,7 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/meta_debugs.org b/org/meta_debugs.org index c8971f2..d810c89 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -912,7 +912,7 @@ debug(checkdoc) { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/metaverse.org b/org/metaverse.org index 0118542..3ea4b56 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -8121,7 +8121,7 @@ struct TheObjects { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_cgi_search_sqlite.org b/org/out_cgi_search_sqlite.org index d8d9064..6709e8b 100644 --- a/org/out_cgi_search_sqlite.org +++ b/org/out_cgi_search_sqlite.org @@ -2332,7 +2332,7 @@ https://localhost/cgi-bin/spine-search? - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_curate_metadata.org b/org/out_curate_metadata.org index e085fe7..215c507 100644 --- a/org/out_curate_metadata.org +++ b/org/out_curate_metadata.org @@ -1021,7 +1021,7 @@ string theme_light_1 = format(q"┃ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_latex.org b/org/out_latex.org index 91ef042..5aecfbd 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -2100,7 +2100,7 @@ __END__ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_metadata.org b/org/out_metadata.org index b8c2652..6fb420c 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -613,7 +613,7 @@ string theme_light_1 = format(q"┃ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_odt.org b/org/out_odt.org index eefd3be..6ba4b93 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -2616,7 +2616,7 @@ doc_matters.generated_time, - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 2f09101..b01bb1f 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -2054,7 +2054,7 @@ string _insert_doc_objects_row = format(q"┃ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_src_pod.org b/org/out_src_pod.org index f96cda9..f1c6ff1 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -495,7 +495,7 @@ if (exists(fn_pod)) { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_xmls.org b/org/out_xmls.org index 41175be..e3ae216 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -3283,7 +3283,7 @@ zip -0 file.epub mimetype && zip -r -9 file.epub META-INF OEBPS - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_xmls_css.org b/org/out_xmls_css.org index c5e39f0..e42faf0 100644 --- a/org/out_xmls_css.org +++ b/org/out_xmls_css.org @@ -2468,7 +2468,7 @@ Consider what if anything should be used here - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/out_zip.org b/org/out_zip.org index 36c217e..c84e59e 100644 --- a/org/out_zip.org +++ b/org/out_zip.org @@ -90,7 +90,7 @@ template createZipFile() { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/output_hub.org b/org/output_hub.org index 3957e6e..d66956a 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -340,7 +340,7 @@ if ((opt_action.cgi_search_form_codegen)) { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/output_show.org b/org/output_show.org index e8bb130..f99f169 100644 --- a/org/output_show.org +++ b/org/output_show.org @@ -605,7 +605,7 @@ char_repeat_number = (char_repeat_number > min_repeat_number) - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/spine.org b/org/spine.org index 2696511..d9db466 100644 --- a/org/spine.org +++ b/org/spine.org @@ -1,5 +1,5 @@ -*- mode: org -*- -#+TITLE: spine (doc_reform) hub +#+TITLE: spine ≅ (doc-reform) hub #+DESCRIPTION: documents - structuring, various output representations & search #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah @@ -44,7 +44,7 @@ module doc_reform.sisu_document_parser; /++ name "spine" -description "A SiSU inspired document parser writen in D." +description "A SiSU inspired document parser written in D." homepage "https://sisudoc.org" +/ <> @@ -55,17 +55,17 @@ string project_name = "spine"; string program_name = "spine"; @system void main(string[] args) { <> - <> - <> - <> - <> - <> - <> - <> - <> - <> - <> - <> + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> if (_manifests.length > 1 // _manifests[0] initialized dummy element && _opt_action.abstraction) { if (_opt_action.parallelise) { // see else @@ -74,12 +74,7 @@ string program_name = "spine"; if (!empty(manifest.src.filename)) { <> <> - <> - <> - <> - <> - <> - <> + <> <> <> } else { @@ -94,12 +89,7 @@ string program_name = "spine"; if (!empty(manifest.src.filename)) { <> <> - <> - <> - <> - <> - <> - <> + <> <> <> } else { @@ -175,7 +165,7 @@ string program_name = "spine"; - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -292,14 +282,14 @@ mixin outputHub; **** init :init: -#+NAME: spine_init_0 +#+NAME: spine_init_curate_metadata #+BEGIN_SRC d auto hvst = spineCurateMetadata!(); #+END_SRC **** args :args: -#+NAME: spine_init_1 +#+NAME: spine_init_few #+BEGIN_SRC d string flag_action; string arg_unrecognized; @@ -309,7 +299,7 @@ static auto rgx = RgxI(); *** scope (run complete) :scope: -#+NAME: spine_init_2 +#+NAME: spine_init_scope #+BEGIN_SRC d scope(success) { writefln( @@ -335,7 +325,7 @@ scope(failure) { ***** initialize opts -#+NAME: spine_args_0_args_init_opts +#+NAME: spine_args_init_opts #+BEGIN_SRC d bool[string] opts = [ "abstraction" : false, @@ -347,11 +337,11 @@ bool[string] opts = [ "debug" : false, "digest" : false, "epub" : false, - "curate" : false, - "curate-authors" : false, - "curate-topics" : false, + "curate" : false, + "curate-authors" : false, + "curate-topics" : false, "html" : false, - "html-link-curate" : false, + "html-link-curate" : false, "html-link-search" : false, "html-seg" : false, "html-scroll" : false, @@ -403,9 +393,27 @@ bool[string] opts = [ ***** initialize settings -see also: config_d_cfte.org - -#+NAME: spine_args_0_args_init_settings +NOTES on configuration hierarchy: +- compile time program defaults views/configuration.txt in config_d_cfte.org + - config_d_cfte.org (writes views/configuration.txt) + - compile time program defaults, set in views/configuration.txt + - found in: _cfg.* +- run time default configuration administrators config ".dr/config_site_local" + - in_source_files.org readConfigSite (reads administrators site defaults from + yaml config file) + - meta_conf_make_meta.org struct ConfCompositeSiteLocal + - administrator site defaults read from yaml configuration file + ".dr/config_site_local" + - found in: "doc_matters.conf_make_meta.conf." (incorporates _cfg.* as + initial default values that are overridden if set) + - ("conf_make_meta.make" (& "conf_make_meta.meta") also available taken from + document headers) +- command line execution configuration instruction + - spine.org (org heading: initialize settings) (command line overrides) + - command line settings/overrides + - found in: doc_matters.opt.action.* + +#+NAME: spine_args_init_settings #+BEGIN_SRC d string[string] settings = [ "output" : "", //_cfg.www_doc_root, // "/srv/www/spine/static" or "/var/www/html" @@ -413,6 +421,8 @@ string[string] settings = [ "www-host" : "", //_cfg.www_host, // start with "localhost" ? "www-host-doc-root" : "", //_cfg.www_host_doc_root, // start with "localhost" ? "www-url-doc-root" : "", //_cfg.www_url_doc_root, // start with "http://localhost" ? + "cgi-http" : "", //_cfg.cgi_http, // suggest + "cgi-host" : "", //_cfg.cgi_host, // suggest "cgi-bin-root" : "", //_cfg.cgi_bin_root, // suggest "/var/www/cgi/cgi-bin" "cgi-sqlite-search-filename" : "", //_cfg.cgi_filename, // suggest "spine_search" (though "spine-search" would have been preferable?) "cgi-url-root" : "", //_cfg.cgi_url_root, // start with "http://localhost/cgi-bin" ? @@ -430,7 +440,7 @@ string[string] settings = [ ***** set & describe -#+NAME: spine_args_1_args_get_options_aa +#+NAME: spine_args_get_options_aa #+BEGIN_SRC d auto helpInfo = getopt(args, std.getopt.config.passThrough, @@ -524,7 +534,7 @@ if (helpInfo.helpWanted) { **** getopt hash to struct - move getopt options to struct -#+NAME: spine_args_2_args_get_options_aa2str +#+NAME: spine_args_get_options_aa2str #+BEGIN_SRC d enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff } struct OptActions { @@ -752,7 +762,7 @@ struct OptActions { return settings["www-host-doc-root"]; } @trusted string webserver_url_doc_root() { - return settings["www-url-root"]; + return settings["www-url-doc-root"]; } @trusted string webserver_http() { return settings["www-http"]; @@ -879,7 +889,7 @@ OptActions _opt_action = OptActions(); **** env - environmental info -#+NAME: spine_args_3_program_info +#+NAME: spine_args_program_info #+BEGIN_SRC d @safe auto program_info() { struct ProgramInfo { @@ -911,12 +921,12 @@ auto _env = [ *** get/read site config -#+NAME: spine_args_4_get_configuration_details +#+NAME: spine_args_get_configuration_details #+BEGIN_SRC d auto _manifested = PathMatters!()(_opt_action, _env, ""); auto _manifests = [ _manifested ]; auto _conf_file_details = configFilePaths!()(_manifested, _env, _opt_action.config_path_set); -ConfComposite _config; +ConfComposite _siteConfig; if ( _opt_action.require_processing_files && _opt_action.config_path_set.empty @@ -928,7 +938,7 @@ if ( _conf_file_details = configFilePaths!()(_manifested, _env, _opt_action.config_path_set); auto _config_local_site_struct = readConfigSite!()(_conf_file_details, _opt_action, _cfg); import doc_reform.meta.conf_make_meta_yaml; - _config = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_config, _manifested, _opt_action); // - get local site config + _siteConfig = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_siteConfig, _manifested, _opt_action); // - get local site config break; } } @@ -936,17 +946,17 @@ if ( } else { /+ local site config +/ auto _config_local_site_struct = readConfigSite!()(_conf_file_details, _opt_action, _cfg); import doc_reform.meta.conf_make_meta_yaml; - _config = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_config, _manifested, _opt_action); // - get local site config + _siteConfig = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_siteConfig, _manifested, _opt_action); // - get local site config } if (_opt_action.show_config) { import doc_reform.meta.metadoc_show_config; - spineShowSiteConfig!()(_opt_action, _config); + spineShowSiteConfig!()(_opt_action, _siteConfig); } #+END_SRC *** use config for operations that do not require file processing -#+NAME: spine_args_5_call_output_hub +#+NAME: spine_args_call_output_hub #+BEGIN_SRC d if (!(_opt_action.skip_output)) { if ((_opt_action.debug_do) @@ -954,7 +964,7 @@ if (!(_opt_action.skip_output)) { ) { writeln("step0 commence → (without processing files)"); } - outputHubOp!()(_env, _opt_action, _config); + outputHubOp!()(_env, _opt_action, _siteConfig); if ((_opt_action.debug_do) || (_opt_action.very_verbose) ) { @@ -965,10 +975,10 @@ if (!(_opt_action.skip_output)) { *** opt action on processing files (loop args) -#+NAME: spine_args_6_process_args +#+NAME: spine_args_process_args #+BEGIN_SRC d -ConfComposite _make_and_meta_struct = _config; -destroy(_config); +ConfComposite _make_and_meta_struct = _siteConfig; +destroy(_siteConfig); foreach(arg; args[1..$]) { if (arg.match(rgx.flag_action)) { /+ cli instruction, flag do +/ flag_action ~= " " ~ arg; // flags not taken by getopt @@ -1200,6 +1210,17 @@ if ((doc_matters.opt.action.debug_do) *** 2. _output processing_ (post abstraction processing) **** 0. abstraction ***** show document summary - abstraction _print summary_ (to screen) :abstraction:summary: + +#+NAME: spine_each_file_do_show +#+BEGIN_SRC d +<> +<> +<> +<> +<> +<> +#+END_SRC + --show-summary (abstraction summary) #+NAME: spine_each_file_do_debugs_checkdoc_0 diff --git a/org/spine_info.org b/org/spine_info.org index 4babdca..a23f110 100644 --- a/org/spine_info.org +++ b/org/spine_info.org @@ -54,7 +54,7 @@ project_name: Spine, Doc Reform license: "AGPL 3 or later" - hompage: [ + homepage: [ "https://www.doc_reform.org", "https://www.sisudoc.org" ] @@ -415,7 +415,7 @@ project_name: Spine, Doc Reform license: "AGPL 3 or later" - hompage: [ + homepage: [ "https://www.doc_reform.org", "https://www.sisudoc.org" ] @@ -4661,13 +4661,13 @@ matches are found. - docReform object numbering (based on SiSU object citation numbering) - standard SiSU document object numbering - - Hompages: + - Homepages: [https://www.sisudoc.org] #+END_SRC #+BEGIN_SRC txt - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -4706,7 +4706,7 @@ matches are found. Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/d2sqlite3] [https://code.dlang.org/packages/d2sqlite3] @@ -4724,7 +4724,7 @@ matches are found. Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/D-YAML] [https://code.dlang.org/packages/dyaml] @@ -4741,7 +4741,7 @@ matches are found. Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/lgvz/imageformats] [https://code.dlang.org/packages/imageformats] @@ -4759,7 +4759,7 @@ matches are found. Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/tinyendian] [https://code.dlang.org/packages/tinyendian] @@ -4779,7 +4779,7 @@ matches are found. [https://www.boost.org/LICENSE_1_0.txt] (Check the bottom of the file for details) - - Hompages: + - Homepages: [https://github.com/adamdruppe/arsd] @@ -4794,7 +4794,7 @@ matches are found. - code: mkDub.nix (modified as needed) - License: MIT License - - Hompages: + - Homepages: [https://github.com/lionello/dub2nix] #+END_SRC diff --git a/org/util_cgi_d_sqlite_search.org b/org/util_cgi_d_sqlite_search.org index 892da06..84d1b1e 100644 --- a/org/util_cgi_d_sqlite_search.org +++ b/org/util_cgi_d_sqlite_search.org @@ -118,7 +118,7 @@ mixin GenericMain!cgi_function_intro; - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/org/util_cgi_rb_fcgi_sqlite_search.org b/org/util_cgi_rb_fcgi_sqlite_search.org index 5e1d058..a11c9dc 100644 --- a/org/util_cgi_rb_fcgi_sqlite_search.org +++ b/org/util_cgi_rb_fcgi_sqlite_search.org @@ -83,7 +83,7 @@ document home currently at /var/www/html (better placed at /var/www or srv/proje * Standard SiSU meta-markup syntax, and the * Standard SiSU object citation numbering and system - * Hompages: + * Homepages: * Ralph Amissah diff --git a/src/COPYRIGHT b/src/COPYRIGHT index 6995436..6f8b82e 100644 --- a/src/COPYRIGHT +++ b/src/COPYRIGHT @@ -40,7 +40,7 @@ - docReform object numbering (based on SiSU object citation numbering) - standard SiSU document object numbering - - Hompages: + - Homepages: [https://www.sisudoc.org] - Spine, Doc Reform (SiSU) markup samples @@ -64,7 +64,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/d2sqlite3] [https://code.dlang.org/packages/d2sqlite3] @@ -82,7 +82,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/D-YAML] [https://code.dlang.org/packages/dyaml] @@ -99,7 +99,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/lgvz/imageformats] [https://code.dlang.org/packages/imageformats] @@ -117,7 +117,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/tinyendian] [https://code.dlang.org/packages/tinyendian] @@ -137,7 +137,7 @@ [https://www.boost.org/LICENSE_1_0.txt] (Check the bottom of the file for details) - - Hompages: + - Homepages: [https://github.com/adamdruppe/arsd] @@ -152,5 +152,5 @@ - code: mkDub.nix (modified as needed) - License: MIT License - - Hompages: + - Homepages: [https://github.com/lionello/dub2nix] diff --git a/src/doc_reform/COPYRIGHT b/src/doc_reform/COPYRIGHT index 6995436..6f8b82e 100644 --- a/src/doc_reform/COPYRIGHT +++ b/src/doc_reform/COPYRIGHT @@ -40,7 +40,7 @@ - docReform object numbering (based on SiSU object citation numbering) - standard SiSU document object numbering - - Hompages: + - Homepages: [https://www.sisudoc.org] - Spine, Doc Reform (SiSU) markup samples @@ -64,7 +64,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/d2sqlite3] [https://code.dlang.org/packages/d2sqlite3] @@ -82,7 +82,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/D-YAML] [https://code.dlang.org/packages/dyaml] @@ -99,7 +99,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/lgvz/imageformats] [https://code.dlang.org/packages/imageformats] @@ -117,7 +117,7 @@ Boost Software License 1.0 [https://www.boost.org/LICENSE_1_0.txt] - - Hompages: + - Homepages: [https://github.com/dlang-community/tinyendian] [https://code.dlang.org/packages/tinyendian] @@ -137,7 +137,7 @@ [https://www.boost.org/LICENSE_1_0.txt] (Check the bottom of the file for details) - - Hompages: + - Homepages: [https://github.com/adamdruppe/arsd] @@ -152,5 +152,5 @@ - code: mkDub.nix (modified as needed) - License: MIT License - - Hompages: + - Homepages: [https://github.com/lionello/dub2nix] diff --git a/src/doc_reform/conf/compile_time_info.d b/src/doc_reform/conf/compile_time_info.d index daffa76..15aca1e 100644 --- a/src/doc_reform/conf/compile_time_info.d +++ b/src/doc_reform/conf/compile_time_info.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_in/paths_source.d b/src/doc_reform/io_in/paths_source.d index 3791df9..01691ca 100644 --- a/src/doc_reform/io_in/paths_source.d +++ b/src/doc_reform/io_in/paths_source.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_in/read_config_files.d b/src/doc_reform/io_in/read_config_files.d index a3a5dd8..da21315 100644 --- a/src/doc_reform/io_in/read_config_files.d +++ b/src/doc_reform/io_in/read_config_files.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -105,11 +105,11 @@ webserv: _cfg.www_doc_root, // doc root _cfg.www_http, // http _cfg.www_host, // host / domain - _cfg.www_http, // data http - _cfg.www_host, // data domain - _cfg.www_url_doc_root, // data root url + _cfg.www_http, // data "http" or "https" + _cfg.www_host, // data domain "localhost" + _cfg.www_url_doc_root, // data root url "http://locahost" "https://sisudoc.org" _cfg.www_doc_root, // data root path - _cfg.cgi_search_form_title, // cgi title + _cfg.cgi_search_form_title, // cgi title // e.g. "≅ SiSU Spine search" _cfg.www_http, // cgi http _cfg.www_host, // cgi host _cfg.cgi_url_root, // cgi bin url diff --git a/src/doc_reform/io_in/read_source_files.d b/src/doc_reform/io_in/read_source_files.d index ce744ce..bd06dd8 100644 --- a/src/doc_reform/io_in/read_source_files.d +++ b/src/doc_reform/io_in/read_source_files.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/cgi_sqlite_search_form.d b/src/doc_reform/io_out/cgi_sqlite_search_form.d index 3265ae7..585ea50 100644 --- a/src/doc_reform/io_out/cgi_sqlite_search_form.d +++ b/src/doc_reform/io_out/cgi_sqlite_search_form.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -142,317 +142,317 @@ void cgi_function_intro(Cgi cgi) { // cgi.write(field ~ ": " ~ content ~ "
"); // } } - static struct Rgx { - // static canned_query = ctRegex!(`\A(?P.+)\Z`, "m"); - static search_text_area = ctRegex!(`\A(?P.+)\Z`, "m"); - // static fulltext = ctRegex!(`\A(?P.+)\Z`, "m"); - static line = ctRegex!(`^(?P.+?)(?: ~|$)`, "m"); - static text = ctRegex!(`(?:^|\s~\s*)text:\s+(?P.+?)(?: ~|$)`, "m"); - static author = ctRegex!(`(?:^|\s~\s*)author:\s+(?P.+)$`, "m"); - static title = ctRegex!(`(?:^|\s~\s*)title:\s+(?P.+)$`, "m"); - static uid = ctRegex!(`(?:^|\s~\s*)uid:\s+(?P.+)$`, "m"); - static fn = ctRegex!(`(?:^|\s~\s*)fn:\s+(?P.+)$`, "m"); - static keywords = ctRegex!(`(?:^|\s~\s*)keywords:\s+(?P.+)$`, "m"); - static topic_register = ctRegex!(`(?:^|\s~\s*)topic_register:\s+(?P.+)$`, "m"); - static subject = ctRegex!(`(?:^|\s~\s*)subject:\s+(?P.+)$`, "m"); - static description = ctRegex!(`(?:^|\s~\s*)description:\s+(?P.+)$`, "m"); - static publisher = ctRegex!(`(?:^|\s~\s*)publisher:\s+(?P.+)$`, "m"); - static editor = ctRegex!(`(?:^|\s~\s*)editor:\s+(?P.+)$`, "m"); - static contributor = ctRegex!(`(?:^|\s~\s*)contributor:\s+(?P.+)$`, "m"); - static date = ctRegex!(`(?:^|\s~\s*)date:\s+(?P.+)$`, "m"); - static results_type = ctRegex!(`(?:^|\s~\s*)type:\s+(?P.+)$`, "m"); - static format = ctRegex!(`(?:^|\s~\s*)format:\s+(?P.+)$`, "m"); - static source = ctRegex!(`(?:^|\s~\s*)source:\s+(?P.+)$`, "m"); - static language = ctRegex!(`(?:^|\s~\s*)language:\s+(?P.+)$`, "m"); - static relation = ctRegex!(`(?:^|\s~\s*)relation:\s+(?P.+)$`, "m"); - static coverage = ctRegex!(`(?:^|\s~\s*)coverage:\s+(?P.+)$`, "m"); - static rights = ctRegex!(`(?:^|\s~\s*)rights:\s+(?P.+)$`, "m"); - static comment = ctRegex!(`(?:^|\s~\s*)comment:\s+(?P.+)$`, "m"); - // static abstract_ = ctRegex!(`(?:^|\s~\s*)abstract:\s+(?P.+)$`, "m"); - static src_filename_base = ctRegex!(`^src_filename_base:\s+(?P.+)$`, "m"); - } - struct searchFields { - string canned_query = ""; // GET canned_query == cq - string search_text_area = ""; // POST search_text_area == tsa - string text = ""; // text == txt - string author = ""; // author == au - string title = ""; // title == ti - string uid = ""; // uid == uid - string fn = ""; // fn == fn - string keywords = ""; // keywords == kw - string topic_register = ""; // topic_register == tr - string subject = ""; // subject == su - string description = ""; // description == de - string publisher = ""; // publisher == pb - string editor = ""; // editor == ed - string contributor = ""; // contributor == ct - string date = ""; // date == dt - string format = ""; // format == fmt - string source = ""; // source == src sfn - string language = ""; // language == lng - string relation = ""; // relation == rl - string coverage = ""; // coverage == cv - string rights = ""; // rights == rgt - string comment = ""; // comment == cmt - // string abstract = ""; - string src_filename_base = ""; // src_filename_base == bfn - string results_type = ""; // results_type == rt radio - string sql_match_limit = ""; // sql_match_limit == sml radio - string sql_match_offset = ""; // sql_match_offset == smo - string stats = ""; // stats == sts checked - string echo = ""; // echo == ec checked - string url = ""; // url == url checked - string searched = ""; // searched == se checked - string sql = ""; // sql == sql checked - } - auto rgx = Rgx(); - auto got = searchFields(); - if (environment.get("REQUEST_METHOD", "POST") == "POST") { - if ("sf" in cgi.post) { - got.search_text_area = cgi.post["sf"]; - if (auto m = got.search_text_area.matchFirst(rgx.text)) { + static struct Rgx { + // static canned_query = ctRegex!(`\A(?P.+)\Z`, "m"); + static search_text_area = ctRegex!(`\A(?P.+)\Z`, "m"); + // static fulltext = ctRegex!(`\A(?P.+)\Z`, "m"); + static line = ctRegex!(`^(?P.+?)(?: ~|$)`, "m"); + static text = ctRegex!(`(?:^|\s~\s*)text:\s+(?P.+?)(?: ~|$)`, "m"); + static author = ctRegex!(`(?:^|\s~\s*)author:\s+(?P.+)$`, "m"); + static title = ctRegex!(`(?:^|\s~\s*)title:\s+(?P.+)$`, "m"); + static uid = ctRegex!(`(?:^|\s~\s*)uid:\s+(?P.+)$`, "m"); + static fn = ctRegex!(`(?:^|\s~\s*)fn:\s+(?P.+)$`, "m"); + static keywords = ctRegex!(`(?:^|\s~\s*)keywords:\s+(?P.+)$`, "m"); + static topic_register = ctRegex!(`(?:^|\s~\s*)topic_register:\s+(?P.+)$`, "m"); + static subject = ctRegex!(`(?:^|\s~\s*)subject:\s+(?P.+)$`, "m"); + static description = ctRegex!(`(?:^|\s~\s*)description:\s+(?P.+)$`, "m"); + static publisher = ctRegex!(`(?:^|\s~\s*)publisher:\s+(?P.+)$`, "m"); + static editor = ctRegex!(`(?:^|\s~\s*)editor:\s+(?P.+)$`, "m"); + static contributor = ctRegex!(`(?:^|\s~\s*)contributor:\s+(?P.+)$`, "m"); + static date = ctRegex!(`(?:^|\s~\s*)date:\s+(?P.+)$`, "m"); + static results_type = ctRegex!(`(?:^|\s~\s*)type:\s+(?P.+)$`, "m"); + static format = ctRegex!(`(?:^|\s~\s*)format:\s+(?P.+)$`, "m"); + static source = ctRegex!(`(?:^|\s~\s*)source:\s+(?P.+)$`, "m"); + static language = ctRegex!(`(?:^|\s~\s*)language:\s+(?P.+)$`, "m"); + static relation = ctRegex!(`(?:^|\s~\s*)relation:\s+(?P.+)$`, "m"); + static coverage = ctRegex!(`(?:^|\s~\s*)coverage:\s+(?P.+)$`, "m"); + static rights = ctRegex!(`(?:^|\s~\s*)rights:\s+(?P.+)$`, "m"); + static comment = ctRegex!(`(?:^|\s~\s*)comment:\s+(?P.+)$`, "m"); + // static abstract_ = ctRegex!(`(?:^|\s~\s*)abstract:\s+(?P.+)$`, "m"); + static src_filename_base = ctRegex!(`^src_filename_base:\s+(?P.+)$`, "m"); + } + struct searchFields { + string canned_query = ""; // GET canned_query == cq + string search_text_area = ""; // POST search_text_area == tsa + string text = ""; // text == txt + string author = ""; // author == au + string title = ""; // title == ti + string uid = ""; // uid == uid + string fn = ""; // fn == fn + string keywords = ""; // keywords == kw + string topic_register = ""; // topic_register == tr + string subject = ""; // subject == su + string description = ""; // description == de + string publisher = ""; // publisher == pb + string editor = ""; // editor == ed + string contributor = ""; // contributor == ct + string date = ""; // date == dt + string format = ""; // format == fmt + string source = ""; // source == src sfn + string language = ""; // language == lng + string relation = ""; // relation == rl + string coverage = ""; // coverage == cv + string rights = ""; // rights == rgt + string comment = ""; // comment == cmt + // string abstract = ""; + string src_filename_base = ""; // src_filename_base == bfn + string results_type = ""; // results_type == rt radio + string sql_match_limit = ""; // sql_match_limit == sml radio + string sql_match_offset = ""; // sql_match_offset == smo + string stats = ""; // stats == sts checked + string echo = ""; // echo == ec checked + string url = ""; // url == url checked + string searched = ""; // searched == se checked + string sql = ""; // sql == sql checked + } + auto rgx = Rgx(); + auto got = searchFields(); + if (environment.get("REQUEST_METHOD", "POST") == "POST") { + if ("sf" in cgi.post) { + got.search_text_area = cgi.post["sf"]; + if (auto m = got.search_text_area.matchFirst(rgx.text)) { + got.text = m["matched"]; + got.canned_query ~= "sf=" ~ m["matched"]; + } else if (auto m = got.search_text_area.matchFirst(rgx.line)) { + if ( + !(m["matched"].matchFirst(rgx.author)) + && !(m["matched"].matchFirst(rgx.title)) + ) { got.text = m["matched"]; got.canned_query ~= "sf=" ~ m["matched"]; - } else if (auto m = got.search_text_area.matchFirst(rgx.line)) { - if ( - !(m["matched"].matchFirst(rgx.author)) - && !(m["matched"].matchFirst(rgx.title)) - ) { - got.text = m["matched"]; - got.canned_query ~= "sf=" ~ m["matched"]; - } - } - if (auto m = got.search_text_area.matchFirst(rgx.author)) { - got.author = m["matched"]; - got.canned_query ~= "&au=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.title)) { - got.title = m["matched"]; - got.canned_query ~= "&ti=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.uid)) { - got.uid = m["matched"]; - got.canned_query ~= "&uid=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.fn)) { - got.fn = m["matched"]; - got.canned_query ~= "&fn=" ~ m["matched"]; - } else if ("fn" in cgi.post) { - got.search_text_area ~= "\nfn: " ~ cgi.post["fn"] ~ "\n"; - } - if (auto m = got.search_text_area.matchFirst(rgx.keywords)) { - got.keywords = m["matched"]; - got.canned_query ~= "&kw=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.topic_register)) { - got.topic_register = m["matched"]; - got.canned_query ~= "&tr=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.subject)) { - got.subject = m["matched"]; - got.canned_query ~= "&su=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.description)) { - got.description = m["matched"]; - got.canned_query ~= "&de=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.publisher)) { - got.publisher = m["matched"]; - got.canned_query ~= "&pb=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.editor)) { - got.editor = m["matched"]; - got.canned_query ~= "&ed=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.contributor)) { - got.contributor = m["matched"]; - got.canned_query ~= "&ct=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.date)) { - got.date = m["matched"]; - got.canned_query ~= "&dt=" ~ m["matched"]; } - // if (auto m = got.search_text_area.matchFirst(rgx.results_type)) { - // got.results_type = m["matched"]; - // got.canned_query ~= "&rt=" ~ m["matched"]; - // } - if (auto m = got.search_text_area.matchFirst(rgx.format)) { - got.format = m["matched"]; - got.canned_query ~= "&fmt=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.source)) { - got.source = m["matched"]; - got.canned_query ~= "&src=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.language)) { - got.language = m["matched"]; - got.canned_query ~= "&lng=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.relation)) { - got.relation = m["matched"]; - got.canned_query ~= "&rl=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.coverage)) { - got.coverage = m["matched"]; - got.canned_query ~= "&cv=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.rights)) { - got.rights = m["matched"]; - got.canned_query ~= "&rgt=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.comment)) { - got.comment = m["matched"]; - got.canned_query ~= "&cmt=" ~ m["matched"]; - } - // if (auto m = search_text_area.matchFirst(rgx.abstract)) { - // got.abstract = m["matched"]; - // } - if (auto m = got.search_text_area.matchFirst(rgx.src_filename_base)) { - got.src_filename_base = m["matched"]; - got.canned_query ~= "&bfn=" ~ m["matched"]; - } - } - if ("fn" in cgi.post) { - got.fn = cgi.post["fn"]; - got.canned_query ~= "&fn=" ~ cgi.post["fn"]; - } - if ("rt" in cgi.post) { - got.results_type = cgi.post["rt"]; - got.canned_query ~= "&rt=" ~ cgi.post["rt"]; } - if ("sts" in cgi.post) { - got.stats = cgi.post["sts"]; - got.canned_query ~= "&sts=" ~ cgi.post["sts"]; + if (auto m = got.search_text_area.matchFirst(rgx.author)) { + got.author = m["matched"]; + got.canned_query ~= "&au=" ~ m["matched"]; } - if ("ec" in cgi.post) { - got.echo = cgi.post["ec"]; - got.canned_query ~= "&ec=" ~ cgi.post["ec"]; + if (auto m = got.search_text_area.matchFirst(rgx.title)) { + got.title = m["matched"]; + got.canned_query ~= "&ti=" ~ m["matched"]; } - if ("url" in cgi.post) { - got.url = cgi.post["url"]; - got.canned_query ~= "&url=" ~ cgi.post["url"]; + if (auto m = got.search_text_area.matchFirst(rgx.uid)) { + got.uid = m["matched"]; + got.canned_query ~= "&uid=" ~ m["matched"]; } - if ("se" in cgi.post) { - got.searched = cgi.post["se"]; - got.canned_query ~= "&se=" ~ cgi.post["se"]; + if (auto m = got.search_text_area.matchFirst(rgx.fn)) { + got.fn = m["matched"]; + got.canned_query ~= "&fn=" ~ m["matched"]; + } else if ("fn" in cgi.post) { + got.search_text_area ~= "\nfn: " ~ cgi.post["fn"] ~ "\n"; } - if ("sql" in cgi.post) { - got.sql = cgi.post["sql"]; - got.canned_query ~= "&sql=" ~ cgi.post["sql"]; - } - if ("sml" in cgi.post) { - got.sql_match_limit = cgi.post["sml"]; - got.canned_query ~= "&sml=" ~ cgi.post["sml"]; - } - if ("smo" in cgi.post) { - got.sql_match_offset = "0"; // cgi.post["smo"]; - got.canned_query ~= "&smo=0"; // ~ cgi.post["smo"]; - } - got.canned_query = got.canned_query.strip.split(" ").join("%%20"); - conf.query_string = got.canned_query; - // cgi.write("f.canned_query: " ~ got.canned_query ~ "
"); - } else if (environment.get("REQUEST_METHOD", "POST") == "GET") { - got.canned_query = environment.get("QUERY_STRING", ""); - // cgi.write("f.canned_query: " ~ got.canned_query ~ "
"); - got.search_text_area = ""; - if ("sf" in canned_query && !(canned_query["sf"]).empty) { - got.text = canned_query["sf"].split("%%20").join(" "); - got.search_text_area ~= "text: " ~ got.text ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.keywords)) { + got.keywords = m["matched"]; + got.canned_query ~= "&kw=" ~ m["matched"]; } - if ("au" in canned_query && !(canned_query["au"]).empty) { - got.author = canned_query["au"].split("%%20").join(" "); - got.search_text_area ~= "author: " ~ got.author ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.topic_register)) { + got.topic_register = m["matched"]; + got.canned_query ~= "&tr=" ~ m["matched"]; } - if ("ti" in canned_query && !(canned_query["ti"]).empty) { - got.title = canned_query["ti"].split("%%20").join(" "); - got.search_text_area ~= "title: " ~ got.title ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.subject)) { + got.subject = m["matched"]; + got.canned_query ~= "&su=" ~ m["matched"]; } - if ("uid" in canned_query && !(canned_query["uid"]).empty) { - got.uid = canned_query["uid"].split("%%20").join(" "); - got.search_text_area ~= "uid: " ~ got.uid ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.description)) { + got.description = m["matched"]; + got.canned_query ~= "&de=" ~ m["matched"]; } - if ("fn" in canned_query && !(canned_query["fn"]).empty) { - got.fn = canned_query["fn"].split("%%20").join(" "); - got.search_text_area ~= "fn: " ~ got.fn ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.publisher)) { + got.publisher = m["matched"]; + got.canned_query ~= "&pb=" ~ m["matched"]; } - if ("kw" in canned_query && !(canned_query["kw"]).empty) { - got.keywords = canned_query["kw"].split("%%20").join(" "); - got.search_text_area ~= "keywords: " ~ got.keywords ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.editor)) { + got.editor = m["matched"]; + got.canned_query ~= "&ed=" ~ m["matched"]; } - if ("tr" in canned_query && !(canned_query["tr"]).empty) { - got.topic_register = canned_query["tr"].split("%%20").join(" "); - got.search_text_area ~= "topic_register: " ~ got.topic_register ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.contributor)) { + got.contributor = m["matched"]; + got.canned_query ~= "&ct=" ~ m["matched"]; } - if ("su" in canned_query && !(canned_query["su"]).empty) { - got.subject = canned_query["su"].split("%%20").join(" "); - got.search_text_area ~= "subject: " ~ got.subject ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.date)) { + got.date = m["matched"]; + got.canned_query ~= "&dt=" ~ m["matched"]; } - if ("de" in canned_query && !(canned_query["de"]).empty) { - got.description = canned_query["de"].split("%%20").join(" "); - got.search_text_area ~= "description: " ~ got.description ~ "\n"; - } - if ("pb" in canned_query && !(canned_query["pb"]).empty) { - got.publisher = canned_query["pb"].split("%%20").join(" "); - got.search_text_area ~= "publisher: " ~ got.publisher ~ "\n"; - } - if ("ed" in canned_query && !(canned_query["ed"]).empty) { - got.editor = canned_query["ed"].split("%%20").join(" "); - got.search_text_area ~= "editor: " ~ got.editor ~ "\n"; - } - if ("ct" in canned_query && !(canned_query["ct"]).empty) { - got.contributor = canned_query["ct"].split("%%20").join(" "); - got.search_text_area ~= "contributor: " ~ got.contributor ~ "\n"; - } - if ("dt" in canned_query && !(canned_query["dt"]).empty) { - got.date = canned_query["dt"].split("%%20").join(" "); - got.search_text_area ~= "date: " ~ got.date ~ "\n"; - } - if ("rt" in canned_query && !(canned_query["rt"]).empty) { - got.results_type = canned_query["rt"].split("%%20").join(" "); - // got.search_text_area ~= "results_type: " ~ got.results_type ~ "\n"; - } - if ("fmt" in canned_query && !(canned_query["fmt"]).empty) { - got.format = canned_query["fmt"].split("%%20").join(" "); - got.search_text_area ~= "format: " ~ got.format ~ "\n"; + // if (auto m = got.search_text_area.matchFirst(rgx.results_type)) { + // got.results_type = m["matched"]; + // got.canned_query ~= "&rt=" ~ m["matched"]; + // } + if (auto m = got.search_text_area.matchFirst(rgx.format)) { + got.format = m["matched"]; + got.canned_query ~= "&fmt=" ~ m["matched"]; } - if ("src" in canned_query && !(canned_query["src"]).empty) { - got.source = canned_query["src"].split("%%20").join(" "); - got.search_text_area ~= "source: " ~ got.source ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.source)) { + got.source = m["matched"]; + got.canned_query ~= "&src=" ~ m["matched"]; } - if ("lng" in canned_query && !(canned_query["lng"]).empty) { - got.language = canned_query["lng"].split("%%20").join(" "); - got.search_text_area ~= "language: " ~ got.language ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.language)) { + got.language = m["matched"]; + got.canned_query ~= "&lng=" ~ m["matched"]; } - if ("rl" in canned_query && !(canned_query["rl"]).empty) { - got.relation = canned_query["rl"].split("%%20").join(" "); - got.search_text_area ~= "relation: " ~ got.relation ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.relation)) { + got.relation = m["matched"]; + got.canned_query ~= "&rl=" ~ m["matched"]; } - if ("cv" in canned_query && !(canned_query["cv"]).empty) { - got.coverage = canned_query["cv"].split("%%20").join(" "); - got.search_text_area ~= "coverage: " ~ got.coverage ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.coverage)) { + got.coverage = m["matched"]; + got.canned_query ~= "&cv=" ~ m["matched"]; } - if ("rgt" in canned_query && !(canned_query["rgt"]).empty) { - got.rights = canned_query["rgt"].split("%%20").join(" "); - got.search_text_area ~= "rights: " ~ got.rights ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.rights)) { + got.rights = m["matched"]; + got.canned_query ~= "&rgt=" ~ m["matched"]; } - if ("cmt" in canned_query && !(canned_query["cmt"]).empty) { - got.comment = canned_query["cmt"].split("%%20").join(" "); - got.search_text_area ~= "comment: " ~ got.comment ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.comment)) { + got.comment = m["matched"]; + got.canned_query ~= "&cmt=" ~ m["matched"]; } - // if ("abstract" in canned_query && !(canned_query["abstract"]).empty) { - // got.abstract = canned_query["abstract"]; + // if (auto m = search_text_area.matchFirst(rgx.abstract)) { + // got.abstract = m["matched"]; // } - if ("bfn" in canned_query && !(canned_query["bfn"]).empty) { // search_field - got.src_filename_base = canned_query["bfn"].split("%%20").join(" "); - got.search_text_area ~= "src_filename_base: " ~ got.src_filename_base ~ "\n"; - } - if ("sml" in canned_query && !(canned_query["sml"]).empty) { - got.sql_match_limit = canned_query["sml"].split("%%20").join(" "); - // got.search_text_area ~= "sql_match_limit: " ~ got.sql_match_limit ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.src_filename_base)) { + got.src_filename_base = m["matched"]; + got.canned_query ~= "&bfn=" ~ m["matched"]; } - // cgi.write("f.search_text_area: " ~ got.search_text_area ~ "
"); } - return got; + if ("fn" in cgi.post) { + got.fn = cgi.post["fn"]; + got.canned_query ~= "&fn=" ~ cgi.post["fn"]; + } + if ("rt" in cgi.post) { + got.results_type = cgi.post["rt"]; + got.canned_query ~= "&rt=" ~ cgi.post["rt"]; + } + if ("sts" in cgi.post) { + got.stats = cgi.post["sts"]; + got.canned_query ~= "&sts=" ~ cgi.post["sts"]; + } + if ("ec" in cgi.post) { + got.echo = cgi.post["ec"]; + got.canned_query ~= "&ec=" ~ cgi.post["ec"]; + } + if ("url" in cgi.post) { + got.url = cgi.post["url"]; + got.canned_query ~= "&url=" ~ cgi.post["url"]; + } + if ("se" in cgi.post) { + got.searched = cgi.post["se"]; + got.canned_query ~= "&se=" ~ cgi.post["se"]; + } + if ("sql" in cgi.post) { + got.sql = cgi.post["sql"]; + got.canned_query ~= "&sql=" ~ cgi.post["sql"]; + } + if ("sml" in cgi.post) { + got.sql_match_limit = cgi.post["sml"]; + got.canned_query ~= "&sml=" ~ cgi.post["sml"]; + } + if ("smo" in cgi.post) { + got.sql_match_offset = "0"; // cgi.post["smo"]; + got.canned_query ~= "&smo=0"; // ~ cgi.post["smo"]; + } + got.canned_query = got.canned_query.strip.split(" ").join("%%20"); + conf.query_string = got.canned_query; + // cgi.write("f.canned_query: " ~ got.canned_query ~ "
"); + } else if (environment.get("REQUEST_METHOD", "POST") == "GET") { + got.canned_query = environment.get("QUERY_STRING", ""); + // cgi.write("f.canned_query: " ~ got.canned_query ~ "
"); + got.search_text_area = ""; + if ("sf" in canned_query && !(canned_query["sf"]).empty) { + got.text = canned_query["sf"].split("%%20").join(" "); + got.search_text_area ~= "text: " ~ got.text ~ "\n"; + } + if ("au" in canned_query && !(canned_query["au"]).empty) { + got.author = canned_query["au"].split("%%20").join(" "); + got.search_text_area ~= "author: " ~ got.author ~ "\n"; + } + if ("ti" in canned_query && !(canned_query["ti"]).empty) { + got.title = canned_query["ti"].split("%%20").join(" "); + got.search_text_area ~= "title: " ~ got.title ~ "\n"; + } + if ("uid" in canned_query && !(canned_query["uid"]).empty) { + got.uid = canned_query["uid"].split("%%20").join(" "); + got.search_text_area ~= "uid: " ~ got.uid ~ "\n"; + } + if ("fn" in canned_query && !(canned_query["fn"]).empty) { + got.fn = canned_query["fn"].split("%%20").join(" "); + got.search_text_area ~= "fn: " ~ got.fn ~ "\n"; + } + if ("kw" in canned_query && !(canned_query["kw"]).empty) { + got.keywords = canned_query["kw"].split("%%20").join(" "); + got.search_text_area ~= "keywords: " ~ got.keywords ~ "\n"; + } + if ("tr" in canned_query && !(canned_query["tr"]).empty) { + got.topic_register = canned_query["tr"].split("%%20").join(" "); + got.search_text_area ~= "topic_register: " ~ got.topic_register ~ "\n"; + } + if ("su" in canned_query && !(canned_query["su"]).empty) { + got.subject = canned_query["su"].split("%%20").join(" "); + got.search_text_area ~= "subject: " ~ got.subject ~ "\n"; + } + if ("de" in canned_query && !(canned_query["de"]).empty) { + got.description = canned_query["de"].split("%%20").join(" "); + got.search_text_area ~= "description: " ~ got.description ~ "\n"; + } + if ("pb" in canned_query && !(canned_query["pb"]).empty) { + got.publisher = canned_query["pb"].split("%%20").join(" "); + got.search_text_area ~= "publisher: " ~ got.publisher ~ "\n"; + } + if ("ed" in canned_query && !(canned_query["ed"]).empty) { + got.editor = canned_query["ed"].split("%%20").join(" "); + got.search_text_area ~= "editor: " ~ got.editor ~ "\n"; + } + if ("ct" in canned_query && !(canned_query["ct"]).empty) { + got.contributor = canned_query["ct"].split("%%20").join(" "); + got.search_text_area ~= "contributor: " ~ got.contributor ~ "\n"; + } + if ("dt" in canned_query && !(canned_query["dt"]).empty) { + got.date = canned_query["dt"].split("%%20").join(" "); + got.search_text_area ~= "date: " ~ got.date ~ "\n"; + } + if ("rt" in canned_query && !(canned_query["rt"]).empty) { + got.results_type = canned_query["rt"].split("%%20").join(" "); + // got.search_text_area ~= "results_type: " ~ got.results_type ~ "\n"; + } + if ("fmt" in canned_query && !(canned_query["fmt"]).empty) { + got.format = canned_query["fmt"].split("%%20").join(" "); + got.search_text_area ~= "format: " ~ got.format ~ "\n"; + } + if ("src" in canned_query && !(canned_query["src"]).empty) { + got.source = canned_query["src"].split("%%20").join(" "); + got.search_text_area ~= "source: " ~ got.source ~ "\n"; + } + if ("lng" in canned_query && !(canned_query["lng"]).empty) { + got.language = canned_query["lng"].split("%%20").join(" "); + got.search_text_area ~= "language: " ~ got.language ~ "\n"; + } + if ("rl" in canned_query && !(canned_query["rl"]).empty) { + got.relation = canned_query["rl"].split("%%20").join(" "); + got.search_text_area ~= "relation: " ~ got.relation ~ "\n"; + } + if ("cv" in canned_query && !(canned_query["cv"]).empty) { + got.coverage = canned_query["cv"].split("%%20").join(" "); + got.search_text_area ~= "coverage: " ~ got.coverage ~ "\n"; + } + if ("rgt" in canned_query && !(canned_query["rgt"]).empty) { + got.rights = canned_query["rgt"].split("%%20").join(" "); + got.search_text_area ~= "rights: " ~ got.rights ~ "\n"; + } + if ("cmt" in canned_query && !(canned_query["cmt"]).empty) { + got.comment = canned_query["cmt"].split("%%20").join(" "); + got.search_text_area ~= "comment: " ~ got.comment ~ "\n"; + } + // if ("abstract" in canned_query && !(canned_query["abstract"]).empty) { + // got.abstract = canned_query["abstract"]; + // } + if ("bfn" in canned_query && !(canned_query["bfn"]).empty) { // search_field + got.src_filename_base = canned_query["bfn"].split("%%20").join(" "); + got.search_text_area ~= "src_filename_base: " ~ got.src_filename_base ~ "\n"; + } + if ("sml" in canned_query && !(canned_query["sml"]).empty) { + got.sql_match_limit = canned_query["sml"].split("%%20").join(" "); + // got.search_text_area ~= "sql_match_limit: " ~ got.sql_match_limit ~ "\n"; + } + // cgi.write("f.search_text_area: " ~ got.search_text_area ~ "
"); + } + return got; } auto tf = text_fields; // struct SQL_select { @@ -559,8 +559,8 @@ void cgi_function_intro(Cgi cgi) { _previous_next = "
" ~ arrow_previous ~ arrow_next; return _previous_next; } - { - header = format(q"┃ +{ + header = format(q"┃ @@ -1373,90 +1373,90 @@ void cgi_function_intro(Cgi cgi) { conf.http_host, ); } - { - table = format(q"┃ - - - +
- - -
- %s -
-
+ { + table = format(q"┃ + + + +
+ +
+ %s
- ┃"); - } - { - string post_value(string field_name, string type="box", string set="on") { - string val = ""; - switch (type) { - case "field": - val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) - ? cgi.post[field_name] - : (field_name in cgi.get) - ? cgi.get[field_name] - : ""); - val = tf.search_text_area; - break; - case "box": // generic for checkbox or radio; checkbox set == "on" radio set == "name set" - val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) - ? (cgi.post[field_name] == set ? "checked" : "off") - : (field_name in cgi.get) - ? (cgi.get[field_name] == set ? "checked" : "off") - : "off"); - break; - case "radio": // used generic bo - val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) - ? (cgi.post[field_name] == set ? "checked" : "off") - : (field_name in cgi.get) - ? (cgi.get[field_name] == set ? "checked" : "off") - : "checked"); - break; - case "checkbox": // used generic bo - val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) - ? (cgi.post[field_name] == set ? "checked" : "off") - : (field_name in cgi.get) - ? (cgi.get[field_name] == set ? "checked" : "off") - : "checked"); - break; - default: - } - return val; +
+
+┃"); + } +{ + string post_value(string field_name, string type="box", string set="on") { + string val = ""; + switch (type) { + case "field": + val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) + ? cgi.post[field_name] + : (field_name in cgi.get) + ? cgi.get[field_name] + : ""); + val = tf.search_text_area; + break; + case "box": // generic for checkbox or radio; checkbox set == "on" radio set == "name set" + val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) + ? (cgi.post[field_name] == set ? "checked" : "off") + : (field_name in cgi.get) + ? (cgi.get[field_name] == set ? "checked" : "off") + : "off"); + break; + case "radio": // used generic bo + val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) + ? (cgi.post[field_name] == set ? "checked" : "off") + : (field_name in cgi.get) + ? (cgi.get[field_name] == set ? "checked" : "off") + : "checked"); + break; + case "checkbox": // used generic bo + val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) + ? (cgi.post[field_name] == set ? "checked" : "off") + : (field_name in cgi.get) + ? (cgi.get[field_name] == set ? "checked" : "off") + : "checked"); + break; + default: } - string the_can(string fv) { - string show_the_can = post_value("url"); - string _the_can = ""; - if (show_the_can == "checked") { - tf = text_fields; - string method_get_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ environment.get("QUERY_STRING", ""); - string method_post_url_construct = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ tf.canned_query; - // assert(method_get_url == environment.get("HTTP_REFERER", conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ conf.query_string)); - if (conf.request_method == "POST") { - _the_can = - "" - ~ "POST: " - ~ "" - ~ method_post_url_construct - ~ "" - ~ "
"; - } else if (conf.request_method == "GET") { - _the_can = - "" - ~ "GET:  " - ~ "" - ~ method_get_url - ~ ""; - } - conf.http_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ tf.canned_query; - } - return _the_can; + return val; + } +string the_can(string fv) { + string show_the_can = post_value("url"); + string _the_can = ""; + if (show_the_can == "checked") { + tf = text_fields; + string method_get_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ environment.get("QUERY_STRING", ""); + string method_post_url_construct = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ tf.canned_query; + // assert(method_get_url == environment.get("HTTP_REFERER", conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ conf.query_string)); + if (conf.request_method == "POST") { + _the_can = + "" + ~ "POST: " + ~ "" + ~ method_post_url_construct + ~ "" + ~ "
"; + } else if (conf.request_method == "GET") { + _the_can = + "" + ~ "GET:  " + ~ "" + ~ method_get_url + ~ ""; } + conf.http_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ tf.canned_query; + } + return _the_can; +} string provide_tip() { string searched_tip = post_value("se"); string tip = ""; @@ -1520,55 +1520,55 @@ void cgi_function_intro(Cgi cgi) { ┃", "%s", - (post_value("ec") == "checked") ? post_value("sf", "field") : "", - provide_tip, - search_note, - the_can(post_value("sf", "field")), - cv.db_selected, - post_value("rt", "box", "idx"), - post_value("rt", "box", "txt"), - post_value("sml", "box", "1000"), - post_value("sml", "box", "2500"), - post_value("ec"), - post_value("url"), - post_value("se"), - post_value("sql"), - ); - { - string set_value(string field_name, string default_val) { - string val; - if (field_name in cgi.post) { - val = cgi.post[field_name]; - } else if (field_name in cgi.get) { - val = cgi.get[field_name]; - } else { val = default_val; } - return val; - } - bool set_bool(string field_name) { - bool val; - if (field_name in cgi.post - && cgi.post[field_name] == "on") { - val = true; - } else if (field_name in cgi.get - && cgi.get[field_name] == "on") { - val = true; - } else { val = false; } - return val; - } - cv.db_selected = set_value("selected_db", "%s"); // selected_db_name == db (spine.search.db or whatever) - cv.sql_match_limit = set_value("sml", "1000"); - cv.sql_match_offset = set_value("smo", "0"); - cv.search_text = set_value("sf", ""); - cv.results_type = set_value("rt", "idx"); - cv.checked_echo = set_bool("ec"); - cv.checked_stats = set_bool("sts"); - cv.checked_url = set_bool("url"); - cv.checked_searched = set_bool("se"); - cv.checked_tip = set_bool("tip"); - cv.checked_sql = set_bool("sql"); - tf = text_fields; + (post_value("ec") == "checked") ? post_value("sf", "field") : "", + provide_tip, + search_note, + the_can(post_value("sf", "field")), + cv.db_selected, + post_value("rt", "box", "idx"), + post_value("rt", "box", "txt"), + post_value("sml", "box", "1000"), + post_value("sml", "box", "2500"), + post_value("ec"), + post_value("url"), + post_value("se"), + post_value("sql"), +); + { + string set_value(string field_name, string default_val) { + string val; + if (field_name in cgi.post) { + val = cgi.post[field_name]; + } else if (field_name in cgi.get) { + val = cgi.get[field_name]; + } else { val = default_val; } + return val; } + bool set_bool(string field_name) { + bool val; + if (field_name in cgi.post + && cgi.post[field_name] == "on") { + val = true; + } else if (field_name in cgi.get + && cgi.get[field_name] == "on") { + val = true; + } else { val = false; } + return val; + } + cv.db_selected = set_value("selected_db", "%s"); // selected_db_name == db (spine.search.db or whatever) + cv.sql_match_limit = set_value("sml", "1000"); + cv.sql_match_offset = set_value("smo", "0"); + cv.search_text = set_value("sf", ""); + cv.results_type = set_value("rt", "idx"); + cv.checked_echo = set_bool("ec"); + cv.checked_stats = set_bool("sts"); + cv.checked_url = set_bool("url"); + cv.checked_searched = set_bool("se"); + cv.checked_tip = set_bool("tip"); + cv.checked_sql = set_bool("sql"); + tf = text_fields; } +} { cgi.write(header); cgi.write(table); @@ -1709,113 +1709,113 @@ LIMIT %%s OFFSET %%s cv.sql_match_limit, cv.sql_match_offset, ); - (cv.checked_sql) - ? cgi.write(previous_next - ~ "
" - ~ sql_select.the_body.strip.split("\n ").join(" ").split("\n").join("
") - ~ "
\n" - ) - : ""; - cgi.write(previous_next); - auto select_query_results = db.execute(sql_select.the_body).cached; - string _old_uid = ""; - if (!select_query_results.empty) { - string _date_published = "0000"; - string _close_para = ""; - string _matched_ocn_open = ""; - foreach (idx, row; select_query_results) { - if (row["uid"].as!string != _old_uid) { - _close_para = (idx == 1) ? "" : "

"; - _matched_ocn_open = (idx == 1) ? "" : "

"; - _old_uid = row["uid"].as!string; - _date_published = (row["date_published"].as!string.match(regex(r"^([0-9]{4})"))) - ? row["date_published"].as!string : "0000"; // used in regex that breaks if no match - auto m = _date_published.match(regex(r"^([0-9]{4})")); - string _date = (m.hit == "0000") ? "(year?) " : "(" ~ m.hit ~ ") "; - cgi.write( - _close_para - ~ "


" - ~ "

\"" - ~ row["title"].as!string ~ "\"" - ~ " " - ~ _date - ~ "[" ~ row["language_document_char"].as!string ~ "] " - ~ row["creator_author_last_first"].as!string - ~ " " - ~ show_matched_objects(row["src_filename_base"].as!string) - ~ "

" - ~ "
" - ); - } - if (cv.results_type == "txt") { - if (row["ocn"].as!string != "0") { - cgi.write( - "
" - ~ "" - ~ "
" - ~ highlight_text_matched(row["body"].as!string, tf.text) - ~ "
" - ~ "
" - ); - } else { - cgi.write( - "
" - ~ "" - ~ "
" - ~ highlight_text_matched(row["body"].as!string, tf.text) - ~ "
" - ~ "
" - ); - } - } else { - if (row["ocn"].as!string != "0") { - cgi.write( - _matched_ocn_open - ~ "" - ~ row["ocn"].as!string - ~ ", " - ); - } else { - cgi.write( - _matched_ocn_open - ~ "" - ~ row["ocn"].as!string - ~ ", " - ); - } - _matched_ocn_open = ""; - } +(cv.checked_sql) +? cgi.write(previous_next + ~ "
" + ~ sql_select.the_body.strip.split("\n ").join(" ").split("\n").join("
") + ~ "
\n" + ) +: ""; +cgi.write(previous_next); +auto select_query_results = db.execute(sql_select.the_body).cached; +string _old_uid = ""; +if (!select_query_results.empty) { + string _date_published = "0000"; + string _close_para = ""; + string _matched_ocn_open = ""; + foreach (idx, row; select_query_results) { + if (row["uid"].as!string != _old_uid) { + _close_para = (idx == 1) ? "" : "

"; + _matched_ocn_open = (idx == 1) ? "" : "

"; + _old_uid = row["uid"].as!string; + _date_published = (row["date_published"].as!string.match(regex(r"^([0-9]{4})"))) + ? row["date_published"].as!string : "0000"; // used in regex that breaks if no match + auto m = _date_published.match(regex(r"^([0-9]{4})")); + string _date = (m.hit == "0000") ? "(year?) " : "(" ~ m.hit ~ ") "; + cgi.write( + _close_para + ~ "


" + ~ "

\"" + ~ row["title"].as!string ~ "\"" + ~ " " + ~ _date + ~ "[" ~ row["language_document_char"].as!string ~ "] " + ~ row["creator_author_last_first"].as!string + ~ " " + ~ show_matched_objects(row["src_filename_base"].as!string) + ~ "

" + ~ "
" + ); + } +if (cv.results_type == "txt") { + if (row["ocn"].as!string != "0") { + cgi.write( + "
" + ~ "" + ~ "
" + ~ highlight_text_matched(row["body"].as!string, tf.text) + ~ "
" + ~ "
" + ); + } else { + cgi.write( + "
" + ~ "" + ~ "
" + ~ highlight_text_matched(row["body"].as!string, tf.text) + ~ "
" + ~ "
" + ); + } +} else { + if (row["ocn"].as!string != "0") { + cgi.write( + _matched_ocn_open + ~ "" + ~ row["ocn"].as!string + ~ ", " + ); + } else { + cgi.write( + _matched_ocn_open + ~ "" + ~ row["ocn"].as!string + ~ ", " + ); + } + _matched_ocn_open = ""; +} } cgi.write( previous_next); diff --git a/src/doc_reform/io_out/create_zip_file.d b/src/doc_reform/io_out/create_zip_file.d index ac9628d..a4b2d79 100644 --- a/src/doc_reform/io_out/create_zip_file.d +++ b/src/doc_reform/io_out/create_zip_file.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/defaults.d b/src/doc_reform/io_out/defaults.d index 57ac30e..c2c9991 100644 --- a/src/doc_reform/io_out/defaults.d +++ b/src/doc_reform/io_out/defaults.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d index b38fe3e..07bd8ed 100644 --- a/src/doc_reform/io_out/epub3.d +++ b/src/doc_reform/io_out/epub3.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -413,9 +413,9 @@ template outputEPub3() { string[] doc_parts; } auto epubWrite = writeOut(); - foreach (part; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[part]) { - string _txt = xhtml_format.special_characters(obj); + foreach (part; doc_matters.has.keys_seq.seg) { + foreach (obj; doc_abstraction[part]) { + string _txt = xhtml_format.special_characters(obj); if (obj.metainfo.is_a == "heading") { assert(part == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); switch (obj.metainfo.heading_lev_markup) { diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d index 5c55bd7..7e5f51f 100644 --- a/src/doc_reform/io_out/html.d +++ b/src/doc_reform/io_out/html.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -560,7 +560,7 @@ template outputHTML() { M doc_matters, ) { { /+ (copy html images) +/ - + auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); if (!exists(pth_html.image)) { pth_html.image.mkdirRecurse; diff --git a/src/doc_reform/io_out/hub.d b/src/doc_reform/io_out/hub.d index 4188d6e..a644b66 100644 --- a/src/doc_reform/io_out/hub.d +++ b/src/doc_reform/io_out/hub.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d index 811f32e..117b3e7 100644 --- a/src/doc_reform/io_out/latex.d +++ b/src/doc_reform/io_out/latex.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -62,166 +62,166 @@ template outputLaTeX() { static auto rgx = RgxO(); mixin spineLanguageCodes; auto lang = Lang(); - auto paper() { - struct PaperType { - @safe auto a4() { - struct A4 { - auto portrait() { - struct V { - const uint w = 160; - const uint h = 228; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "12pt"; - string name = "a4paper"; - uint img_px = 450; - bool is_portrait = true; - } - return V(); - } - auto landscape() { - struct H { - const uint w = 238; - const uint h = 160; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "11pt"; - string name = "a4paper"; - uint img_px = 300; - bool is_portrait = false; - } - return H(); - } + auto paper() { + struct PaperType { + @safe auto a4() { + struct A4 { + auto portrait() { + struct V { + const uint w = 160; + const uint h = 228; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "12pt"; + string name = "a4paper"; + uint img_px = 450; + bool is_portrait = true; } - return A4(); + return V(); } - @safe auto a5() { - struct A5 { - auto portrait() { - struct V { - const uint w = 112; - const uint h = 162; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "0pt"; - string name = "a5paper"; - uint img_px = 280; - bool is_portrait = true; - } - return V(); - } - auto landscape() { - struct H { - const uint w = 152; - const uint h = 100; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "0pt"; - string name = "a5paper"; - uint img_px = 190; - bool is_portrait = false; - } - return H(); - } + auto landscape() { + struct H { + const uint w = 238; + const uint h = 160; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "11pt"; + string name = "a4paper"; + uint img_px = 300; + bool is_portrait = false; } - return A5(); + return H(); } - @safe auto b4() { - struct B4 { - auto portrait() { - struct V { - const uint w = 140; - const uint h = 204; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "0pt"; - string name = "b4paper"; - uint img_px = 356; - bool is_portrait = true; - } - return V(); - } - auto landscape() { - struct H { - const uint w = 200; - const uint h = 130; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "0pt"; - string name = "b4paper"; - uint img_px = 260; - bool is_portrait = false; - } - return H(); - } + } + return A4(); + } + @safe auto a5() { + struct A5 { + auto portrait() { + struct V { + const uint w = 112; + const uint h = 162; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "0pt"; + string name = "a5paper"; + uint img_px = 280; + bool is_portrait = true; } - return B4(); + return V(); } - @safe auto letter() { - struct Letter { - auto portrait() { - struct V { - const uint w = 166; - const uint h = 212; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "0pt"; - string name = "letterpaper"; - uint img_px = 468; - bool is_portrait = true; - } - return V(); - } - auto landscape() { - struct H { - const uint w = 226; - const uint h = 166; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "0pt"; - string name = "letterpaper"; - uint img_px = 290; - bool is_portrait = false; - } - return H(); - } + auto landscape() { + struct H { + const uint w = 152; + const uint h = 100; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "0pt"; + string name = "a5paper"; + uint img_px = 190; + bool is_portrait = false; } - return Letter(); + return H(); } - @safe auto legal() { - struct Legal { - auto portrait() { - struct V { - const uint w = 168; - const uint h = 286; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "0pt"; - string name = "legalpaper"; - uint img_px = 474; - bool is_portrait = true; - } - return V(); - } - auto landscape() { - struct H { - const uint w = 296; - const uint h = 166; - string width = format(q"┃%dmm┃", w); - string height = format(q"┃%dmm┃", h); - string font_size = "0pt"; - string name = "legalpaper"; - uint img_px = 420; - bool is_portrait = false; - } - return H(); - } + } + return A5(); + } + @safe auto b4() { + struct B4 { + auto portrait() { + struct V { + const uint w = 140; + const uint h = 204; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "0pt"; + string name = "b4paper"; + uint img_px = 356; + bool is_portrait = true; + } + return V(); + } + auto landscape() { + struct H { + const uint w = 200; + const uint h = 130; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "0pt"; + string name = "b4paper"; + uint img_px = 260; + bool is_portrait = false; + } + return H(); + } + } + return B4(); + } + @safe auto letter() { + struct Letter { + auto portrait() { + struct V { + const uint w = 166; + const uint h = 212; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "0pt"; + string name = "letterpaper"; + uint img_px = 468; + bool is_portrait = true; + } + return V(); + } + auto landscape() { + struct H { + const uint w = 226; + const uint h = 166; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "0pt"; + string name = "letterpaper"; + uint img_px = 290; + bool is_portrait = false; } - return Legal(); + return H(); } } - return PaperType(); + return Letter(); } + @safe auto legal() { + struct Legal { + auto portrait() { + struct V { + const uint w = 168; + const uint h = 286; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "0pt"; + string name = "legalpaper"; + uint img_px = 474; + bool is_portrait = true; + } + return V(); + } + auto landscape() { + struct H { + const uint w = 296; + const uint h = 166; + string width = format(q"┃%dmm┃", w); + string height = format(q"┃%dmm┃", h); + string font_size = "0pt"; + string name = "legalpaper"; + uint img_px = 420; + bool is_portrait = false; + } + return H(); + } + } + return Legal(); + } + } + return PaperType(); + } @safe string sp_char_esc(O)( string _txt, const O obj, @@ -789,19 +789,19 @@ string table(O,M)( M doc_matters, string paper_size_orientation, ) { - struct paperTypeLatex { - string a4_portrait; - string a4_landscape; - string a5_portrait; - string a5_landscape; - string b4_portrait; - string b4_landscape; - string us_letter_portrait; - string us_letter_landscape; - string us_legal_portrait; - string us_legal_landscape; - } - auto paper_type_latex = paperTypeLatex(); + struct paperTypeLatex { + string a4_portrait; + string a4_landscape; + string a5_portrait; + string a5_landscape; + string b4_portrait; + string b4_landscape; + string us_letter_portrait; + string us_letter_landscape; + string us_legal_portrait; + string us_legal_landscape; + } + auto paper_type_latex = paperTypeLatex(); string _footer(M)(M doc_matters) { string _ft = "\\lfoot[\\textrm{\\thepage}]"; string _ft_1 = format(q"┃{\tiny \href{%s}{%s}}┃", "https://sisudoc.org", "SiSU",); @@ -830,39 +830,39 @@ string table(O,M)( } return _ft; } - struct paperMargins { - string portrait; - string landscape; - } - auto margins = paperMargins(); - margins.portrait = format(q"┃ +struct paperMargins { + string portrait; + string landscape; +} +auto margins = paperMargins(); +margins.portrait = format(q"┃ \setlength{\oddsidemargin}{0mm} \setlength{\evensidemargin}{0mm} \setlength{\topmargin}{-12pt} \setlength{\headheight}{12pt} \setlength{\headsep}{35pt} ┃", ); - margins.landscape = format(q"┃ +margins.landscape = format(q"┃ \setlength{\oddsidemargin}{6mm} \setlength{\evensidemargin}{6mm} \setlength{\topmargin}{-12mm} \setlength{\headheight}{12pt} \setlength{\headsep}{20pt} ┃", ); - struct columnsMulti { - string portrait; - string landscape; - } - auto multicol = columnsMulti(); - multicol.portrait = format(q"┃ +struct columnsMulti { + string portrait; + string landscape; +} +auto multicol = columnsMulti(); +multicol.portrait = format(q"┃ \usepackage{multicol} ┃", ); - multicol.landscape = ""; - struct colorLinks { - string mono; - string color; - } - auto links = colorLinks(); - links.mono = format(q"┃ +multicol.landscape = ""; +struct colorLinks { + string mono; + string color; +} +auto links = colorLinks(); +links.mono = format(q"┃ \usepackage[xetex, colorlinks=true, urlcolor=myblack, @@ -870,7 +870,7 @@ string table(O,M)( linkcolor=myblack, ┃", ); - links.color = format(q"┃ +links.color = format(q"┃ \usepackage[xetex, colorlinks=true, urlcolor=myblue, %% \href{...}{...} external url @@ -1271,25 +1271,25 @@ string table(O,M)( default: break; } break; - case "comment": - break; - default: - { /+ debug +/ - if (doc_matters.opt.action.debug_do - && doc_matters.opt.action.verbose) { - writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); - writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); - writeln(__FILE__, ":", __LINE__, ": ", obj.text); - } + case "comment": + break; + default: + { /+ debug +/ + if (doc_matters.opt.action.debug_do + && doc_matters.opt.action.verbose) { + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.text); } - break; } + break; } } - if (_multicolumns) { - _multicolumns = false; - _latex_body ~= "\n\\end{multicols}\n"; - } + } + if (_multicolumns) { + _multicolumns = false; + _latex_body ~= "\n\\end{multicols}\n"; + } return _latex_body; } string latex_tail(M)( diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d index 89e82bd..84bb842 100644 --- a/src/doc_reform/io_out/metadata.d +++ b/src/doc_reform/io_out/metadata.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d index e23e409..5183342 100644 --- a/src/doc_reform/io_out/odt.d +++ b/src/doc_reform/io_out/odt.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -658,78 +658,78 @@ template outputODT() { // mixin outputXmlODT; @safe string odt_head(I)(I doc_matters) { string _has_tables = format(q"┃ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ┃",); string _odt_head = format(q"┃ @@ -773,123 +773,123 @@ template outputODT() { string delimit = ""; string doc_odt = ""; string _txt = ""; - foreach (part; doc_matters.has.keys_seq.scroll) { - foreach (obj; doc_abstraction[part]) { - switch (obj.metainfo.is_of_part) { - case "frontmatter": assert(part == "head" || "toc"); - switch (obj.metainfo.is_of_type) { - case "para": - switch (obj.metainfo.is_a) { - case "heading": - _txt = delimit ~ odt_format.heading(obj, doc_matters); - goto default; - case "toc": - _txt = odt_format.para(obj, doc_matters); - goto default; - default: - doc_odt ~= _txt; - _txt = ""; - break; - } - break; - default: break; - } - break; - case "body": assert(part == "body" || "head"); // surprise - switch (obj.metainfo.is_of_type) { - case "para": - switch (obj.metainfo.is_a) { - case "heading": - _txt = delimit ~ odt_format.heading(obj, doc_matters); - goto default; - case "para": - _txt = odt_format.para(obj, doc_matters); - goto default; - default: - doc_odt ~= _txt; - _txt = ""; - break; - } - break; - case "block": - switch (obj.metainfo.is_a) { - case "quote": - _txt = odt_format.quote(obj, doc_matters); - goto default; - case "group": - _txt = odt_format.group(obj, doc_matters); - goto default; - case "block": - _txt = odt_format.block(obj, doc_matters); - goto default; - case "verse": - _txt = odt_format.verse(obj, doc_matters); - goto default; - case "code": - _txt = odt_format.code(obj, doc_matters); - goto default; - case "table": - _txt = odt_format.table(obj, doc_matters); - goto default; - default: - doc_odt ~= _txt; - _txt = ""; - break; - } - break; - default: break; - } - break; - case "backmatter": - assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); - switch (obj.metainfo.is_of_type) { - case "para": - switch (obj.metainfo.is_a) { - case "heading": - _txt = delimit ~ odt_format.heading(obj, doc_matters); - goto default; - case "endnote": assert(part == "endnotes"); - _txt = odt_format.para(obj, doc_matters); - goto default; - case "glossary": assert(part == "glossary"); - _txt = odt_format.para(obj, doc_matters); - goto default; - case "bibliography": assert(part == "bibliography"); - _txt = odt_format.para(obj, doc_matters); - goto default; - case "bookindex": assert(part == "bookindex"); - _txt = odt_format.para(obj, doc_matters); - goto default; - case "blurb": assert(part == "blurb"); - _txt = odt_format.para(obj, doc_matters); - goto default; - default: - doc_odt ~= _txt; - _txt = ""; - break; - } - break; - default: break; - } - break; - case "comment": - break; - default: - { /+ debug +/ - if (doc_matters.opt.action.debug_do - && doc_matters.opt.action.verbose) { - writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); - writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); - writeln(__FILE__, ":", __LINE__, ": ", obj.text); - } - } - break; + foreach (part; doc_matters.has.keys_seq.scroll) { + foreach (obj; doc_abstraction[part]) { + switch (obj.metainfo.is_of_part) { + case "frontmatter": assert(part == "head" || "toc"); + switch (obj.metainfo.is_of_type) { + case "para": + switch (obj.metainfo.is_a) { + case "heading": + _txt = delimit ~ odt_format.heading(obj, doc_matters); + goto default; + case "toc": + _txt = odt_format.para(obj, doc_matters); + goto default; + default: + doc_odt ~= _txt; + _txt = ""; + break; + } + break; + default: break; + } + break; + case "body": assert(part == "body" || "head"); // surprise + switch (obj.metainfo.is_of_type) { + case "para": + switch (obj.metainfo.is_a) { + case "heading": + _txt = delimit ~ odt_format.heading(obj, doc_matters); + goto default; + case "para": + _txt = odt_format.para(obj, doc_matters); + goto default; + default: + doc_odt ~= _txt; + _txt = ""; + break; + } + break; + case "block": + switch (obj.metainfo.is_a) { + case "quote": + _txt = odt_format.quote(obj, doc_matters); + goto default; + case "group": + _txt = odt_format.group(obj, doc_matters); + goto default; + case "block": + _txt = odt_format.block(obj, doc_matters); + goto default; + case "verse": + _txt = odt_format.verse(obj, doc_matters); + goto default; + case "code": + _txt = odt_format.code(obj, doc_matters); + goto default; + case "table": + _txt = odt_format.table(obj, doc_matters); + goto default; + default: + doc_odt ~= _txt; + _txt = ""; + break; + } + break; + default: break; + } + break; + case "backmatter": + assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + switch (obj.metainfo.is_of_type) { + case "para": + switch (obj.metainfo.is_a) { + case "heading": + _txt = delimit ~ odt_format.heading(obj, doc_matters); + goto default; + case "endnote": assert(part == "endnotes"); + _txt = odt_format.para(obj, doc_matters); + goto default; + case "glossary": assert(part == "glossary"); + _txt = odt_format.para(obj, doc_matters); + goto default; + case "bibliography": assert(part == "bibliography"); + _txt = odt_format.para(obj, doc_matters); + goto default; + case "bookindex": assert(part == "bookindex"); + _txt = odt_format.para(obj, doc_matters); + goto default; + case "blurb": assert(part == "blurb"); + _txt = odt_format.para(obj, doc_matters); + goto default; + default: + doc_odt ~= _txt; + _txt = ""; + break; + } + break; + default: break; + } + break; + case "comment": + break; + default: + { /+ debug +/ + if (doc_matters.opt.action.debug_do + && doc_matters.opt.action.verbose) { + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.text); + } + } + break; } } } return doc_odt; } - + @safe string odt_tail() { string _odt_tail = format(q"┃spine: <www.doc_reform.org> and <www.sisudoc.org> ┃",); @@ -2090,7 +2090,7 @@ template outputODT() { pth_odt.manifest_rdf("fs"); /+ (manifest.rdf) +/ pth_odt.settings_xml("fs"); /+ (settings.xml) +/ pth_odt.styles_xml("fs"); /+ (styles_xml) +/ - + pth_odt.content_xml("fs"); pth_odt.manifest_xml("fs"); pth_odt.meta_xml("fs"); diff --git a/src/doc_reform/io_out/package.d b/src/doc_reform/io_out/package.d index 56ff1cf..2d17f41 100644 --- a/src/doc_reform/io_out/package.d +++ b/src/doc_reform/io_out/package.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/paths_output.d b/src/doc_reform/io_out/paths_output.d index 2fe7c50..9bbbdb4 100644 --- a/src/doc_reform/io_out/paths_output.d +++ b/src/doc_reform/io_out/paths_output.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/rgx.d b/src/doc_reform/io_out/rgx.d index 63872b1..8382c3a 100644 --- a/src/doc_reform/io_out/rgx.d +++ b/src/doc_reform/io_out/rgx.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/source_pod.d b/src/doc_reform/io_out/source_pod.d index 363051b..47f1570 100644 --- a/src/doc_reform/io_out/source_pod.d +++ b/src/doc_reform/io_out/source_pod.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -421,7 +421,7 @@ template spinePod() { // Handle errors } } - + } catch (ErrnoException ex) { // Handle error } diff --git a/src/doc_reform/io_out/sqlite.d b/src/doc_reform/io_out/sqlite.d index abdfc7a..b66aa13 100644 --- a/src/doc_reform/io_out/sqlite.d +++ b/src/doc_reform/io_out/sqlite.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -1039,61 +1039,61 @@ template SQLiteInsertMetadata() { ) { string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); string _insert_metadata = format(q"┃ - INSERT INTO metadata_and_text ( - uid, - src_filename_base, - src_filename_suffix, - src_composite_id_per_txt, - src_composite_id_per_pod, - title, - title_main, - title_sub, - title_short, - title_edition, - title_language, - creator_author, - creator_author_last_first, - creator_author_email, - creator_illustrator, - creator_translator, - language_document, - language_document_char, - date_added_to_site, - date_available, - date_created, - date_issued, - date_modified, - date_published, - date_valid, - rights_copyright, - rights_copyright_audio, - rights_copyright_cover, - rights_copyright_illustrations, - rights_copyright_photographs, - rights_copyright_text, - rights_copyright_translation, - rights_copyright_video, - rights_license, - identifier_oclc, - identifier_isbn, - classify_dewey, - classify_keywords, - classify_loc, - classify_subject, - classify_topic_register, - original_title, - original_publisher, - original_language, - original_language_char, - original_source, - notes_abstract, - notes_description, - publisher, - site_url_doc_root - ) - VALUES ( - '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' - ); + INSERT INTO metadata_and_text ( + uid, + src_filename_base, + src_filename_suffix, + src_composite_id_per_txt, + src_composite_id_per_pod, + title, + title_main, + title_sub, + title_short, + title_edition, + title_language, + creator_author, + creator_author_last_first, + creator_author_email, + creator_illustrator, + creator_translator, + language_document, + language_document_char, + date_added_to_site, + date_available, + date_created, + date_issued, + date_modified, + date_published, + date_valid, + rights_copyright, + rights_copyright_audio, + rights_copyright_cover, + rights_copyright_illustrations, + rights_copyright_photographs, + rights_copyright_text, + rights_copyright_translation, + rights_copyright_video, + rights_license, + identifier_oclc, + identifier_isbn, + classify_dewey, + classify_keywords, + classify_loc, + classify_subject, + classify_topic_register, + original_title, + original_publisher, + original_language, + original_language_char, + original_source, + notes_abstract, + notes_description, + publisher, + site_url_doc_root + ) + VALUES ( + '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' + ); ┃", _uid, SQLinsertDelimiter!()(doc_matters.src.filename_base), @@ -1151,17 +1151,17 @@ template SQLiteInsertMetadata() { foreach (topic; doc_matters.conf_make_meta.meta.classify_topic_register_arr) { string[] subject_tree = topic.split(mkup.sep); _insert_topics ~= format(q"┃ - INSERT INTO topic_register ( - uid_metadata_and_text, - topic_register_lv0, - topic_register_lv1, - topic_register_lv2, - topic_register_lv3, - topic_register_lv4 - ) - VALUES ( - '%s', '%s', '%s', '%s', '%s', '%s' - ); + INSERT INTO topic_register ( + uid_metadata_and_text, + topic_register_lv0, + topic_register_lv1, + topic_register_lv2, + topic_register_lv3, + topic_register_lv4 + ) + VALUES ( + '%s', '%s', '%s', '%s', '%s', '%s' + ); ┃", _uid, (subject_tree.length > 0) ? subject_tree[0] : "", @@ -1184,20 +1184,20 @@ template SQLiteInsertDocObjectsLoop() { auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); string insertDocObjectsRow(O)(O obj) { string _insert_doc_objects_row = format(q"┃ - INSERT INTO doc_objects ( - uid_metadata_and_text, - ocn, - obj_id, - clean, - body, - lev, - is_of_type, - is_a, - seg_name - ) - VALUES ( - '%s', %s, '%s', '%s', '%s', %s, '%s', '%s', '%s' - ); + INSERT INTO doc_objects ( + uid_metadata_and_text, + ocn, + obj_id, + clean, + body, + lev, + is_of_type, + is_a, + seg_name + ) + VALUES ( + '%s', %s, '%s', '%s', '%s', %s, '%s', '%s', '%s' + ); ┃", _uid, obj.metainfo.ocn, diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d index 3857969..a0b256a 100644 --- a/src/doc_reform/io_out/xmls.d +++ b/src/doc_reform/io_out/xmls.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/io_out/xmls_css.d b/src/doc_reform/io_out/xmls_css.d index 38a784a..f6760d0 100644 --- a/src/doc_reform/io_out/xmls_css.d +++ b/src/doc_reform/io_out/xmls_css.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -469,3213 +469,3213 @@ template spineCss() { text-indent : 0em; } ┃"); - string _color_ocn_light = (doc_matters.opt.action.ocn_hidden) ? "#FFFFFF" : "#777777"; - string _color_ocn_dark = (doc_matters.opt.action.ocn_hidden) ? "#000000" : "#BBBBBB"; +string _color_ocn_light = (doc_matters.opt.action.ocn_hidden) ? "#FFFFFF" : "#777777"; +string _color_ocn_dark = (doc_matters.opt.action.ocn_hidden) ? "#000000" : "#BBBBBB"; string _css_light_html_seg = format(q"┃ - *{ - padding : 0px; - margin : 0px; - } - body { - height : 100vh; - background-color : #FFFFFF; - } - body { - color : #000000; - background : #FFFFFF; - background-color : #FFFFFF; - } - a:link { - color : #003399; - text-decoration : none; - } - a:visited { - color : #003399; - text-decoration : none; - } - a:hover { - color : #000000; - background-color : #F9F9AA; - } - a.lnkocn:link { - color : %s; - text-decoration : none; - } - a.lnkocn:visited { - color : #32CD32; - text-decoration : none; - } - a.lnkocn:hover { - color : #777777; - font-size : 15px; - } - a:hover img { - background-color : #FFFFFF; - } - a:active { - color : #003399; - text-decoration : underline; - } - input { - color : #000000; - background-color : #FFFFFF; - } - div { - margin-left : 0; - margin-right : 0; - } - div.p { - margin-left : 5%%; - margin-right : 1%%; - } - div.substance { - width : 100%%; - background-color : #FFFFFF; - } - div.ocn { - width : 5%%; - float : right; - top : 0; - background-color : #FFFFFF; - } - div.endnote { - width : 95%%; - background-color : #FFFFFF; - } - div.toc { - position : absolute; - float : left; - margin : 0; - padding : 0; - padding-top : 0.5em; - border : 0; - width : 13em; - background-color : #EEEEEE; - margin-right : 1em; - } - div.summary { - margin : 0; - padding : 0; - border-left : 13em solid #EEEEEE; - padding-left : 1em; - background-color : #EEEEEE; - } - div.content, div.main_column { - margin : 0; - padding : 0; - border-left : 13em solid #FFFFFF; - padding-left : 1em; - padding-right : 1em; - } - div.content0, div.main_column0 { - margin : 0; - padding : 0; - border-left : 0%% solid #FFFFFF; - padding-left : 5%%; - } - div.scroll { - margin : 0; - padding : 0; - padding-left : 1em; - padding-right : 1em; - } - div.content:after { - content : ' '; - clear : both; - display : block; - height : 0; - overflow : hidden; - } - div.footer { - clear : left; - padding : 0.5em; - font-size : 80%%; - margin : 0; - } - div.toc ul { - list-style : none; - padding : 0; - margin : 0; - } - div.toc li ul a, li ul span.currentlink - { - font-weight : normal; - font-size : 90%%; - padding-left : 2em; - background-color : #EEEEEE; - } - div.toc a, span.currentlink{ - display : block; - text-decoration : none; - padding-left : 0.5em; - color : #0000aa; - } - hr { - width : 90%%; - margin-left : 5%%; - margin-right : 2em; - margin-top : 1.8em; - margin-bottom : 1.8em; - } - span.currentlink { - text-decoration : none; - background-color : #AAAAAA; - } - div.toc a:visited { - color : #0000aa; - } - div.toc a:hover { - color : #000000; - background-color : #F9F9AA; - } - nav#toc ol { - list-style-type : none; - } - .norm, .bold, .verse, .group, .block, .alt { - line-height : 133%%; - margin-top : 12px; - margin-bottom : 0px; - padding-left : 0em; - text-indent : 0em; - } - p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { - display : block; - font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; - margin-left : 5%%; - margin-right : 2em; - } - p { - font-size : 100%%; - font-weight : normal; - line-height : 133%%; - text-align : justify; - text-indent : 0mm; - margin-top : 0.8em; - margin-bottom : 0.8em; - } - img { - max-width : 100%%; - height : auto; - } - pre { - width : auto; - display : block; - clear : both; - color : #555555; - } - pre.codeline { - display : table; - clear : both; - table-layout : fixed; - margin-left : 5%%; - margin-right : 5%%; - width : 90%%; - white-space : pre-wrap; - border-style : none; - border-radius : 5px 5px 5px 5px; - box-shadow : 0 2px 5px #AAAAAA inset; - margin-bottom : 1em; - padding : 0.5em 1em; - page-break-inside : avoid; - word-wrap : break-word; - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - white-space : pre; - white-space : pre-wrap; - white-space : -moz-pre-wrap; - white-space : -o-pre-wrap; - background-color : #EEEEEE; - color : #000000; - font-size : 95%%; - line-height : 100%%; - } - pre.codeline::before { - counter-reset : linenum; - } - pre.codeline span.tr { - display : table-row; - counter-increment : linenum; - } - pre.codeline span.th { - display : table-cell; - user-select : none; - -moz-user-select : none; - -webkit-user-select : none; - padding : 0.5em 0.5em; - /* background-color : #666666; */ - } - pre.codeline span.th::before { - content : counter(linenum) "."; - color : #999999; - text-align : right; - display : block; - } - pre.codeline span.th { - width : 4em; - } - pre.codeline code { - display : table-cell; - } - p.code { - border-style : none; - } - p.spaced { white-space : pre; } - p.block { - white-space : pre; - } - p.group { } - p.alt { } - p.verse { - white-space : pre; - margin-bottom : 6px; - } - p.caption { - text-align : left; - font-size : 80%%; - display : inline; - } - p.endnote { - font-size : 96%%; - line-height : 120%%; - text-align : left; - margin-right : 15mm; - padding-left : 1em; - text-indent : -1em; - } - p.center { - text-align : center; - } - p.bold { - font-weight : bold; - } - p.bold_left { - font-weight : bold; - text-align : left; - } - p.centerbold { - text-align : center; - font-weight : bold; - } - p.em { - font-weight : bold; - font-style : normal; - background : #FFF3B6; - } - p.small { - font-size : 80%%; - margin-top : 0px; - margin-bottom : 0px; - margin-right : 6px; - text-align : left; - } - .tiny, .tiny_left, .tiny_right, .tiny_center { - font-size : 10px; - margin-top : 0px; - margin-bottom : 0px; - color : #777777; - margin-right : 6px; - text-align : left; - } - p.tiny { } - p.tiny_left { - margin-left : 0px; - margin-right : 0px; - text-align : left; - } - p.tiny_right { - margin-right : 1em; - text-align : right; - } - p.tiny_center { - margin-left : 0px; - margin-right : 0px; - text-align : center; - } - p.concordance_word { - line-height : 150%%; - font-weight : bold; - display : inline; - margin-top : 4px; - margin-bottom : 1px; - } - p.concordance_count { - font-size : 80%%; - color : #777777; - display : inline; - margin-left : 0em; - } - p.concordance_object { - font-size : 80%%; - line-height : 120%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - p.book_index_lev1 { - line-height : 100%%; - margin-top : 4px; - margin-bottom : 1px; - } - p.book_index_lev2 { - line-height : 100%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - tt { - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - background-color : #EEEEEE; - color : #000000; - } +*{ + padding : 0px; + margin : 0px; +} +body { + height : 100vh; + background-color : #FFFFFF; +} +body { + color : #000000; + background : #FFFFFF; + background-color : #FFFFFF; +} +a:link { + color : #003399; + text-decoration : none; +} +a:visited { + color : #003399; + text-decoration : none; +} +a:hover { + color : #000000; + background-color : #F9F9AA; +} +a.lnkocn:link { + color : %s; + text-decoration : none; +} +a.lnkocn:visited { + color : #32CD32; + text-decoration : none; +} +a.lnkocn:hover { + color : #777777; + font-size : 15px; +} +a:hover img { + background-color : #FFFFFF; +} +a:active { + color : #003399; + text-decoration : underline; +} +input { + color : #000000; + background-color : #FFFFFF; +} +div { + margin-left : 0; + margin-right : 0; +} +div.p { + margin-left : 5%%; + margin-right : 1%%; +} +div.substance { + width : 100%%; + background-color : #FFFFFF; +} +div.ocn { + width : 5%%; + float : right; + top : 0; + background-color : #FFFFFF; +} +div.endnote { + width : 95%%; + background-color : #FFFFFF; +} +div.toc { + position : absolute; + float : left; + margin : 0; + padding : 0; + padding-top : 0.5em; + border : 0; + width : 13em; + background-color : #EEEEEE; + margin-right : 1em; +} +div.summary { + margin : 0; + padding : 0; + border-left : 13em solid #EEEEEE; + padding-left : 1em; + background-color : #EEEEEE; +} +div.content, div.main_column { + margin : 0; + padding : 0; + border-left : 13em solid #FFFFFF; + padding-left : 1em; + padding-right : 1em; +} +div.content0, div.main_column0 { + margin : 0; + padding : 0; + border-left : 0%% solid #FFFFFF; + padding-left : 5%%; +} +div.scroll { + margin : 0; + padding : 0; + padding-left : 1em; + padding-right : 1em; +} +div.content:after { + content : ' '; + clear : both; + display : block; + height : 0; + overflow : hidden; +} +div.footer { + clear : left; + padding : 0.5em; + font-size : 80%%; + margin : 0; +} +div.toc ul { + list-style : none; + padding : 0; + margin : 0; +} +div.toc li ul a, li ul span.currentlink +{ + font-weight : normal; + font-size : 90%%; + padding-left : 2em; + background-color : #EEEEEE; +} +div.toc a, span.currentlink{ + display : block; + text-decoration : none; + padding-left : 0.5em; + color : #0000aa; +} +hr { + width : 90%%; + margin-left : 5%%; + margin-right : 2em; + margin-top : 1.8em; + margin-bottom : 1.8em; +} +span.currentlink { + text-decoration : none; + background-color : #AAAAAA; +} +div.toc a:visited { + color : #0000aa; +} +div.toc a:hover { + color : #000000; + background-color : #F9F9AA; +} +nav#toc ol { + list-style-type : none; +} +.norm, .bold, .verse, .group, .block, .alt { + line-height : 133%%; + margin-top : 12px; + margin-bottom : 0px; + padding-left : 0em; + text-indent : 0em; +} +p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { + display : block; + font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; + margin-left : 5%%; + margin-right : 2em; +} +p { + font-size : 100%%; + font-weight : normal; + line-height : 133%%; + text-align : justify; + text-indent : 0mm; + margin-top : 0.8em; + margin-bottom : 0.8em; +} +img { + max-width : 100%%; + height : auto; +} +pre { + width : auto; + display : block; + clear : both; + color : #555555; +} +pre.codeline { + display : table; + clear : both; + table-layout : fixed; + margin-left : 5%%; + margin-right : 5%%; + width : 90%%; + white-space : pre-wrap; + border-style : none; + border-radius : 5px 5px 5px 5px; + box-shadow : 0 2px 5px #AAAAAA inset; + margin-bottom : 1em; + padding : 0.5em 1em; + page-break-inside : avoid; + word-wrap : break-word; + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + white-space : pre; + white-space : pre-wrap; + white-space : -moz-pre-wrap; + white-space : -o-pre-wrap; + background-color : #EEEEEE; + color : #000000; + font-size : 95%%; + line-height : 100%%; +} +pre.codeline::before { + counter-reset : linenum; +} +pre.codeline span.tr { + display : table-row; + counter-increment : linenum; +} +pre.codeline span.th { + display : table-cell; + user-select : none; + -moz-user-select : none; + -webkit-user-select : none; + padding : 0.5em 0.5em; + /* background-color : #666666; */ +} +pre.codeline span.th::before { + content : counter(linenum) "."; + color : #999999; + text-align : right; + display : block; +} +pre.codeline span.th { + width : 4em; +} +pre.codeline code { + display : table-cell; +} +p.code { + border-style : none; +} +p.spaced { white-space : pre; } +p.block { + white-space : pre; +} +p.group { } +p.alt { } +p.verse { + white-space : pre; + margin-bottom : 6px; +} +p.caption { + text-align : left; + font-size : 80%%; + display : inline; +} +p.endnote { + font-size : 96%%; + line-height : 120%%; + text-align : left; + margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; +} +p.center { + text-align : center; +} +p.bold { + font-weight : bold; +} +p.bold_left { + font-weight : bold; + text-align : left; +} +p.centerbold { + text-align : center; + font-weight : bold; +} +p.em { + font-weight : bold; + font-style : normal; + background : #FFF3B6; +} +p.small { + font-size : 80%%; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; +} +.tiny, .tiny_left, .tiny_right, .tiny_center { + font-size : 10px; + margin-top : 0px; + margin-bottom : 0px; + color : #777777; + margin-right : 6px; + text-align : left; +} +p.tiny { } +p.tiny_left { + margin-left : 0px; + margin-right : 0px; + text-align : left; +} +p.tiny_right { + margin-right : 1em; + text-align : right; +} +p.tiny_center { + margin-left : 0px; + margin-right : 0px; + text-align : center; +} +p.concordance_word { + line-height : 150%%; + font-weight : bold; + display : inline; + margin-top : 4px; + margin-bottom : 1px; +} +p.concordance_count { + font-size : 80%%; + color : #777777; + display : inline; + margin-left : 0em; +} +p.concordance_object { + font-size : 80%%; + line-height : 120%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +p.book_index_lev1 { + line-height : 100%%; + margin-top : 4px; + margin-bottom : 1px; +} +p.book_index_lev2 { + line-height : 100%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +tt { + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + background-color : #EEEEEE; + color : #000000; +} %s - note { white-space : pre; } - label.ocn { - width : 2%%; - float : right; - top : 0; - font-size : 10px; - margin-top : 0px; - margin-bottom : 5px; - margin-right : 5px; - text-align : right; - color : %s; - -khtml-user-select : none; - -moz-user-select : none; - -ms-user-select : none; - -o-user-select : none; - -webkit-user-select : none; - user-select : none; - } - table { - display : block; - margin-left : 5%%; - margin-right : 2em; - background-color : inherit; - } - tr { } - th,td { - vertical-align : top; - text-align : left; - } - th { - font-weight : bold; - } - em { - font-weight : bold; - font-style : italic; - } - p.left,th.left,td.left { - text-align : left; - } - p.small_left,th.small_left,td.small_left { - text-align : left; - font-size : 80%%; - } - p.right,th.right,td.right { - text-align : right; - } - ul, li { - list-style-type : none; - list-style : none; - padding-left : 20px; - font-weight : normal; - line-height : 150%%; - text-align : left; - text-indent : 0mm; - margin-left : 1em; - margin-right : 2em; - margin-top : 3px; - margin-bottom : 3px; - } - li { - background : url(../image_sys/bullet_09.png) no-repeat 0px 6px; - } - ul { } - h0, h1, h2, h3, h4, h5, h6, h7 { - font-weight : bold; - line-height : 120%%; - text-align : left; - margin-top : 20px; - margin-bottom : 10px; - } - h4.norm, h5.norm, h6.norm, h7.norm { - margin-top : 10px; - margin-bottom : 0px; - } - h0 { font-size : 125%%; } - h1 { font-size : 120%%; } - h2 { font-size : 115%%; } - h3 { font-size : 110%%; } - h4 { font-size : 105%%; } - h5 { font-size : 100%%; } - h6 { font-size : 100%%; } - h7 { font-size : 100%%; } - h0, h1, h2, h3, h4, h5, h6, h7 { - text-shadow : .2em .2em .3em #808080; - } - h1.i { margin-left : 2em; } - h2.i { margin-left : 3em; } - h3.i { margin-left : 4em; } - h4.i { margin-left : 5em; } - h5.i { margin-left : 6em; } - h6.i { margin-left : 7em; } - h7.i { margin-left : 8em; } - h8.i { margin-left : 9em; } - h9.i { margin-left : 10em; } - .toc { - font-weight : normal; - margin-top : 6px; - margin-bottom : 6px; - } - h0.toc { - margin-left : 1em; - font-size : 120%%; - line-height : 150%%; - } - h1.toc { - margin-left : 1em; - font-size : 115%%; - line-height : 150%%; - } - h2.toc { - margin-left : 2em; - font-size : 110%%; - line-height : 140%%; - } - h3.toc { - margin-left : 3em; - font-size : 105%%; - line-height : 120%%; - } - h4.toc { - margin-left : 4em; - font-size : 100%%; - line-height : 120%%; - } - h5.toc { - margin-left : 5em; - font-size : 95%%; - line-height : 110%%; - } - h6.toc { - margin-left : 6em; - font-size : 90%%; - line-height : 110%%; - } - h7.toc { - margin-left : 7em; - font-size : 85%%; - line-height : 100%%; - } - .subtoc { - margin-right : 34%%; - font-weight : normal; - } - h5.subtoc { - margin-left : 2em; - font-size : 80%%; - margin-top : 2px; - margin-bottom : 2px; - } - h6.subtoc { - margin-left : 3em; - font-size : 75%%; - margin-top : 0px; - margin-bottom : 0px; - } - h7.subtoc { - margin-left : 4em; - font-size : 70%%; - margin-top : 0px; - margin-bottom : 0px; - } - .icon-bar { - width : 100%%; - overflow : auto; - margin : 0em 0em 0em; - } - .left-bar { - width : 85%%; - float : left; - display : inline; - overflow : auto; - } - .toc-button { - position : absolute; - top : 8px; - width : 2em; - height : 2em; - border-radius : 50%%; - background : #CCCCCC; - fill : #333333; - box-shadow : 0 2px 5px #AAAAAA inset; - } - .toc-button svg { - position : relative; - left : 25%%; - top : 25%%; - width : 150%%; - height : 150%%; - } - .toc-button p { - vertical-align : center; - font-size : 120%%; - } - .prev-next-button { - position : absolute; - top : 8px; - width : 2em; - height : 2em; - border-radius : 50%%; - background : #CCCCCC; - box-shadow : 0 2px 5px #AAAAAA inset; - } - .prev-next-button svg { - position : relative; - left : 20%%; - top : 20%%; - width : 60%%; - height : 60%%; - } - .menu { - right : 6em; - } - .previous { - right : 3em; - } - .next { - right : 0em; - } - .arrow { - fill : #333333; - } - .minitoc { - line-height : 100%%; - font-size : 90%%; - margin-top : 6px; - margin-bottom : 0px; - padding-left : 0em; - text-indent : 0em; - -khtml-user-select : none; - -moz-user-select : none; - -ms-user-select : none; - -o-user-select : none; - -webkit-user-select : none; - user-select : none; - } - /* flex */ - .flex-menu-bar { - display : -webkit-flex; - display : flex; - -webkit-flex-wrap : wrap; - -webkit-align-items : center; - align-items : center; - width : 100%%; - margin-left : 5%%; - margin-right : 2%%; - background-color : #FFFFFF; - } - .flex-menu-option { - background-color : #FFFFFF; - margin-right : 4px; - } - .flex-list { - display : -webkit-flex; - display : flex; - -webkit-align-items : center; - display : block; - align-items : center; - width : 100%%; - background-color : #FFFFFF; - } - .flex-list-item { - background-color : #FFFFFF; - margin : 4px; - } - /* grid */ - .wrapper { - display : grid; - grid-template-columns : 100%%; - grid-template-areas : - "headband" - "doc_header" - "doc_title" - "doc_toc" - "doc_prefix" - "doc_intro" - "doc_body" - "doc_endnotes" - "doc_glossary" - "doc_biblio" - "doc_bookindex" - "doc_blurb" - "doc_suffix"; - margin : 0px; - padding : 0px; - background-color : #FFFFFF; - } - .delimit { - border-style : none; - border-color : #FFFFFF; - padding : 10px; - } - .headband { - grid-area : headband; - background-color : #FFFFFF; - } - .doc_header { - grid-area : doc_header; - } - .doc_title { - grid-area : doc_title; - } - .doc_toc { - grid-area : doc_toc; - } - .doc_prefix { - grid-area : doc_prefix; - } - .doc_intro { - grid-area : doc_intro; - } - .doc_body { - grid-area : doc_body; - } - .doc_endnotes { - grid-area : doc_endnotes; - } - .doc_glossary { - grid-area : doc_glossary; - } - .doc_biblio { - grid-area : doc_biblio; - } - .doc_bookindex { - grid-area : doc_bookindex; - } - .doc_blurb { - grid-area : doc_blurb; - } - .doc_suffix { - grid-area : doc_suffix; - } - .nav-ul { - list-style : none; - float : left; - } - .nav-li { - float : left; - padding-right : 0.7em; - } - .nav-li a { - text-decoration : none; - color : #FFFFFF; - } - footer { - background-color : #00704E; - } +note { white-space : pre; } +label.ocn { + width : 2%%; + float : right; + top : 0; + font-size : 10px; + margin-top : 0px; + margin-bottom : 5px; + margin-right : 5px; + text-align : right; + color : %s; + -khtml-user-select : none; + -moz-user-select : none; + -ms-user-select : none; + -o-user-select : none; + -webkit-user-select : none; + user-select : none; +} +table { + display : block; + margin-left : 5%%; + margin-right : 2em; + background-color : inherit; +} +tr { } +th,td { + vertical-align : top; + text-align : left; +} +th { + font-weight : bold; +} +em { + font-weight : bold; + font-style : italic; +} +p.left,th.left,td.left { + text-align : left; +} +p.small_left,th.small_left,td.small_left { + text-align : left; + font-size : 80%%; +} +p.right,th.right,td.right { + text-align : right; +} +ul, li { + list-style-type : none; + list-style : none; + padding-left : 20px; + font-weight : normal; + line-height : 150%%; + text-align : left; + text-indent : 0mm; + margin-left : 1em; + margin-right : 2em; + margin-top : 3px; + margin-bottom : 3px; +} +li { + background : url(../image_sys/bullet_09.png) no-repeat 0px 6px; +} +ul { } +h0, h1, h2, h3, h4, h5, h6, h7 { + font-weight : bold; + line-height : 120%%; + text-align : left; + margin-top : 20px; + margin-bottom : 10px; +} +h4.norm, h5.norm, h6.norm, h7.norm { + margin-top : 10px; + margin-bottom : 0px; +} +h0 { font-size : 125%%; } +h1 { font-size : 120%%; } +h2 { font-size : 115%%; } +h3 { font-size : 110%%; } +h4 { font-size : 105%%; } +h5 { font-size : 100%%; } +h6 { font-size : 100%%; } +h7 { font-size : 100%%; } +h0, h1, h2, h3, h4, h5, h6, h7 { + text-shadow : .2em .2em .3em #808080; +} +h1.i { margin-left : 2em; } +h2.i { margin-left : 3em; } +h3.i { margin-left : 4em; } +h4.i { margin-left : 5em; } +h5.i { margin-left : 6em; } +h6.i { margin-left : 7em; } +h7.i { margin-left : 8em; } +h8.i { margin-left : 9em; } +h9.i { margin-left : 10em; } +.toc { + font-weight : normal; + margin-top : 6px; + margin-bottom : 6px; +} +h0.toc { + margin-left : 1em; + font-size : 120%%; + line-height : 150%%; +} +h1.toc { + margin-left : 1em; + font-size : 115%%; + line-height : 150%%; +} +h2.toc { + margin-left : 2em; + font-size : 110%%; + line-height : 140%%; +} +h3.toc { + margin-left : 3em; + font-size : 105%%; + line-height : 120%%; +} +h4.toc { + margin-left : 4em; + font-size : 100%%; + line-height : 120%%; +} +h5.toc { + margin-left : 5em; + font-size : 95%%; + line-height : 110%%; +} +h6.toc { + margin-left : 6em; + font-size : 90%%; + line-height : 110%%; +} +h7.toc { + margin-left : 7em; + font-size : 85%%; + line-height : 100%%; +} +.subtoc { + margin-right : 34%%; + font-weight : normal; +} +h5.subtoc { + margin-left : 2em; + font-size : 80%%; + margin-top : 2px; + margin-bottom : 2px; +} +h6.subtoc { + margin-left : 3em; + font-size : 75%%; + margin-top : 0px; + margin-bottom : 0px; +} +h7.subtoc { + margin-left : 4em; + font-size : 70%%; + margin-top : 0px; + margin-bottom : 0px; +} +.icon-bar { + width : 100%%; + overflow : auto; + margin : 0em 0em 0em; +} +.left-bar { + width : 85%%; + float : left; + display : inline; + overflow : auto; +} +.toc-button { + position : absolute; + top : 8px; + width : 2em; + height : 2em; + border-radius : 50%%; + background : #CCCCCC; + fill : #333333; + box-shadow : 0 2px 5px #AAAAAA inset; +} +.toc-button svg { + position : relative; + left : 25%%; + top : 25%%; + width : 150%%; + height : 150%%; +} +.toc-button p { + vertical-align : center; + font-size : 120%%; +} +.prev-next-button { + position : absolute; + top : 8px; + width : 2em; + height : 2em; + border-radius : 50%%; + background : #CCCCCC; + box-shadow : 0 2px 5px #AAAAAA inset; +} +.prev-next-button svg { + position : relative; + left : 20%%; + top : 20%%; + width : 60%%; + height : 60%%; +} +.menu { + right : 6em; + } +.previous { + right : 3em; + } +.next { + right : 0em; + } +.arrow { + fill : #333333; +} +.minitoc { + line-height : 100%%; + font-size : 90%%; + margin-top : 6px; + margin-bottom : 0px; + padding-left : 0em; + text-indent : 0em; + -khtml-user-select : none; + -moz-user-select : none; + -ms-user-select : none; + -o-user-select : none; + -webkit-user-select : none; + user-select : none; +} +/* flex */ +.flex-menu-bar { + display : -webkit-flex; + display : flex; + -webkit-flex-wrap : wrap; + -webkit-align-items : center; + align-items : center; + width : 100%%; + margin-left : 5%%; + margin-right : 2%%; + background-color : #FFFFFF; +} +.flex-menu-option { + background-color : #FFFFFF; + margin-right : 4px; +} +.flex-list { + display : -webkit-flex; + display : flex; + -webkit-align-items : center; + display : block; + align-items : center; + width : 100%%; + background-color : #FFFFFF; +} +.flex-list-item { + background-color : #FFFFFF; + margin : 4px; +} +/* grid */ +.wrapper { + display : grid; + grid-template-columns : 100%%; + grid-template-areas : + "headband" + "doc_header" + "doc_title" + "doc_toc" + "doc_prefix" + "doc_intro" + "doc_body" + "doc_endnotes" + "doc_glossary" + "doc_biblio" + "doc_bookindex" + "doc_blurb" + "doc_suffix"; + margin : 0px; + padding : 0px; + background-color : #FFFFFF; +} +.delimit { + border-style : none; + border-color : #FFFFFF; + padding : 10px; +} +.headband { + grid-area : headband; + background-color : #FFFFFF; +} +.doc_header { + grid-area : doc_header; +} +.doc_title { + grid-area : doc_title; +} +.doc_toc { + grid-area : doc_toc; +} +.doc_prefix { + grid-area : doc_prefix; +} +.doc_intro { + grid-area : doc_intro; +} +.doc_body { + grid-area : doc_body; +} +.doc_endnotes { + grid-area : doc_endnotes; +} +.doc_glossary { + grid-area : doc_glossary; +} +.doc_biblio { + grid-area : doc_biblio; +} +.doc_bookindex { + grid-area : doc_bookindex; +} +.doc_blurb { + grid-area : doc_blurb; +} +.doc_suffix { + grid-area : doc_suffix; +} +.nav-ul { + list-style : none; + float : left; +} +.nav-li { + float : left; + padding-right : 0.7em; +} +.nav-li a { + text-decoration : none; + color : #FFFFFF; +} +footer { + background-color : #00704E; +} ┃", _color_ocn_light, _css_indent, _color_ocn_light, ); string _css_dark_html_seg = format(q"┃ - *{ - padding : 0px; - margin : 0px; - } - body { - height : 100vh; - background-color : #000000; - } - body { - color : #CCCCCC; - background : #000000; - background-color : #000000; - } - a:link { - color : #FFFFFF; - text-decoration : none; - } - a:visited { - color : #999999; - text-decoration : none; - } - a:hover { - color : #000000; - background-color : #555555; - } - a.lnkocn:link { - color : %s; - text-decoration : none; - } - a.lnkocn:visited { - color : #9ACD32; - text-decoration : none; - } - a.lnkocn:hover { - color : #BBBBBB; - font-size : 15px; - } - a:hover img { - background-color : #000000; - } - a:active { - color : #888888; - text-decoration : underline; - } - input { - color : #FFFFFF; - background-color : #777777; - } - div { - margin-left : 0; - margin-right : 0; - } - div.p { - margin-left : 5%%; - margin-right : 1%%; - } - div.substance { - width : 100%%; - background-color : #000000; - } - div.ocn { - width : 5%%; - float : right; - top : 0; - background-color : #000000; - } - div.endnote { - width : 95%%; - background-color : #000000; - } - div.toc { - position : absolute; - float : left; - margin : 0; - padding : 0; - padding-top : 0.5em; - border : 0; - width : 13em; - background-color : #111111; - margin-right : 1em; - } - div.summary { - margin : 0; - padding : 0; - border-left : 13em solid #111111; - padding-left : 1em; - background-color : #111111; - } - div.content, div.main_column { - margin : 0; - padding : 0; - border-left : 13em solid #000000; - padding-left : 1em; - padding-right : 1em; - } - div.content0, div.main_column0 { - margin : 0; - padding : 0; - border-left : 0%% solid #000000; - padding-left : 5%%; - } - div.scroll { - margin : 0; - padding : 0; - padding-left : 1em; - padding-right : 1em; - } - div.content:after { - content : ' '; - clear : both; - display : block; - height : 0; - overflow : hidden; - } - div.footer { - clear : left; - padding : 0.5em; - font-size : 80%%; - margin : 0; - } - div.toc ul { - list-style : none; - padding : 0; - margin : 0; - } - div.toc li ul a, li ul span.currentlink - { - font-weight : normal; - font-size : 90%%; - padding-left : 2em; - background-color : #111111; - } - div.toc a, span.currentlink{ - display : block; - text-decoration : none; - padding-left : 0.5em; - color : #FF00AA; - } - hr { - width : 90%%; - margin-left : 5%%; - margin-right : 2em; - margin-top : 1.8em; - margin-bottom : 1.8em; - } - span.currentlink { - text-decoration : none; - background-color : #AAAAF9; - } - div.toc a:visited { - color : #FF00AA; - } - div.toc a:hover { - color : #CCCCCC; - background-color : #F9F9AA; - } - nav#toc ol { - list-style-type : none; - } - .norm, .bold, .verse, .group, .block, .alt { - line-height : 133%%; - margin-top : 12px; - margin-bottom : 0px; - padding-left : 0em; - text-indent : 0em; - } - p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { - display : block; - font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; - margin-left : 5%%; - margin-right : 2em; - } - p { - font-size : 100%%; - font-weight : normal; - line-height : 133%%; - text-align : justify; - text-indent : 0mm; - margin-top : 0.8em; - margin-bottom : 0.8em; - } - img { - max-width : 100%%; - height : auto; - } - pre { - width : auto; - display : block; - clear : both; - color : #555555; - } - pre.codeline { - display : table; - clear : both; - table-layout : fixed; - margin-left : 5%%; - margin-right : 5%%; - width : 90%%; - white-space : pre-wrap; - border-style : none; - border-radius : 5px 5px 5px 5px; - box-shadow : 0 2px 5px #AAAAAA inset; - margin-bottom : 1em; - padding : 0.5em 1em; - page-break-inside : avoid; - word-wrap : break-word; - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - white-space : pre; - white-space : pre-wrap; - white-space : -moz-pre-wrap; - white-space : -o-pre-wrap; - background-color : #555555; - color : #DDDDDD; - font-size : 95%%; - line-height : 100%%; - } - pre.codeline::before { - counter-reset : linenum; - } - pre.codeline span.tr { - display : table-row; - counter-increment : linenum; - } - pre.codeline span.th { - display : table-cell; - user-select : none; - -moz-user-select : none; - -webkit-user-select : none; - padding : 0.5em 0.5em; - } - pre.codeline span.th::before { - content : counter(linenum) "."; - color : #999999; - text-align : right; - display : block; - } - pre.codeline span.th { - width : 4em; - } - pre.codeline code { - display : table-cell; - } - p.code { - border-style : none; - } - p.spaced { white-space : pre; } - p.block { - white-space : pre; - } - p.group { } - p.alt { } - p.verse { - white-space : pre; - margin-bottom : 6px; - } - p.caption { - text-align : left; - font-size : 80%%; - display : inline; - } - p.endnote { - font-size : 96%%; - line-height : 120%%; - text-align : left; - margin-right : 15mm; - padding-left : 1em; - text-indent : -1em; - } - p.center { - text-align : center; - } - p.bold { - font-weight : bold; - } - p.bold_left { - font-weight : bold; - text-align : left; - } - p.centerbold { - text-align : center; - font-weight : bold; - } - p.em { - font-weight : bold; - font-style : normal; - background : #FFF3B6; - } - p.small { - font-size : 80%%; - margin-top : 0px; - margin-bottom : 0px; - margin-right : 6px; - text-align : left; - } - .tiny, .tiny_left, .tiny_right, .tiny_center { - font-size : 10px; - margin-top : 0px; - margin-bottom : 0px; - color : #EEEEEE; - margin-right : 6px; - text-align : left; - } - p.tiny { } - p.tiny_left { - margin-left : 0px; - margin-right : 0px; - text-align : left; - } - p.tiny_right { - margin-right : 1em; - text-align : right; - } - p.tiny_center { - margin-left : 0px; - margin-right : 0px; - text-align : center; - } - p.concordance_word { - line-height : 150%%; - font-weight : bold; - display : inline; - margin-top : 4px; - margin-bottom : 1px; - } - p.concordance_count { - font-size : 80%%; - color : #555555; - display : inline; - margin-left : 0em; - } - p.concordance_object { - font-size : 80%%; - line-height : 120%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - p.book_index_lev1 { - line-height : 100%%; - margin-top : 4px; - margin-bottom : 1px; - } - p.book_index_lev2 { - line-height : 100%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - tt { - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - background-color : #555555; - color : #DDDDDD; - } +*{ + padding : 0px; + margin : 0px; +} +body { + height : 100vh; + background-color : #000000; +} +body { + color : #CCCCCC; + background : #000000; + background-color : #000000; +} +a:link { + color : #FFFFFF; + text-decoration : none; +} +a:visited { + color : #999999; + text-decoration : none; +} +a:hover { + color : #000000; + background-color : #555555; +} +a.lnkocn:link { + color : %s; + text-decoration : none; +} +a.lnkocn:visited { + color : #9ACD32; + text-decoration : none; +} +a.lnkocn:hover { + color : #BBBBBB; + font-size : 15px; +} +a:hover img { + background-color : #000000; +} +a:active { + color : #888888; + text-decoration : underline; +} +input { + color : #FFFFFF; + background-color : #777777; +} +div { + margin-left : 0; + margin-right : 0; +} +div.p { + margin-left : 5%%; + margin-right : 1%%; +} +div.substance { + width : 100%%; + background-color : #000000; +} +div.ocn { + width : 5%%; + float : right; + top : 0; + background-color : #000000; +} +div.endnote { + width : 95%%; + background-color : #000000; +} +div.toc { + position : absolute; + float : left; + margin : 0; + padding : 0; + padding-top : 0.5em; + border : 0; + width : 13em; + background-color : #111111; + margin-right : 1em; +} +div.summary { + margin : 0; + padding : 0; + border-left : 13em solid #111111; + padding-left : 1em; + background-color : #111111; +} +div.content, div.main_column { + margin : 0; + padding : 0; + border-left : 13em solid #000000; + padding-left : 1em; + padding-right : 1em; +} +div.content0, div.main_column0 { + margin : 0; + padding : 0; + border-left : 0%% solid #000000; + padding-left : 5%%; +} +div.scroll { + margin : 0; + padding : 0; + padding-left : 1em; + padding-right : 1em; +} +div.content:after { + content : ' '; + clear : both; + display : block; + height : 0; + overflow : hidden; +} +div.footer { + clear : left; + padding : 0.5em; + font-size : 80%%; + margin : 0; +} +div.toc ul { + list-style : none; + padding : 0; + margin : 0; +} +div.toc li ul a, li ul span.currentlink +{ + font-weight : normal; + font-size : 90%%; + padding-left : 2em; + background-color : #111111; +} +div.toc a, span.currentlink{ + display : block; + text-decoration : none; + padding-left : 0.5em; + color : #FF00AA; +} +hr { + width : 90%%; + margin-left : 5%%; + margin-right : 2em; + margin-top : 1.8em; + margin-bottom : 1.8em; +} +span.currentlink { + text-decoration : none; + background-color : #AAAAF9; +} +div.toc a:visited { + color : #FF00AA; +} +div.toc a:hover { + color : #CCCCCC; + background-color : #F9F9AA; +} +nav#toc ol { + list-style-type : none; +} +.norm, .bold, .verse, .group, .block, .alt { + line-height : 133%%; + margin-top : 12px; + margin-bottom : 0px; + padding-left : 0em; + text-indent : 0em; +} +p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { + display : block; + font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; + margin-left : 5%%; + margin-right : 2em; +} +p { + font-size : 100%%; + font-weight : normal; + line-height : 133%%; + text-align : justify; + text-indent : 0mm; + margin-top : 0.8em; + margin-bottom : 0.8em; +} +img { + max-width : 100%%; + height : auto; +} +pre { + width : auto; + display : block; + clear : both; + color : #555555; +} +pre.codeline { + display : table; + clear : both; + table-layout : fixed; + margin-left : 5%%; + margin-right : 5%%; + width : 90%%; + white-space : pre-wrap; + border-style : none; + border-radius : 5px 5px 5px 5px; + box-shadow : 0 2px 5px #AAAAAA inset; + margin-bottom : 1em; + padding : 0.5em 1em; + page-break-inside : avoid; + word-wrap : break-word; + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + white-space : pre; + white-space : pre-wrap; + white-space : -moz-pre-wrap; + white-space : -o-pre-wrap; + background-color : #555555; + color : #DDDDDD; + font-size : 95%%; + line-height : 100%%; +} +pre.codeline::before { + counter-reset : linenum; +} +pre.codeline span.tr { + display : table-row; + counter-increment : linenum; +} +pre.codeline span.th { + display : table-cell; + user-select : none; + -moz-user-select : none; + -webkit-user-select : none; + padding : 0.5em 0.5em; +} +pre.codeline span.th::before { + content : counter(linenum) "."; + color : #999999; + text-align : right; + display : block; +} +pre.codeline span.th { + width : 4em; +} +pre.codeline code { + display : table-cell; +} +p.code { + border-style : none; +} +p.spaced { white-space : pre; } +p.block { + white-space : pre; +} +p.group { } +p.alt { } +p.verse { + white-space : pre; + margin-bottom : 6px; +} +p.caption { + text-align : left; + font-size : 80%%; + display : inline; +} +p.endnote { + font-size : 96%%; + line-height : 120%%; + text-align : left; + margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; +} +p.center { + text-align : center; +} +p.bold { + font-weight : bold; +} +p.bold_left { + font-weight : bold; + text-align : left; +} +p.centerbold { + text-align : center; + font-weight : bold; +} +p.em { + font-weight : bold; + font-style : normal; + background : #FFF3B6; +} +p.small { + font-size : 80%%; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; +} +.tiny, .tiny_left, .tiny_right, .tiny_center { + font-size : 10px; + margin-top : 0px; + margin-bottom : 0px; + color : #EEEEEE; + margin-right : 6px; + text-align : left; +} +p.tiny { } +p.tiny_left { + margin-left : 0px; + margin-right : 0px; + text-align : left; +} +p.tiny_right { + margin-right : 1em; + text-align : right; +} +p.tiny_center { + margin-left : 0px; + margin-right : 0px; + text-align : center; +} +p.concordance_word { + line-height : 150%%; + font-weight : bold; + display : inline; + margin-top : 4px; + margin-bottom : 1px; +} +p.concordance_count { + font-size : 80%%; + color : #555555; + display : inline; + margin-left : 0em; +} +p.concordance_object { + font-size : 80%%; + line-height : 120%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +p.book_index_lev1 { + line-height : 100%%; + margin-top : 4px; + margin-bottom : 1px; +} +p.book_index_lev2 { + line-height : 100%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +tt { + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + background-color : #555555; + color : #DDDDDD; +} %s - note { white-space : pre; } - label.ocn { - width : 2%%; - float : right; - top : 0; - font-size : 10px; - margin-top : 0px; - margin-bottom : 5px; - margin-right : 5px; - text-align : right; - color : %s; - -khtml-user-select : none; - -moz-user-select : none; - -ms-user-select : none; - -o-user-select : none; - -webkit-user-select : none; - user-select : none; - } - table { - display : block; - margin-left : 5%%; - margin-right : 2em; - background-color : inherit; - } - tr { } - th,td { - vertical-align : top; - text-align : left; - } - th { - font-weight : bold; - } - em { - font-weight : bold; - font-style : italic; - } - p.left,th.left,td.left { - text-align : left; - } - p.small_left,th.small_left,td.small_left { - text-align : left; - font-size : 80%%; - } - p.right,th.right,td.right { - text-align : right; - } - ul, li { - list-style-type : none; - list-style : none; - padding-left : 20px; - font-weight : normal; - line-height : 150%%; - text-align : left; - text-indent : 0mm; - margin-left : 1em; - margin-right : 2em; - margin-top : 3px; - margin-bottom : 3px; - } - li { - background : (../image_sys/bullet_09.png) no-repeat 0px 6px; - } - ul { } - h0, h1, h2, h3, h4, h5, h6, h7 { - font-weight : bold; - line-height : 120%%; - text-align : left; - margin-top : 20px; - margin-bottom : 10px; - } - h4.norm, h5.norm, h6.norm, h7.norm { - margin-top : 10px; - margin-bottom : 0px; - } - h0 { font-size : 125%%; } - h1 { font-size : 120%%; } - h2 { font-size : 115%%; } - h3 { font-size : 110%%; } - h4 { font-size : 105%%; } - h5 { font-size : 100%%; } - h6 { font-size : 100%%; } - h7 { font-size : 100%%; } - h0, h1, h2, h3, h4, h5, h6, h7 { - text-shadow : .2em .2em .3em #999999; - } - h1.i { margin-left : 2em; } - h2.i { margin-left : 3em; } - h3.i { margin-left : 4em; } - h4.i { margin-left : 5em; } - h5.i { margin-left : 6em; } - h6.i { margin-left : 7em; } - h7.i { margin-left : 8em; } - h8.i { margin-left : 9em; } - h9.i { margin-left : 10em; } - .toc { - font-weight : normal; - margin-top : 6px; - margin-bottom : 6px; - } - h0.toc { - margin-left : 1em; - font-size : 120%%; - line-height : 150%%; - } - h1.toc { - margin-left : 1em; - font-size : 115%%; - line-height : 150%%; - } - h2.toc { - margin-left : 2em; - font-size : 110%%; - line-height : 140%%; - } - h3.toc { - margin-left : 3em; - font-size : 105%%; - line-height : 120%%; - } - h4.toc { - margin-left : 4em; - font-size : 100%%; - line-height : 120%%; - } - h5.toc { - margin-left : 5em; - font-size : 95%%; - line-height : 110%%; - } - h6.toc { - margin-left : 6em; - font-size : 90%%; - line-height : 110%%; - } - h7.toc { - margin-left : 7em; - font-size : 85%%; - line-height : 100%%; - } - .subtoc { - margin-right : 34%%; - font-weight : normal; - } - h5.subtoc { - margin-left : 2em; - font-size : 80%%; - margin-top : 2px; - margin-bottom : 2px; - } - h6.subtoc { - margin-left : 3em; - font-size : 75%%; - margin-top : 0px; - margin-bottom : 0px; - } - h7.subtoc { - margin-left : 4em; - font-size : 70%%; - margin-top : 0px; - margin-bottom : 0px; - } - .icon-bar { - width : 100%%; - overflow : auto; - margin : 0em 0em 0em; - } - .left-bar { - width : 85%%; - float : left; - display : inline; - overflow : auto; - } - .toc-button { - position : absolute; - top : 8px; - width : 2em; - height : 2em; - border-radius : 50%%; - background : #555555; - fill : #DDDDDD; - box-shadow : 0 2px 5px #EEEEEE inset; - } - .toc-button svg { - position : relative; - left : 25%%; - top : 25%%; - width : 150%%; - height : 150%%; - } - .toc-button p { - vertical-align : center; - font-size : 120%%; - } - .prev-next-button { - position : absolute; - top : 8px; - width : 2em; - height : 2em; - border-radius : 50%%; - background : #555555; - box-shadow : 0 2px 5px #AAAAAA inset; - } - .prev-next-button svg { - position : relative; - left : 20%%; - top : 20%%; - width : 60%%; - height : 60%%; - } - .menu { - right : 6em; - } - .previous { - right : 3em; - } - .next { - right : 0em; - } - .arrow { - fill : #DDDDDD; - } - .minitoc { - line-height : 100%%; - font-size : 90%%; - margin-top : 6px; - margin-bottom : 0px; - padding-left : 0em; - text-indent : 0em; - -khtml-user-select : none; - -moz-user-select : none; - -ms-user-select : none; - -o-user-select : none; - -webkit-user-select : none; - user-select : none; - } - /* flex */ - .flex-menu-bar { - display : -webkit-flex; - display : flex; - -webkit-flex-wrap : wrap; - -webkit-align-items : center; - align-items : center; - width : 100%%; - margin-left : 5%%; - margin-right : 2%%; - background-color : #000000; - } - .flex-menu-option { - background-color : #000000; - margin-right : 4px; - } - .flex-list { - display : -webkit-flex; - display : flex; - -webkit-align-items : center; - display : block; - align-items : center; - width : 100%%; - background-color : #000000; - } - .flex-list-item { - background-color : #000000; - margin : 4px; - } - /* grid */ - .wrapper { - display : grid; - grid-template-columns : 100%%; - grid-template-areas : - "headband" - "doc_header" - "doc_title" - "doc_toc" - "doc_prefix" - "doc_intro" - "doc_body" - "doc_endnotes" - "doc_glossary" - "doc_biblio" - "doc_bookindex" - "doc_blurb" - "doc_suffix"; - margin : 0px; - padding : 0px; - background-color : #000000; - } - .delimit { - border-style : none; - border-color : #000000; - padding : 10px; - } - .headband { - grid-area : headband; - background-color : #000000; - } - .doc_header { - grid-area : doc_header; - } - .doc_title { - grid-area : doc_title; - } - .doc_toc { - grid-area : doc_toc; - } - .doc_prefix { - grid-area : doc_prefix; - } - .doc_intro { - grid-area : doc_intro; - } - .doc_body { - grid-area : doc_body; - } - .doc_endnotes { - grid-area : doc_endnotes; - } - .doc_glossary { - grid-area : doc_glossary; - } - .doc_biblio { - grid-area : doc_biblio; - } - .doc_bookindex { - grid-area : doc_bookindex; - } - .doc_blurb { - grid-area : doc_blurb; - } - .doc_suffix { - grid-area : doc_suffix; - } - .nav-ul { - list-style : none; - float : left; - } - .nav-li { - float : left; - padding-right : 0.7em; - } - .nav-li a { - text-decoration : none; - color : #000000; - } - footer { - background-color : #FF704E; - } +note { white-space : pre; } +label.ocn { + width : 2%%; + float : right; + top : 0; + font-size : 10px; + margin-top : 0px; + margin-bottom : 5px; + margin-right : 5px; + text-align : right; + color : %s; + -khtml-user-select : none; + -moz-user-select : none; + -ms-user-select : none; + -o-user-select : none; + -webkit-user-select : none; + user-select : none; +} +table { + display : block; + margin-left : 5%%; + margin-right : 2em; + background-color : inherit; +} +tr { } +th,td { + vertical-align : top; + text-align : left; +} +th { + font-weight : bold; +} +em { + font-weight : bold; + font-style : italic; +} +p.left,th.left,td.left { + text-align : left; +} +p.small_left,th.small_left,td.small_left { + text-align : left; + font-size : 80%%; +} +p.right,th.right,td.right { + text-align : right; +} +ul, li { + list-style-type : none; + list-style : none; + padding-left : 20px; + font-weight : normal; + line-height : 150%%; + text-align : left; + text-indent : 0mm; + margin-left : 1em; + margin-right : 2em; + margin-top : 3px; + margin-bottom : 3px; +} +li { + background : (../image_sys/bullet_09.png) no-repeat 0px 6px; +} +ul { } +h0, h1, h2, h3, h4, h5, h6, h7 { + font-weight : bold; + line-height : 120%%; + text-align : left; + margin-top : 20px; + margin-bottom : 10px; +} +h4.norm, h5.norm, h6.norm, h7.norm { + margin-top : 10px; + margin-bottom : 0px; +} +h0 { font-size : 125%%; } +h1 { font-size : 120%%; } +h2 { font-size : 115%%; } +h3 { font-size : 110%%; } +h4 { font-size : 105%%; } +h5 { font-size : 100%%; } +h6 { font-size : 100%%; } +h7 { font-size : 100%%; } +h0, h1, h2, h3, h4, h5, h6, h7 { + text-shadow : .2em .2em .3em #999999; +} +h1.i { margin-left : 2em; } +h2.i { margin-left : 3em; } +h3.i { margin-left : 4em; } +h4.i { margin-left : 5em; } +h5.i { margin-left : 6em; } +h6.i { margin-left : 7em; } +h7.i { margin-left : 8em; } +h8.i { margin-left : 9em; } +h9.i { margin-left : 10em; } +.toc { + font-weight : normal; + margin-top : 6px; + margin-bottom : 6px; +} +h0.toc { + margin-left : 1em; + font-size : 120%%; + line-height : 150%%; +} +h1.toc { + margin-left : 1em; + font-size : 115%%; + line-height : 150%%; +} +h2.toc { + margin-left : 2em; + font-size : 110%%; + line-height : 140%%; +} +h3.toc { + margin-left : 3em; + font-size : 105%%; + line-height : 120%%; +} +h4.toc { + margin-left : 4em; + font-size : 100%%; + line-height : 120%%; +} +h5.toc { + margin-left : 5em; + font-size : 95%%; + line-height : 110%%; +} +h6.toc { + margin-left : 6em; + font-size : 90%%; + line-height : 110%%; +} +h7.toc { + margin-left : 7em; + font-size : 85%%; + line-height : 100%%; +} +.subtoc { + margin-right : 34%%; + font-weight : normal; +} +h5.subtoc { + margin-left : 2em; + font-size : 80%%; + margin-top : 2px; + margin-bottom : 2px; +} +h6.subtoc { + margin-left : 3em; + font-size : 75%%; + margin-top : 0px; + margin-bottom : 0px; +} +h7.subtoc { + margin-left : 4em; + font-size : 70%%; + margin-top : 0px; + margin-bottom : 0px; +} +.icon-bar { + width : 100%%; + overflow : auto; + margin : 0em 0em 0em; +} +.left-bar { + width : 85%%; + float : left; + display : inline; + overflow : auto; +} +.toc-button { + position : absolute; + top : 8px; + width : 2em; + height : 2em; + border-radius : 50%%; + background : #555555; + fill : #DDDDDD; + box-shadow : 0 2px 5px #EEEEEE inset; +} +.toc-button svg { + position : relative; + left : 25%%; + top : 25%%; + width : 150%%; + height : 150%%; +} +.toc-button p { + vertical-align : center; + font-size : 120%%; +} +.prev-next-button { + position : absolute; + top : 8px; + width : 2em; + height : 2em; + border-radius : 50%%; + background : #555555; + box-shadow : 0 2px 5px #AAAAAA inset; +} +.prev-next-button svg { + position : relative; + left : 20%%; + top : 20%%; + width : 60%%; + height : 60%%; +} +.menu { + right : 6em; + } +.previous { + right : 3em; + } +.next { + right : 0em; + } +.arrow { + fill : #DDDDDD; +} +.minitoc { + line-height : 100%%; + font-size : 90%%; + margin-top : 6px; + margin-bottom : 0px; + padding-left : 0em; + text-indent : 0em; + -khtml-user-select : none; + -moz-user-select : none; + -ms-user-select : none; + -o-user-select : none; + -webkit-user-select : none; + user-select : none; +} +/* flex */ +.flex-menu-bar { + display : -webkit-flex; + display : flex; + -webkit-flex-wrap : wrap; + -webkit-align-items : center; + align-items : center; + width : 100%%; + margin-left : 5%%; + margin-right : 2%%; + background-color : #000000; +} +.flex-menu-option { + background-color : #000000; + margin-right : 4px; +} +.flex-list { + display : -webkit-flex; + display : flex; + -webkit-align-items : center; + display : block; + align-items : center; + width : 100%%; + background-color : #000000; +} +.flex-list-item { + background-color : #000000; + margin : 4px; +} +/* grid */ +.wrapper { + display : grid; + grid-template-columns : 100%%; + grid-template-areas : + "headband" + "doc_header" + "doc_title" + "doc_toc" + "doc_prefix" + "doc_intro" + "doc_body" + "doc_endnotes" + "doc_glossary" + "doc_biblio" + "doc_bookindex" + "doc_blurb" + "doc_suffix"; + margin : 0px; + padding : 0px; + background-color : #000000; +} +.delimit { + border-style : none; + border-color : #000000; + padding : 10px; +} +.headband { + grid-area : headband; + background-color : #000000; +} +.doc_header { + grid-area : doc_header; +} +.doc_title { + grid-area : doc_title; +} +.doc_toc { + grid-area : doc_toc; +} +.doc_prefix { + grid-area : doc_prefix; +} +.doc_intro { + grid-area : doc_intro; +} +.doc_body { + grid-area : doc_body; +} +.doc_endnotes { + grid-area : doc_endnotes; +} +.doc_glossary { + grid-area : doc_glossary; +} +.doc_biblio { + grid-area : doc_biblio; +} +.doc_bookindex { + grid-area : doc_bookindex; +} +.doc_blurb { + grid-area : doc_blurb; +} +.doc_suffix { + grid-area : doc_suffix; +} +.nav-ul { + list-style : none; + float : left; +} +.nav-li { + float : left; + padding-right : 0.7em; +} +.nav-li a { + text-decoration : none; + color : #000000; +} +footer { + background-color : #FF704E; +} ┃", _color_ocn_dark, _css_indent, _color_ocn_dark, ); string _css_light_html_scroll = format(q"┃ - *{ - padding : 0px; - margin : 0px; - } - body { - height : 100vh; - background-color : #FFFFFF; - } - body { - color : #000000; - background : #FFFFFF; - background-color : #FFFFFF; - } - a:link { - color : #003399; - text-decoration : none; - } - a:visited { - color : #003399; - text-decoration : none; - } - a:hover { - color : #000000; - background-color : #F9F9AA; - } - a.lnkocn:link { - color : %s; - text-decoration : none; - } - a.lnkocn:visited { - color : #32CD32; - text-decoration : none; - } - a.lnkocn:hover { - color : #777777; - font-size : 15px; - } - a:hover img { - background-color : #FFFFFF; - } - a:active { - color : #003399; - text-decoration : underline; - } - input { - color : #000000; - background-color : #FFFFFF; - } - div { - margin-left : 0; - margin-right : 0; - } - div.p { - margin-left : 5%%; - margin-right : 1%%; - } - div.substance { - width : 100%%; - background-color : #FFFFFF; - } - div.ocn { - width : 5%%; - float : right; - top : 0; - background-color : #FFFFFF; - } - div.endnote { - width : 95%%; - background-color : #FFFFFF; - } - div.toc { - position : absolute; - float : left; - margin : 0; - padding : 0; - padding-top : 0.5em; - border : 0; - width : 13em; - background-color : #EEEEEE; - margin-right : 1em; - } - div.summary { - margin : 0; - padding : 0; - border-left : 13em solid #EEEEEE; - padding-left : 1em; - background-color : #EEEEEE; - } - div.content, div.main_column { - margin : 0; - padding : 0; - border-left : 13em solid #FFFFFF; - padding-left : 1em; - padding-right : 1em; - } - div.content0, div.main_column0 { - margin : 0; - padding : 0; - border-left : 0%% solid #FFFFFF; - padding-left : 5%%; - } - div.scroll { - margin : 0; - padding : 0; - padding-left : 1em; - padding-right : 1em; - } - div.content:after { - content : ' '; - clear : both; - display : block; - height : 0; - overflow : hidden; - } - div.footer { - clear : left; - padding : 0.5em; - font-size : 80%%; - margin : 0; - } - div.toc ul { - list-style : none; - padding : 0; - margin : 0; - } - div.toc li ul a, li ul span.currentlink - { - font-weight : normal; - font-size : 90%%; - padding-left : 2em; - background-color : #EEEEEE; - } - div.toc a, span.currentlink{ - display : block; - text-decoration : none; - padding-left : 0.5em; - color : #0000aa; - } - hr { - width : 90%%; - margin-left : 5%%; - margin-right : 2em; - margin-top : 1.8em; - margin-bottom : 1.8em; - } - span.currentlink { - text-decoration : none; - background-color : #AAAAAA; - } - div.toc a:visited { - color : #0000aa; - } - div.toc a:hover { - color : #000000; - background-color : #F9F9AA; - } - nav#toc ol { - list-style-type : none; - } - .norm, .bold, .verse, .group, .block, .alt { - line-height : 133%%; - margin-top : 12px; - margin-bottom : 0px; - padding-left : 0em; - text-indent : 0em; - } - p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { - display : block; - font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; - margin-left : 5%%; - margin-right : 2em; - } - p { - font-size : 100%%; - font-weight : normal; - line-height : 133%%; - text-align : justify; - text-indent : 0mm; - margin-top : 0.8em; - margin-bottom : 0.8em; - } - img { - max-width : 100%%; - height : auto; - } - pre { - width : auto; - display : block; - clear : both; - color : #555555; - } - pre.codeline { - display : table; - clear : both; - table-layout : fixed; - margin-left : 5%%; - margin-right : 5%%; - width : 90%%; - white-space : pre-wrap; - border-style : none; - border-radius : 5px 5px 5px 5px; - box-shadow : 0 2px 5px #AAAAAA inset; - margin-bottom : 1em; - padding : 0.5em 1em; - page-break-inside : avoid; - word-wrap : break-word; - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - white-space : pre; - white-space : pre-wrap; - white-space : -moz-pre-wrap; - white-space : -o-pre-wrap; - background-color : #EEEEEE; - color : #000000; - font-size : 95%%; - line-height : 100%%; - } - pre.codeline::before { - counter-reset : linenum; - } - pre.codeline span.tr { - display : table-row; - counter-increment : linenum; - } - pre.codeline span.th { - display : table-cell; - user-select : none; - -moz-user-select : none; - -webkit-user-select : none; - padding : 0.5em 0.5em; - /* background-color : #666666; */ - } - pre.codeline span.th::before { - content : counter(linenum) "."; - color : #999999; - text-align : right; - display : block; - } - pre.codeline span.th { - width : 4em; - } - pre.codeline code { - display : table-cell; - } - p.code { - border-style : none; - } - p.spaced { white-space : pre; } - p.block { - white-space : pre; - } - p.group { } - p.alt { } - p.verse { - white-space : pre; - margin-bottom : 6px; - } - p.caption { - text-align : left; - font-size : 80%%; - display : inline; - } - p.endnote { - font-size : 96%%; - line-height : 120%%; - text-align : left; - margin-right : 15mm; - padding-left : 1em; - text-indent : -1em; - } - p.center { - text-align : center; - } - p.bold { - font-weight : bold; - } - p.bold_left { - font-weight : bold; - text-align : left; - } - p.centerbold { - text-align : center; - font-weight : bold; - } - p.em { - font-weight : bold; - font-style : normal; - background : #FFF3B6; - } - p.small { - font-size : 80%%; - margin-top : 0px; - margin-bottom : 0px; - margin-right : 6px; - text-align : left; - } - .tiny, .tiny_left, .tiny_right, .tiny_center { - font-size : 10px; - margin-top : 0px; - margin-bottom : 0px; - color : #777777; - margin-right : 6px; - text-align : left; - } - p.tiny { } - p.tiny_left { - margin-left : 0px; - margin-right : 0px; - text-align : left; - } - p.tiny_right { - margin-right : 1em; - text-align : right; - } - p.tiny_center { - margin-left : 0px; - margin-right : 0px; - text-align : center; - } - p.concordance_word { - line-height : 150%%; - font-weight : bold; - display : inline; - margin-top : 4px; - margin-bottom : 1px; - } - p.concordance_count { - font-size : 80%%; - color : #777777; - display : inline; - margin-left : 0em; - } - p.concordance_object { - font-size : 80%%; - line-height : 120%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - p.book_index_lev1 { - line-height : 100%%; - margin-top : 4px; - margin-bottom : 1px; - } - p.book_index_lev2 { - line-height : 100%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - tt { - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - background-color : #EEEEEE; - color : #000000; - } +*{ + padding : 0px; + margin : 0px; +} +body { + height : 100vh; + background-color : #FFFFFF; +} +body { + color : #000000; + background : #FFFFFF; + background-color : #FFFFFF; +} +a:link { + color : #003399; + text-decoration : none; +} +a:visited { + color : #003399; + text-decoration : none; +} +a:hover { + color : #000000; + background-color : #F9F9AA; +} +a.lnkocn:link { + color : %s; + text-decoration : none; +} +a.lnkocn:visited { + color : #32CD32; + text-decoration : none; +} +a.lnkocn:hover { + color : #777777; + font-size : 15px; +} +a:hover img { + background-color : #FFFFFF; +} +a:active { + color : #003399; + text-decoration : underline; +} +input { + color : #000000; + background-color : #FFFFFF; +} +div { + margin-left : 0; + margin-right : 0; +} +div.p { + margin-left : 5%%; + margin-right : 1%%; +} +div.substance { + width : 100%%; + background-color : #FFFFFF; +} +div.ocn { + width : 5%%; + float : right; + top : 0; + background-color : #FFFFFF; +} +div.endnote { + width : 95%%; + background-color : #FFFFFF; +} +div.toc { + position : absolute; + float : left; + margin : 0; + padding : 0; + padding-top : 0.5em; + border : 0; + width : 13em; + background-color : #EEEEEE; + margin-right : 1em; +} +div.summary { + margin : 0; + padding : 0; + border-left : 13em solid #EEEEEE; + padding-left : 1em; + background-color : #EEEEEE; +} +div.content, div.main_column { + margin : 0; + padding : 0; + border-left : 13em solid #FFFFFF; + padding-left : 1em; + padding-right : 1em; +} +div.content0, div.main_column0 { + margin : 0; + padding : 0; + border-left : 0%% solid #FFFFFF; + padding-left : 5%%; +} +div.scroll { + margin : 0; + padding : 0; + padding-left : 1em; + padding-right : 1em; +} +div.content:after { + content : ' '; + clear : both; + display : block; + height : 0; + overflow : hidden; +} +div.footer { + clear : left; + padding : 0.5em; + font-size : 80%%; + margin : 0; +} +div.toc ul { + list-style : none; + padding : 0; + margin : 0; +} +div.toc li ul a, li ul span.currentlink +{ + font-weight : normal; + font-size : 90%%; + padding-left : 2em; + background-color : #EEEEEE; +} +div.toc a, span.currentlink{ + display : block; + text-decoration : none; + padding-left : 0.5em; + color : #0000aa; +} +hr { + width : 90%%; + margin-left : 5%%; + margin-right : 2em; + margin-top : 1.8em; + margin-bottom : 1.8em; +} +span.currentlink { + text-decoration : none; + background-color : #AAAAAA; +} +div.toc a:visited { + color : #0000aa; +} +div.toc a:hover { + color : #000000; + background-color : #F9F9AA; +} +nav#toc ol { + list-style-type : none; +} +.norm, .bold, .verse, .group, .block, .alt { + line-height : 133%%; + margin-top : 12px; + margin-bottom : 0px; + padding-left : 0em; + text-indent : 0em; +} +p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { + display : block; + font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; + margin-left : 5%%; + margin-right : 2em; +} +p { + font-size : 100%%; + font-weight : normal; + line-height : 133%%; + text-align : justify; + text-indent : 0mm; + margin-top : 0.8em; + margin-bottom : 0.8em; +} +img { + max-width : 100%%; + height : auto; +} +pre { + width : auto; + display : block; + clear : both; + color : #555555; +} +pre.codeline { + display : table; + clear : both; + table-layout : fixed; + margin-left : 5%%; + margin-right : 5%%; + width : 90%%; + white-space : pre-wrap; + border-style : none; + border-radius : 5px 5px 5px 5px; + box-shadow : 0 2px 5px #AAAAAA inset; + margin-bottom : 1em; + padding : 0.5em 1em; + page-break-inside : avoid; + word-wrap : break-word; + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + white-space : pre; + white-space : pre-wrap; + white-space : -moz-pre-wrap; + white-space : -o-pre-wrap; + background-color : #EEEEEE; + color : #000000; + font-size : 95%%; + line-height : 100%%; +} +pre.codeline::before { + counter-reset : linenum; +} +pre.codeline span.tr { + display : table-row; + counter-increment : linenum; +} +pre.codeline span.th { + display : table-cell; + user-select : none; + -moz-user-select : none; + -webkit-user-select : none; + padding : 0.5em 0.5em; + /* background-color : #666666; */ +} +pre.codeline span.th::before { + content : counter(linenum) "."; + color : #999999; + text-align : right; + display : block; +} +pre.codeline span.th { + width : 4em; +} +pre.codeline code { + display : table-cell; +} +p.code { + border-style : none; +} +p.spaced { white-space : pre; } +p.block { + white-space : pre; +} +p.group { } +p.alt { } +p.verse { + white-space : pre; + margin-bottom : 6px; +} +p.caption { + text-align : left; + font-size : 80%%; + display : inline; +} +p.endnote { + font-size : 96%%; + line-height : 120%%; + text-align : left; + margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; +} +p.center { + text-align : center; +} +p.bold { + font-weight : bold; +} +p.bold_left { + font-weight : bold; + text-align : left; +} +p.centerbold { + text-align : center; + font-weight : bold; +} +p.em { + font-weight : bold; + font-style : normal; + background : #FFF3B6; +} +p.small { + font-size : 80%%; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; +} +.tiny, .tiny_left, .tiny_right, .tiny_center { + font-size : 10px; + margin-top : 0px; + margin-bottom : 0px; + color : #777777; + margin-right : 6px; + text-align : left; +} +p.tiny { } +p.tiny_left { + margin-left : 0px; + margin-right : 0px; + text-align : left; +} +p.tiny_right { + margin-right : 1em; + text-align : right; +} +p.tiny_center { + margin-left : 0px; + margin-right : 0px; + text-align : center; +} +p.concordance_word { + line-height : 150%%; + font-weight : bold; + display : inline; + margin-top : 4px; + margin-bottom : 1px; +} +p.concordance_count { + font-size : 80%%; + color : #777777; + display : inline; + margin-left : 0em; +} +p.concordance_object { + font-size : 80%%; + line-height : 120%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +p.book_index_lev1 { + line-height : 100%%; + margin-top : 4px; + margin-bottom : 1px; +} +p.book_index_lev2 { + line-height : 100%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +tt { + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + background-color : #EEEEEE; + color : #000000; +} %s - note { white-space : pre; } - label.ocn { - width : 2%%; - float : right; - top : 0; - font-size : 10px; - margin-top : 0px; - margin-bottom : 5px; - margin-right : 5px; - text-align : right; - color : %s; - -khtml-user-select : none; - -moz-user-select : none; - -ms-user-select : none; - -o-user-select : none; - -webkit-user-select : none; - user-select : none; - } - table { - display : block; - margin-left : 5%%; - margin-right : 2em; - background-color : inherit; - } - tr { } - th,td { - vertical-align : top; - text-align : left; - } - th { - font-weight : bold; - } - em { - font-weight : bold; - font-style : italic; - } - p.left,th.left,td.left { - text-align : left; - } - p.small_left,th.small_left,td.small_left { - text-align : left; - font-size : 80%%; - } - p.right,th.right,td.right { - text-align : right; - } - ul, li { - list-style-type : none; - list-style : none; - padding-left : 20px; - font-weight : normal; - line-height : 150%%; - text-align : left; - text-indent : 0mm; - margin-left : 1em; - margin-right : 2em; - margin-top : 3px; - margin-bottom : 3px; - } - li { - background : url(../image_sys/bullet_09.png) no-repeat 0px 6px; - } - ul { } - h0, h1, h2, h3, h4, h5, h6, h7 { - font-weight : bold; - line-height : 120%%; - text-align : left; - margin-top : 20px; - margin-bottom : 10px; - } - h4.norm, h5.norm, h6.norm, h7.norm { - margin-top : 10px; - margin-bottom : 0px; - } - h0 { font-size : 125%%; } - h1 { font-size : 120%%; } - h2 { font-size : 115%%; } - h3 { font-size : 110%%; } - h4 { font-size : 105%%; } - h5 { font-size : 100%%; } - h6 { font-size : 100%%; } - h7 { font-size : 100%%; } - h0, h1, h2, h3, h4, h5, h6, h7 { - text-shadow : .2em .2em .3em #808080; - } - h1.i { margin-left : 2em; } - h2.i { margin-left : 3em; } - h3.i { margin-left : 4em; } - h4.i { margin-left : 5em; } - h5.i { margin-left : 6em; } - h6.i { margin-left : 7em; } - h7.i { margin-left : 8em; } - h8.i { margin-left : 9em; } - h9.i { margin-left : 10em; } - .toc { - font-weight : normal; - margin-top : 6px; - margin-bottom : 6px; - } - h0.toc { - margin-left : 1em; - font-size : 120%%; - line-height : 150%%; - } - h1.toc { - margin-left : 1em; - font-size : 115%%; - line-height : 150%%; - } - h2.toc { - margin-left : 2em; - font-size : 110%%; - line-height : 140%%; - } - h3.toc { - margin-left : 3em; - font-size : 105%%; - line-height : 120%%; - } - h4.toc { - margin-left : 4em; - font-size : 100%%; - line-height : 120%%; - } - h5.toc { - margin-left : 5em; - font-size : 95%%; - line-height : 110%%; - } - h6.toc { - margin-left : 6em; - font-size : 90%%; - line-height : 110%%; - } - h7.toc { - margin-left : 7em; - font-size : 85%%; - line-height : 100%%; - } - .subtoc { - margin-right : 34%%; - font-weight : normal; - } - h5.subtoc { - margin-left : 2em; - font-size : 80%%; - margin-top : 2px; - margin-bottom : 2px; - } - h6.subtoc { - margin-left : 3em; - font-size : 75%%; - margin-top : 0px; - margin-bottom : 0px; - } - h7.subtoc { - margin-left : 4em; - font-size : 70%%; - margin-top : 0px; - margin-bottom : 0px; - } - /* flex */ - .flex-menu-bar { - display : -webkit-flex; - display : flex; - -webkit-flex-wrap : wrap; - -webkit-align-items : center; - align-items : center; - width : 100%%; - margin-left : 5%%; - margin-right : 2%%; - background-color : #FFFFFF; - } - .flex-menu-option { - background-color : #FFFFFF; - margin-right : 4px; - } - .flex-list { - display : -webkit-flex; - display : flex; - -webkit-align-items : center; - display : block; - align-items : center; - width : 100%%; - background-color : #FFFFFF; - } - .flex-list-item { - background-color : #FFFFFF; - margin : 4px; - } - /* grid */ - .wrapper { - display : grid; - grid-template-columns : 100%%; - grid-template-areas : - "headband" - "doc_header" - "doc_title" - "doc_toc" - "doc_prefix" - "doc_intro" - "doc_body" - "doc_endnotes" - "doc_glossary" - "doc_biblio" - "doc_bookindex" - "doc_blurb" - "doc_suffix"; - margin : 0px; - padding : 0px; - background-color : #FFFFFF; - } - .delimit { - border-style : none; - border-color : #FFFFFF; - padding : 10px; - } - .headband { - grid-area : headband; - background-color : #FFFFFF; - } - .doc_header { - grid-area : doc_header; - } - .doc_title { - grid-area : doc_title; - } - .doc_toc { - grid-area : doc_toc; - } - .doc_prefix { - grid-area : doc_prefix; - } - .doc_intro { - grid-area : doc_intro; - } - .doc_body { - grid-area : doc_body; - } - .doc_endnotes { - grid-area : doc_endnotes; - } - .doc_glossary { - grid-area : doc_glossary; - } - .doc_biblio { - grid-area : doc_biblio; - } - .doc_bookindex { - grid-area : doc_bookindex; - } - .doc_blurb { - grid-area : doc_blurb; - } - .doc_suffix { - grid-area : doc_suffix; - } - .nav-ul { - list-style : none; - float : left; - } - .nav-li { - float : left; - padding-right : 0.7em; - } - .nav-li a { - text-decoration : none; - color : #FFFFFF; - } - footer { - background-color : #00704E; - } +note { white-space : pre; } +label.ocn { + width : 2%%; + float : right; + top : 0; + font-size : 10px; + margin-top : 0px; + margin-bottom : 5px; + margin-right : 5px; + text-align : right; + color : %s; + -khtml-user-select : none; + -moz-user-select : none; + -ms-user-select : none; + -o-user-select : none; + -webkit-user-select : none; + user-select : none; +} +table { + display : block; + margin-left : 5%%; + margin-right : 2em; + background-color : inherit; +} +tr { } +th,td { + vertical-align : top; + text-align : left; +} +th { + font-weight : bold; +} +em { + font-weight : bold; + font-style : italic; +} +p.left,th.left,td.left { + text-align : left; +} +p.small_left,th.small_left,td.small_left { + text-align : left; + font-size : 80%%; +} +p.right,th.right,td.right { + text-align : right; +} +ul, li { + list-style-type : none; + list-style : none; + padding-left : 20px; + font-weight : normal; + line-height : 150%%; + text-align : left; + text-indent : 0mm; + margin-left : 1em; + margin-right : 2em; + margin-top : 3px; + margin-bottom : 3px; +} +li { + background : url(../image_sys/bullet_09.png) no-repeat 0px 6px; +} +ul { } +h0, h1, h2, h3, h4, h5, h6, h7 { + font-weight : bold; + line-height : 120%%; + text-align : left; + margin-top : 20px; + margin-bottom : 10px; +} +h4.norm, h5.norm, h6.norm, h7.norm { + margin-top : 10px; + margin-bottom : 0px; +} +h0 { font-size : 125%%; } +h1 { font-size : 120%%; } +h2 { font-size : 115%%; } +h3 { font-size : 110%%; } +h4 { font-size : 105%%; } +h5 { font-size : 100%%; } +h6 { font-size : 100%%; } +h7 { font-size : 100%%; } +h0, h1, h2, h3, h4, h5, h6, h7 { + text-shadow : .2em .2em .3em #808080; +} +h1.i { margin-left : 2em; } +h2.i { margin-left : 3em; } +h3.i { margin-left : 4em; } +h4.i { margin-left : 5em; } +h5.i { margin-left : 6em; } +h6.i { margin-left : 7em; } +h7.i { margin-left : 8em; } +h8.i { margin-left : 9em; } +h9.i { margin-left : 10em; } +.toc { + font-weight : normal; + margin-top : 6px; + margin-bottom : 6px; +} +h0.toc { + margin-left : 1em; + font-size : 120%%; + line-height : 150%%; +} +h1.toc { + margin-left : 1em; + font-size : 115%%; + line-height : 150%%; +} +h2.toc { + margin-left : 2em; + font-size : 110%%; + line-height : 140%%; +} +h3.toc { + margin-left : 3em; + font-size : 105%%; + line-height : 120%%; +} +h4.toc { + margin-left : 4em; + font-size : 100%%; + line-height : 120%%; +} +h5.toc { + margin-left : 5em; + font-size : 95%%; + line-height : 110%%; +} +h6.toc { + margin-left : 6em; + font-size : 90%%; + line-height : 110%%; +} +h7.toc { + margin-left : 7em; + font-size : 85%%; + line-height : 100%%; +} +.subtoc { + margin-right : 34%%; + font-weight : normal; +} +h5.subtoc { + margin-left : 2em; + font-size : 80%%; + margin-top : 2px; + margin-bottom : 2px; +} +h6.subtoc { + margin-left : 3em; + font-size : 75%%; + margin-top : 0px; + margin-bottom : 0px; +} +h7.subtoc { + margin-left : 4em; + font-size : 70%%; + margin-top : 0px; + margin-bottom : 0px; +} +/* flex */ +.flex-menu-bar { + display : -webkit-flex; + display : flex; + -webkit-flex-wrap : wrap; + -webkit-align-items : center; + align-items : center; + width : 100%%; + margin-left : 5%%; + margin-right : 2%%; + background-color : #FFFFFF; +} +.flex-menu-option { + background-color : #FFFFFF; + margin-right : 4px; +} +.flex-list { + display : -webkit-flex; + display : flex; + -webkit-align-items : center; + display : block; + align-items : center; + width : 100%%; + background-color : #FFFFFF; +} +.flex-list-item { + background-color : #FFFFFF; + margin : 4px; +} +/* grid */ +.wrapper { + display : grid; + grid-template-columns : 100%%; + grid-template-areas : + "headband" + "doc_header" + "doc_title" + "doc_toc" + "doc_prefix" + "doc_intro" + "doc_body" + "doc_endnotes" + "doc_glossary" + "doc_biblio" + "doc_bookindex" + "doc_blurb" + "doc_suffix"; + margin : 0px; + padding : 0px; + background-color : #FFFFFF; +} +.delimit { + border-style : none; + border-color : #FFFFFF; + padding : 10px; +} +.headband { + grid-area : headband; + background-color : #FFFFFF; +} +.doc_header { + grid-area : doc_header; +} +.doc_title { + grid-area : doc_title; +} +.doc_toc { + grid-area : doc_toc; +} +.doc_prefix { + grid-area : doc_prefix; +} +.doc_intro { + grid-area : doc_intro; +} +.doc_body { + grid-area : doc_body; +} +.doc_endnotes { + grid-area : doc_endnotes; +} +.doc_glossary { + grid-area : doc_glossary; +} +.doc_biblio { + grid-area : doc_biblio; +} +.doc_bookindex { + grid-area : doc_bookindex; +} +.doc_blurb { + grid-area : doc_blurb; +} +.doc_suffix { + grid-area : doc_suffix; +} +.nav-ul { + list-style : none; + float : left; +} +.nav-li { + float : left; + padding-right : 0.7em; +} +.nav-li a { + text-decoration : none; + color : #FFFFFF; +} +footer { + background-color : #00704E; +} ┃", _color_ocn_light, _css_indent, _color_ocn_light, ); string _css_dark_html_scroll = format(q"┃ - *{ - padding : 0px; - margin : 0px; - } - body { - height : 100vh; - background-color : #000000; - } - body { - color : #CCCCCC; - background : #000000; - background-color : #000000; - } - a:link { - color : #FFFFFF; - text-decoration : none; - } - a:visited { - color : #999999; - text-decoration : none; - } - a:hover { - color : #000000; - background-color : #555555; - } - a.lnkocn:link { - color : %s; - text-decoration : none; - } - a.lnkocn:visited { - color : #9ACD32; - text-decoration : none; - } - a.lnkocn:hover { - color : #BBBBBB; - font-size : 15px; - } - a:hover img { - background-color : #000000; - } - a:active { - color : #888888; - text-decoration : underline; - } - input { - color : #FFFFFF; - background-color : #777777; - } - div { - margin-left : 0; - margin-right : 0; - } - div.p { - margin-left : 5%%; - margin-right : 1%%; - } - div.substance { - width : 100%%; - background-color : #000000; - } - div.ocn { - width : 5%%; - float : right; - top : 0; - background-color : #000000; - } - div.endnote { - width : 95%%; - background-color : #000000; - } - div.toc { - position : absolute; - float : left; - margin : 0; - padding : 0; - padding-top : 0.5em; - border : 0; - width : 13em; - background-color : #111111; - margin-right : 1em; - } - div.summary { - margin : 0; - padding : 0; - border-left : 13em solid #111111; - padding-left : 1em; - background-color : #111111; - } - div.content, div.main_column { - margin : 0; - padding : 0; - border-left : 13em solid #000000; - padding-left : 1em; - padding-right : 1em; - } - div.content0, div.main_column0 { - margin : 0; - padding : 0; - border-left : 0%% solid #000000; - padding-left : 5%%; - } - div.scroll { - margin : 0; - padding : 0; - padding-left : 1em; - padding-right : 1em; - } - div.content:after { - content : ' '; - clear : both; - display : block; - height : 0; - overflow : hidden; - } - div.footer { - clear : left; - padding : 0.5em; - font-size : 80%%; - margin : 0; - } - div.toc ul { - list-style : none; - padding : 0; - margin : 0; - } - div.toc li ul a, li ul span.currentlink - { - font-weight : normal; - font-size : 90%%; - padding-left : 2em; - background-color : #111111; - } - div.toc a, span.currentlink{ - display : block; - text-decoration : none; - padding-left : 0.5em; - color : #FF00AA; - } - hr { - width : 90%%; - margin-left : 5%%; - margin-right : 2em; - margin-top : 1.8em; - margin-bottom : 1.8em; - } - span.currentlink { - text-decoration : none; - background-color : #AAAAF9; - } - div.toc a:visited { - color : #FF00AA; - } - div.toc a:hover { - color : #CCCCCC; - background-color : #F9F9AA; - } - nav#toc ol { - list-style-type : none; - } - .norm, .bold, .verse, .group, .block, .alt { - line-height : 133%%; - margin-top : 12px; - margin-bottom : 0px; - padding-left : 0em; - text-indent : 0em; - } - p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { - display : block; - font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; - margin-left : 5%%; - margin-right : 2em; - } - p { - font-size : 100%%; - font-weight : normal; - line-height : 133%%; - text-align : justify; - text-indent : 0mm; - margin-top : 0.8em; - margin-bottom : 0.8em; - } - img { - max-width : 100%%; - height : auto; - } - pre { - width : auto; - display : block; - clear : both; - color : #555555; - } - pre.codeline { - display : table; - clear : both; - table-layout : fixed; - margin-left : 5%%; - margin-right : 5%%; - width : 90%%; - white-space : pre-wrap; - border-style : none; - border-radius : 5px 5px 5px 5px; - box-shadow : 0 2px 5px #AAAAAA inset; - margin-bottom : 1em; - padding : 0.5em 1em; - page-break-inside : avoid; - word-wrap : break-word; - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - white-space : pre; - white-space : pre-wrap; - white-space : -moz-pre-wrap; - white-space : -o-pre-wrap; - background-color : #555555; - color : #DDDDDD; - font-size : 95%%; - line-height : 100%%; - } - pre.codeline::before { - counter-reset : linenum; - } - pre.codeline span.tr { - display : table-row; - counter-increment : linenum; - } - pre.codeline span.th { - display : table-cell; - user-select : none; - -moz-user-select : none; - -webkit-user-select : none; - padding : 0.5em 0.5em; - } - pre.codeline span.th::before { - content : counter(linenum) "."; - color : #999999; - text-align : right; - display : block; - } - pre.codeline span.th { - width : 4em; - } - pre.codeline code { - display : table-cell; - } - p.code { - border-style : none; - } - p.spaced { white-space : pre; } - p.block { - white-space : pre; - } - p.group { } - p.alt { } - p.verse { - white-space : pre; - margin-bottom : 6px; - } - p.caption { - text-align : left; - font-size : 80%%; - display : inline; - } - p.endnote { - font-size : 96%%; - line-height : 120%%; - text-align : left; - margin-right : 15mm; - padding-left : 1em; - text-indent : -1em; - } - p.center { - text-align : center; - } - p.bold { - font-weight : bold; - } - p.bold_left { - font-weight : bold; - text-align : left; - } - p.centerbold { - text-align : center; - font-weight : bold; - } - p.em { - font-weight : bold; - font-style : normal; - background : #FFF3B6; - } - p.small { - font-size : 80%%; - margin-top : 0px; - margin-bottom : 0px; - margin-right : 6px; - text-align : left; - } - .tiny, .tiny_left, .tiny_right, .tiny_center { - font-size : 10px; - margin-top : 0px; - margin-bottom : 0px; - color : #EEEEEE; - margin-right : 6px; - text-align : left; - } - p.tiny { } - p.tiny_left { - margin-left : 0px; - margin-right : 0px; - text-align : left; - } - p.tiny_right { - margin-right : 1em; - text-align : right; - } - p.tiny_center { - margin-left : 0px; - margin-right : 0px; - text-align : center; - } - p.concordance_word { - line-height : 150%%; - font-weight : bold; - display : inline; - margin-top : 4px; - margin-bottom : 1px; - } - p.concordance_count { - font-size : 80%%; - color : #555555; - display : inline; - margin-left : 0em; - } - p.concordance_object { - font-size : 80%%; - line-height : 120%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - p.book_index_lev1 { - line-height : 100%%; - margin-top : 4px; - margin-bottom : 1px; - } - p.book_index_lev2 { - line-height : 100%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - tt { - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - background-color : #555555; - color : #DDDDDD; - } +*{ + padding : 0px; + margin : 0px; +} +body { + height : 100vh; + background-color : #000000; +} +body { + color : #CCCCCC; + background : #000000; + background-color : #000000; +} +a:link { + color : #FFFFFF; + text-decoration : none; +} +a:visited { + color : #999999; + text-decoration : none; +} +a:hover { + color : #000000; + background-color : #555555; +} +a.lnkocn:link { + color : %s; + text-decoration : none; +} +a.lnkocn:visited { + color : #9ACD32; + text-decoration : none; +} +a.lnkocn:hover { + color : #BBBBBB; + font-size : 15px; +} +a:hover img { + background-color : #000000; +} +a:active { + color : #888888; + text-decoration : underline; +} +input { + color : #FFFFFF; + background-color : #777777; +} +div { + margin-left : 0; + margin-right : 0; +} +div.p { + margin-left : 5%%; + margin-right : 1%%; +} +div.substance { + width : 100%%; + background-color : #000000; +} +div.ocn { + width : 5%%; + float : right; + top : 0; + background-color : #000000; +} +div.endnote { + width : 95%%; + background-color : #000000; +} +div.toc { + position : absolute; + float : left; + margin : 0; + padding : 0; + padding-top : 0.5em; + border : 0; + width : 13em; + background-color : #111111; + margin-right : 1em; +} +div.summary { + margin : 0; + padding : 0; + border-left : 13em solid #111111; + padding-left : 1em; + background-color : #111111; +} +div.content, div.main_column { + margin : 0; + padding : 0; + border-left : 13em solid #000000; + padding-left : 1em; + padding-right : 1em; +} +div.content0, div.main_column0 { + margin : 0; + padding : 0; + border-left : 0%% solid #000000; + padding-left : 5%%; +} +div.scroll { + margin : 0; + padding : 0; + padding-left : 1em; + padding-right : 1em; +} +div.content:after { + content : ' '; + clear : both; + display : block; + height : 0; + overflow : hidden; +} +div.footer { + clear : left; + padding : 0.5em; + font-size : 80%%; + margin : 0; +} +div.toc ul { + list-style : none; + padding : 0; + margin : 0; +} +div.toc li ul a, li ul span.currentlink +{ + font-weight : normal; + font-size : 90%%; + padding-left : 2em; + background-color : #111111; +} +div.toc a, span.currentlink{ + display : block; + text-decoration : none; + padding-left : 0.5em; + color : #FF00AA; +} +hr { + width : 90%%; + margin-left : 5%%; + margin-right : 2em; + margin-top : 1.8em; + margin-bottom : 1.8em; +} +span.currentlink { + text-decoration : none; + background-color : #AAAAF9; +} +div.toc a:visited { + color : #FF00AA; +} +div.toc a:hover { + color : #CCCCCC; + background-color : #F9F9AA; +} +nav#toc ol { + list-style-type : none; +} +.norm, .bold, .verse, .group, .block, .alt { + line-height : 133%%; + margin-top : 12px; + margin-bottom : 0px; + padding-left : 0em; + text-indent : 0em; +} +p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { + display : block; + font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; + margin-left : 5%%; + margin-right : 2em; +} +p { + font-size : 100%%; + font-weight : normal; + line-height : 133%%; + text-align : justify; + text-indent : 0mm; + margin-top : 0.8em; + margin-bottom : 0.8em; +} +img { + max-width : 100%%; + height : auto; +} +pre { + width : auto; + display : block; + clear : both; + color : #555555; +} +pre.codeline { + display : table; + clear : both; + table-layout : fixed; + margin-left : 5%%; + margin-right : 5%%; + width : 90%%; + white-space : pre-wrap; + border-style : none; + border-radius : 5px 5px 5px 5px; + box-shadow : 0 2px 5px #AAAAAA inset; + margin-bottom : 1em; + padding : 0.5em 1em; + page-break-inside : avoid; + word-wrap : break-word; + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + white-space : pre; + white-space : pre-wrap; + white-space : -moz-pre-wrap; + white-space : -o-pre-wrap; + background-color : #555555; + color : #DDDDDD; + font-size : 95%%; + line-height : 100%%; +} +pre.codeline::before { + counter-reset : linenum; +} +pre.codeline span.tr { + display : table-row; + counter-increment : linenum; +} +pre.codeline span.th { + display : table-cell; + user-select : none; + -moz-user-select : none; + -webkit-user-select : none; + padding : 0.5em 0.5em; +} +pre.codeline span.th::before { + content : counter(linenum) "."; + color : #999999; + text-align : right; + display : block; +} +pre.codeline span.th { + width : 4em; +} +pre.codeline code { + display : table-cell; +} +p.code { + border-style : none; +} +p.spaced { white-space : pre; } +p.block { + white-space : pre; +} +p.group { } +p.alt { } +p.verse { + white-space : pre; + margin-bottom : 6px; +} +p.caption { + text-align : left; + font-size : 80%%; + display : inline; +} +p.endnote { + font-size : 96%%; + line-height : 120%%; + text-align : left; + margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; +} +p.center { + text-align : center; +} +p.bold { + font-weight : bold; +} +p.bold_left { + font-weight : bold; + text-align : left; +} +p.centerbold { + text-align : center; + font-weight : bold; +} +p.em { + font-weight : bold; + font-style : normal; + background : #FFF3B6; +} +p.small { + font-size : 80%%; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; +} +.tiny, .tiny_left, .tiny_right, .tiny_center { + font-size : 10px; + margin-top : 0px; + margin-bottom : 0px; + color : #EEEEEE; + margin-right : 6px; + text-align : left; +} +p.tiny { } +p.tiny_left { + margin-left : 0px; + margin-right : 0px; + text-align : left; +} +p.tiny_right { + margin-right : 1em; + text-align : right; +} +p.tiny_center { + margin-left : 0px; + margin-right : 0px; + text-align : center; +} +p.concordance_word { + line-height : 150%%; + font-weight : bold; + display : inline; + margin-top : 4px; + margin-bottom : 1px; +} +p.concordance_count { + font-size : 80%%; + color : #555555; + display : inline; + margin-left : 0em; +} +p.concordance_object { + font-size : 80%%; + line-height : 120%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +p.book_index_lev1 { + line-height : 100%%; + margin-top : 4px; + margin-bottom : 1px; +} +p.book_index_lev2 { + line-height : 100%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +tt { + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + background-color : #555555; + color : #DDDDDD; +} %s - note { white-space : pre; } - label.ocn { - width : 2%%; - float : right; - top : 0; - font-size : 10px; - margin-top : 0px; - margin-bottom : 5px; - margin-right : 5px; - text-align : right; - color : %s; - -khtml-user-select : none; - -moz-user-select : none; - -ms-user-select : none; - -o-user-select : none; - -webkit-user-select : none; - user-select : none; - } - table { - display : block; - margin-left : 5%%; - margin-right : 2em; - background-color : inherit; - } - tr { } - th,td { - vertical-align : top; - text-align : left; - } - th { - font-weight : bold; - } - em { - font-weight : bold; - font-style : italic; - } - p.left,th.left,td.left { - text-align : left; - } - p.small_left,th.small_left,td.small_left { - text-align : left; - font-size : 80%%; - } - p.right,th.right,td.right { - text-align : right; - } - ul, li { - list-style-type : none; - list-style : none; - padding-left : 20px; - font-weight : normal; - line-height : 150%%; - text-align : left; - text-indent : 0mm; - margin-left : 1em; - margin-right : 2em; - margin-top : 3px; - margin-bottom : 3px; - } - li { - background : (../image_sys/bullet_09.png) no-repeat 0px 6px; - } - ul { } - h0, h1, h2, h3, h4, h5, h6, h7 { - font-weight : bold; - line-height : 120%%; - text-align : left; - margin-top : 20px; - margin-bottom : 10px; - } - h4.norm, h5.norm, h6.norm, h7.norm { - margin-top : 10px; - margin-bottom : 0px; - } - h0 { font-size : 125%%; } - h1 { font-size : 120%%; } - h2 { font-size : 115%%; } - h3 { font-size : 110%%; } - h4 { font-size : 105%%; } - h5 { font-size : 100%%; } - h6 { font-size : 100%%; } - h7 { font-size : 100%%; } - h0, h1, h2, h3, h4, h5, h6, h7 { - text-shadow : .2em .2em .3em #999999; - } - h1.i { margin-left : 2em; } - h2.i { margin-left : 3em; } - h3.i { margin-left : 4em; } - h4.i { margin-left : 5em; } - h5.i { margin-left : 6em; } - h6.i { margin-left : 7em; } - h7.i { margin-left : 8em; } - h8.i { margin-left : 9em; } - h9.i { margin-left : 10em; } - .toc { - font-weight : normal; - margin-top : 6px; - margin-bottom : 6px; - } - h0.toc { - margin-left : 1em; - font-size : 120%%; - line-height : 150%%; - } - h1.toc { - margin-left : 1em; - font-size : 115%%; - line-height : 150%%; - } - h2.toc { - margin-left : 2em; - font-size : 110%%; - line-height : 140%%; - } - h3.toc { - margin-left : 3em; - font-size : 105%%; - line-height : 120%%; - } - h4.toc { - margin-left : 4em; - font-size : 100%%; - line-height : 120%%; - } - h5.toc { - margin-left : 5em; - font-size : 95%%; - line-height : 110%%; - } - h6.toc { - margin-left : 6em; - font-size : 90%%; - line-height : 110%%; - } - h7.toc { - margin-left : 7em; - font-size : 85%%; - line-height : 100%%; - } - .subtoc { - margin-right : 34%%; - font-weight : normal; - } - h5.subtoc { - margin-left : 2em; - font-size : 80%%; - margin-top : 2px; - margin-bottom : 2px; - } - h6.subtoc { - margin-left : 3em; - font-size : 75%%; - margin-top : 0px; - margin-bottom : 0px; - } - h7.subtoc { - margin-left : 4em; - font-size : 70%%; - margin-top : 0px; - margin-bottom : 0px; - } - /* flex */ - .flex-menu-bar { - display : -webkit-flex; - display : flex; - -webkit-flex-wrap : wrap; - -webkit-align-items : center; - align-items : center; - width : 100%%; - margin-left : 5%%; - margin-right : 2%%; - background-color : #000000; - } - .flex-menu-option { - background-color : #000000; - margin-right : 4px; - } - .flex-list { - display : -webkit-flex; - display : flex; - -webkit-align-items : center; - display : block; - align-items : center; - width : 100%%; - background-color : #000000; - } - .flex-list-item { - background-color : #000000; - margin : 4px; - } - /* grid */ - .wrapper { - display : grid; - grid-template-columns : 100%%; - grid-template-areas : - "headband" - "doc_header" - "doc_title" - "doc_toc" - "doc_prefix" - "doc_intro" - "doc_body" - "doc_endnotes" - "doc_glossary" - "doc_biblio" - "doc_bookindex" - "doc_blurb" - "doc_suffix"; - margin : 0px; - padding : 0px; - background-color : #000000; - } - .delimit { - border-style : none; - border-color : #000000; - padding : 10px; - } - .headband { - grid-area : headband; - background-color : #000000; - } - .doc_header { - grid-area : doc_header; - } - .doc_title { - grid-area : doc_title; - } - .doc_toc { - grid-area : doc_toc; - } - .doc_prefix { - grid-area : doc_prefix; - } - .doc_intro { - grid-area : doc_intro; - } - .doc_body { - grid-area : doc_body; - } - .doc_endnotes { - grid-area : doc_endnotes; - } - .doc_glossary { - grid-area : doc_glossary; - } - .doc_biblio { - grid-area : doc_biblio; - } - .doc_bookindex { - grid-area : doc_bookindex; - } - .doc_blurb { - grid-area : doc_blurb; - } - .doc_suffix { - grid-area : doc_suffix; - } - .nav-ul { - list-style : none; - float : left; - } - .nav-li { - float : left; - padding-right : 0.7em; - } - .nav-li a { - text-decoration : none; - color : #000000; - } - footer { - background-color : #FF704E; - } +note { white-space : pre; } +label.ocn { + width : 2%%; + float : right; + top : 0; + font-size : 10px; + margin-top : 0px; + margin-bottom : 5px; + margin-right : 5px; + text-align : right; + color : %s; + -khtml-user-select : none; + -moz-user-select : none; + -ms-user-select : none; + -o-user-select : none; + -webkit-user-select : none; + user-select : none; +} +table { + display : block; + margin-left : 5%%; + margin-right : 2em; + background-color : inherit; +} +tr { } +th,td { + vertical-align : top; + text-align : left; +} +th { + font-weight : bold; +} +em { + font-weight : bold; + font-style : italic; +} +p.left,th.left,td.left { + text-align : left; +} +p.small_left,th.small_left,td.small_left { + text-align : left; + font-size : 80%%; +} +p.right,th.right,td.right { + text-align : right; +} +ul, li { + list-style-type : none; + list-style : none; + padding-left : 20px; + font-weight : normal; + line-height : 150%%; + text-align : left; + text-indent : 0mm; + margin-left : 1em; + margin-right : 2em; + margin-top : 3px; + margin-bottom : 3px; +} +li { + background : (../image_sys/bullet_09.png) no-repeat 0px 6px; +} +ul { } +h0, h1, h2, h3, h4, h5, h6, h7 { + font-weight : bold; + line-height : 120%%; + text-align : left; + margin-top : 20px; + margin-bottom : 10px; +} +h4.norm, h5.norm, h6.norm, h7.norm { + margin-top : 10px; + margin-bottom : 0px; +} +h0 { font-size : 125%%; } +h1 { font-size : 120%%; } +h2 { font-size : 115%%; } +h3 { font-size : 110%%; } +h4 { font-size : 105%%; } +h5 { font-size : 100%%; } +h6 { font-size : 100%%; } +h7 { font-size : 100%%; } +h0, h1, h2, h3, h4, h5, h6, h7 { + text-shadow : .2em .2em .3em #999999; +} +h1.i { margin-left : 2em; } +h2.i { margin-left : 3em; } +h3.i { margin-left : 4em; } +h4.i { margin-left : 5em; } +h5.i { margin-left : 6em; } +h6.i { margin-left : 7em; } +h7.i { margin-left : 8em; } +h8.i { margin-left : 9em; } +h9.i { margin-left : 10em; } +.toc { + font-weight : normal; + margin-top : 6px; + margin-bottom : 6px; +} +h0.toc { + margin-left : 1em; + font-size : 120%%; + line-height : 150%%; +} +h1.toc { + margin-left : 1em; + font-size : 115%%; + line-height : 150%%; +} +h2.toc { + margin-left : 2em; + font-size : 110%%; + line-height : 140%%; +} +h3.toc { + margin-left : 3em; + font-size : 105%%; + line-height : 120%%; +} +h4.toc { + margin-left : 4em; + font-size : 100%%; + line-height : 120%%; +} +h5.toc { + margin-left : 5em; + font-size : 95%%; + line-height : 110%%; +} +h6.toc { + margin-left : 6em; + font-size : 90%%; + line-height : 110%%; +} +h7.toc { + margin-left : 7em; + font-size : 85%%; + line-height : 100%%; +} +.subtoc { + margin-right : 34%%; + font-weight : normal; +} +h5.subtoc { + margin-left : 2em; + font-size : 80%%; + margin-top : 2px; + margin-bottom : 2px; +} +h6.subtoc { + margin-left : 3em; + font-size : 75%%; + margin-top : 0px; + margin-bottom : 0px; +} +h7.subtoc { + margin-left : 4em; + font-size : 70%%; + margin-top : 0px; + margin-bottom : 0px; +} +/* flex */ +.flex-menu-bar { + display : -webkit-flex; + display : flex; + -webkit-flex-wrap : wrap; + -webkit-align-items : center; + align-items : center; + width : 100%%; + margin-left : 5%%; + margin-right : 2%%; + background-color : #000000; +} +.flex-menu-option { + background-color : #000000; + margin-right : 4px; +} +.flex-list { + display : -webkit-flex; + display : flex; + -webkit-align-items : center; + display : block; + align-items : center; + width : 100%%; + background-color : #000000; +} +.flex-list-item { + background-color : #000000; + margin : 4px; +} +/* grid */ +.wrapper { + display : grid; + grid-template-columns : 100%%; + grid-template-areas : + "headband" + "doc_header" + "doc_title" + "doc_toc" + "doc_prefix" + "doc_intro" + "doc_body" + "doc_endnotes" + "doc_glossary" + "doc_biblio" + "doc_bookindex" + "doc_blurb" + "doc_suffix"; + margin : 0px; + padding : 0px; + background-color : #000000; +} +.delimit { + border-style : none; + border-color : #000000; + padding : 10px; +} +.headband { + grid-area : headband; + background-color : #000000; +} +.doc_header { + grid-area : doc_header; +} +.doc_title { + grid-area : doc_title; +} +.doc_toc { + grid-area : doc_toc; +} +.doc_prefix { + grid-area : doc_prefix; +} +.doc_intro { + grid-area : doc_intro; +} +.doc_body { + grid-area : doc_body; +} +.doc_endnotes { + grid-area : doc_endnotes; +} +.doc_glossary { + grid-area : doc_glossary; +} +.doc_biblio { + grid-area : doc_biblio; +} +.doc_bookindex { + grid-area : doc_bookindex; +} +.doc_blurb { + grid-area : doc_blurb; +} +.doc_suffix { + grid-area : doc_suffix; +} +.nav-ul { + list-style : none; + float : left; +} +.nav-li { + float : left; + padding-right : 0.7em; +} +.nav-li a { + text-decoration : none; + color : #000000; +} +footer { + background-color : #FF704E; +} ┃", _color_ocn_dark, _css_indent, _color_ocn_dark, ); string _css_light_epub = format(q"┃ - *{ - padding : 0px; - margin : 0px; - } - body { - height : 100vh; - background-color : #FFFFFF; - } - body { - color : #000000; - background : #FFFFFF; - background-color : #FFFFFF; - } - a:link { - color : #003399; - text-decoration : none; - } - a:visited { - color : #003399; - text-decoration : none; - } - a:hover { - color : #000000; - background-color : #F9F9AA; - } - a.lnkocn:link { - color : %s; - text-decoration : none; - } - a.lnkocn:visited { - color : #32CD32; - text-decoration : none; - } - a.lnkocn:hover { - color : #777777; - font-size : 15px; - } - a:hover img { - background-color : #FFFFFF; - } - a:active { - color : #003399; - text-decoration : underline; - } - input { - color : #000000; - background-color : #FFFFFF; - } - div { - margin-left : 0; - margin-right : 0; - } - div.p { - margin-left : 5%%; - margin-right : 1%%; - } - div.substance { - width : 100%%; - background-color : #FFFFFF; - } - div.ocn { - width : 5%%; - float : right; - top : 0; - background-color : #FFFFFF; - } - div.endnote { - width : 95%%; - background-color : #FFFFFF; - } - div.toc { - position : absolute; - float : left; - margin : 0; - padding : 0; - padding-top : 0.5em; - border : 0; - width : 13em; - background-color : #EEEEEE; - margin-right : 1em; - } - div.summary { - margin : 0; - padding : 0; - border-left : 13em solid #EEEEEE; - padding-left : 1em; - background-color : #EEEEEE; - } - div.content, div.main_column { - margin : 0; - padding : 0; - border-left : 13em solid #FFFFFF; - padding-left : 1em; - padding-right : 1em; - } - div.content0, div.main_column0 { - margin : 0; - padding : 0; - border-left : 0%% solid #FFFFFF; - padding-left : 5%%; - } - div.scroll { - margin : 0; - padding : 0; - padding-left : 1em; - padding-right : 1em; - } - div.content:after { - content : ' '; - clear : both; - display : block; - height : 0; - overflow : hidden; - } - div.footer { - clear : left; - padding : 0.5em; - font-size : 80%%; - margin : 0; - } - div.toc ul { - list-style : none; - padding : 0; - margin : 0; - } - div.toc li ul a, li ul span.currentlink - { - font-weight : normal; - font-size : 90%%; - padding-left : 2em; - background-color : #EEEEEE; - } - div.toc a, span.currentlink{ - display : block; - text-decoration : none; - padding-left : 0.5em; - color : #0000aa; - } - hr { - width : 90%%; - margin-left : 5%%; - margin-right : 2em; - margin-top : 1.8em; - margin-bottom : 1.8em; - } - span.currentlink { - text-decoration : none; - background-color : #AAAAAA; - } - div.toc a:visited { - color : #0000aa; - } - div.toc a:hover { - color : #000000; - background-color : #F9F9AA; - } - nav#toc ol { - list-style-type : none; - } - .norm, .bold, .verse, .group, .block, .alt { - line-height : 133%%; - margin-top : 12px; - margin-bottom : 0px; - padding-left : 0em; - text-indent : 0em; - } - p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { - display : block; - font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; - margin-left : 5%%; - margin-right : 2em; - } - p { - font-size : 100%%; - font-weight : normal; - line-height : 133%%; - text-align : justify; - text-indent : 0mm; - margin-top : 0.8em; - margin-bottom : 0.8em; - } - img { - max-width : 100%%; - height : auto; - } - pre { - width : auto; - display : block; - clear : both; - color : #555555; - } - pre.codeline { - display : table; - clear : both; - table-layout : fixed; - margin-left : 5%%; - margin-right : 5%%; - width : 90%%; - white-space : pre-wrap; - border-style : none; - border-radius : 5px 5px 5px 5px; - box-shadow : 0 2px 5px #AAAAAA inset; - margin-bottom : 1em; - padding : 0.5em 1em; - page-break-inside : avoid; - word-wrap : break-word; - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - white-space : pre; - white-space : pre-wrap; - white-space : -moz-pre-wrap; - white-space : -o-pre-wrap; - background-color : #EEEEEE; - color : #000000; - font-size : 95%%; - line-height : 100%%; - } - pre.codeline::before { - counter-reset : linenum; - } - pre.codeline span.tr { - display : table-row; - counter-increment : linenum; - } - pre.codeline span.th { - display : table-cell; - user-select : none; - -moz-user-select : none; - -webkit-user-select : none; - padding : 0.5em 0.5em; - /* background-color : #666666; */ - } - pre.codeline span.th::before { - content : counter(linenum) "."; - color : #999999; - text-align : right; - display : block; - } - pre.codeline span.th { - width : 4em; - } - pre.codeline code { - display : table-cell; - } - p.code { - border-style : none; - } - p.spaced { white-space : pre; } - p.block { - white-space : pre; - } - p.group { } - p.alt { } - p.verse { - white-space : pre; - margin-bottom : 6px; - } - p.caption { - text-align : left; - font-size : 80%%; - display : inline; - } - p.endnote { - font-size : 96%%; - line-height : 120%%; - text-align : left; - margin-right : 15mm; - padding-left : 1em; - text-indent : -1em; - } - p.center { - text-align : center; - } - p.bold { - font-weight : bold; - } - p.bold_left { - font-weight : bold; - text-align : left; - } - p.centerbold { - text-align : center; - font-weight : bold; - } - p.em { - font-weight : bold; - font-style : normal; - background : #FFF3B6; - } - p.small { - font-size : 80%%; - margin-top : 0px; - margin-bottom : 0px; - margin-right : 6px; - text-align : left; - } - .tiny, .tiny_left, .tiny_right, .tiny_center { - font-size : 10px; - margin-top : 0px; - margin-bottom : 0px; - color : #777777; - margin-right : 6px; - text-align : left; - } - p.tiny { } - p.tiny_left { - margin-left : 0px; - margin-right : 0px; - text-align : left; - } - p.tiny_right { - margin-right : 1em; - text-align : right; - } - p.tiny_center { - margin-left : 0px; - margin-right : 0px; - text-align : center; - } - p.concordance_word { - line-height : 150%%; - font-weight : bold; - display : inline; - margin-top : 4px; - margin-bottom : 1px; - } - p.concordance_count { - font-size : 80%%; - color : #777777; - display : inline; - margin-left : 0em; - } - p.concordance_object { - font-size : 80%%; - line-height : 120%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - p.book_index_lev1 { - line-height : 100%%; - margin-top : 4px; - margin-bottom : 1px; - } - p.book_index_lev2 { - line-height : 100%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - tt { - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - background-color : #EEEEEE; - color : #000000; - } +*{ + padding : 0px; + margin : 0px; +} +body { + height : 100vh; + background-color : #FFFFFF; +} +body { + color : #000000; + background : #FFFFFF; + background-color : #FFFFFF; +} +a:link { + color : #003399; + text-decoration : none; +} +a:visited { + color : #003399; + text-decoration : none; +} +a:hover { + color : #000000; + background-color : #F9F9AA; +} +a.lnkocn:link { + color : %s; + text-decoration : none; +} +a.lnkocn:visited { + color : #32CD32; + text-decoration : none; +} +a.lnkocn:hover { + color : #777777; + font-size : 15px; +} +a:hover img { + background-color : #FFFFFF; +} +a:active { + color : #003399; + text-decoration : underline; +} +input { + color : #000000; + background-color : #FFFFFF; +} +div { + margin-left : 0; + margin-right : 0; +} +div.p { + margin-left : 5%%; + margin-right : 1%%; +} +div.substance { + width : 100%%; + background-color : #FFFFFF; +} +div.ocn { + width : 5%%; + float : right; + top : 0; + background-color : #FFFFFF; +} +div.endnote { + width : 95%%; + background-color : #FFFFFF; +} +div.toc { + position : absolute; + float : left; + margin : 0; + padding : 0; + padding-top : 0.5em; + border : 0; + width : 13em; + background-color : #EEEEEE; + margin-right : 1em; +} +div.summary { + margin : 0; + padding : 0; + border-left : 13em solid #EEEEEE; + padding-left : 1em; + background-color : #EEEEEE; +} +div.content, div.main_column { + margin : 0; + padding : 0; + border-left : 13em solid #FFFFFF; + padding-left : 1em; + padding-right : 1em; +} +div.content0, div.main_column0 { + margin : 0; + padding : 0; + border-left : 0%% solid #FFFFFF; + padding-left : 5%%; +} +div.scroll { + margin : 0; + padding : 0; + padding-left : 1em; + padding-right : 1em; +} +div.content:after { + content : ' '; + clear : both; + display : block; + height : 0; + overflow : hidden; +} +div.footer { + clear : left; + padding : 0.5em; + font-size : 80%%; + margin : 0; +} +div.toc ul { + list-style : none; + padding : 0; + margin : 0; +} +div.toc li ul a, li ul span.currentlink +{ + font-weight : normal; + font-size : 90%%; + padding-left : 2em; + background-color : #EEEEEE; +} +div.toc a, span.currentlink{ + display : block; + text-decoration : none; + padding-left : 0.5em; + color : #0000aa; +} +hr { + width : 90%%; + margin-left : 5%%; + margin-right : 2em; + margin-top : 1.8em; + margin-bottom : 1.8em; +} +span.currentlink { + text-decoration : none; + background-color : #AAAAAA; +} +div.toc a:visited { + color : #0000aa; +} +div.toc a:hover { + color : #000000; + background-color : #F9F9AA; +} +nav#toc ol { + list-style-type : none; +} +.norm, .bold, .verse, .group, .block, .alt { + line-height : 133%%; + margin-top : 12px; + margin-bottom : 0px; + padding-left : 0em; + text-indent : 0em; +} +p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { + display : block; + font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; + margin-left : 5%%; + margin-right : 2em; +} +p { + font-size : 100%%; + font-weight : normal; + line-height : 133%%; + text-align : justify; + text-indent : 0mm; + margin-top : 0.8em; + margin-bottom : 0.8em; +} +img { + max-width : 100%%; + height : auto; +} +pre { + width : auto; + display : block; + clear : both; + color : #555555; +} +pre.codeline { + display : table; + clear : both; + table-layout : fixed; + margin-left : 5%%; + margin-right : 5%%; + width : 90%%; + white-space : pre-wrap; + border-style : none; + border-radius : 5px 5px 5px 5px; + box-shadow : 0 2px 5px #AAAAAA inset; + margin-bottom : 1em; + padding : 0.5em 1em; + page-break-inside : avoid; + word-wrap : break-word; + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + white-space : pre; + white-space : pre-wrap; + white-space : -moz-pre-wrap; + white-space : -o-pre-wrap; + background-color : #EEEEEE; + color : #000000; + font-size : 95%%; + line-height : 100%%; +} +pre.codeline::before { + counter-reset : linenum; +} +pre.codeline span.tr { + display : table-row; + counter-increment : linenum; +} +pre.codeline span.th { + display : table-cell; + user-select : none; + -moz-user-select : none; + -webkit-user-select : none; + padding : 0.5em 0.5em; + /* background-color : #666666; */ +} +pre.codeline span.th::before { + content : counter(linenum) "."; + color : #999999; + text-align : right; + display : block; +} +pre.codeline span.th { + width : 4em; +} +pre.codeline code { + display : table-cell; +} +p.code { + border-style : none; +} +p.spaced { white-space : pre; } +p.block { + white-space : pre; +} +p.group { } +p.alt { } +p.verse { + white-space : pre; + margin-bottom : 6px; +} +p.caption { + text-align : left; + font-size : 80%%; + display : inline; +} +p.endnote { + font-size : 96%%; + line-height : 120%%; + text-align : left; + margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; +} +p.center { + text-align : center; +} +p.bold { + font-weight : bold; +} +p.bold_left { + font-weight : bold; + text-align : left; +} +p.centerbold { + text-align : center; + font-weight : bold; +} +p.em { + font-weight : bold; + font-style : normal; + background : #FFF3B6; +} +p.small { + font-size : 80%%; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; +} +.tiny, .tiny_left, .tiny_right, .tiny_center { + font-size : 10px; + margin-top : 0px; + margin-bottom : 0px; + color : #777777; + margin-right : 6px; + text-align : left; +} +p.tiny { } +p.tiny_left { + margin-left : 0px; + margin-right : 0px; + text-align : left; +} +p.tiny_right { + margin-right : 1em; + text-align : right; +} +p.tiny_center { + margin-left : 0px; + margin-right : 0px; + text-align : center; +} +p.concordance_word { + line-height : 150%%; + font-weight : bold; + display : inline; + margin-top : 4px; + margin-bottom : 1px; +} +p.concordance_count { + font-size : 80%%; + color : #777777; + display : inline; + margin-left : 0em; +} +p.concordance_object { + font-size : 80%%; + line-height : 120%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +p.book_index_lev1 { + line-height : 100%%; + margin-top : 4px; + margin-bottom : 1px; +} +p.book_index_lev2 { + line-height : 100%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +tt { + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + background-color : #EEEEEE; + color : #000000; +} %s - note { white-space : pre; } - label.ocn { - width : 2%%; - float : right; - top : 0; - font-size : 10px; - margin-top : 0px; - margin-bottom : 5px; - margin-right : 5px; - text-align : right; - color : %s; - -khtml-user-select : none; - -moz-user-select : none; - -ms-user-select : none; - -o-user-select : none; - -webkit-user-select : none; - user-select : none; - } - table { - display : block; - margin-left : 5%%; - margin-right : 2em; - background-color : inherit; - } - tr { } - th,td { - vertical-align : top; - text-align : left; - } - th { - font-weight : bold; - } - em { - font-weight : bold; - font-style : italic; - } - p.left,th.left,td.left { - text-align : left; - } - p.small_left,th.small_left,td.small_left { - text-align : left; - font-size : 80%%; - } - p.right,th.right,td.right { - text-align : right; - } - ul, li { - list-style-type : none; - list-style : none; - padding-left : 20px; - font-weight : normal; - line-height : 150%%; - text-align : left; - text-indent : 0mm; - margin-left : 1em; - margin-right : 2em; - margin-top : 3px; - margin-bottom : 3px; - } - li { - background : url(../image_sys/bullet_09.png) no-repeat 0px 6px; - } - ul { } - h0, h1, h2, h3, h4, h5, h6, h7 { - font-weight : bold; - line-height : 120%%; - text-align : left; - margin-top : 20px; - margin-bottom : 10px; - } - h4.norm, h5.norm, h6.norm, h7.norm { - margin-top : 10px; - margin-bottom : 0px; - } - h0 { font-size : 125%%; } - h1 { font-size : 120%%; } - h2 { font-size : 115%%; } - h3 { font-size : 110%%; } - h4 { font-size : 105%%; } - h5 { font-size : 100%%; } - h6 { font-size : 100%%; } - h7 { font-size : 100%%; } - h0, h1, h2, h3, h4, h5, h6, h7 { - text-shadow : .2em .2em .3em #808080; - } - h1.i { margin-left : 2em; } - h2.i { margin-left : 3em; } - h3.i { margin-left : 4em; } - h4.i { margin-left : 5em; } - h5.i { margin-left : 6em; } - h6.i { margin-left : 7em; } - h7.i { margin-left : 8em; } - h8.i { margin-left : 9em; } - h9.i { margin-left : 10em; } - .toc { - font-weight : normal; - margin-top : 6px; - margin-bottom : 6px; - } - h0.toc { - margin-left : 1em; - font-size : 120%%; - line-height : 150%%; - } - h1.toc { - margin-left : 1em; - font-size : 115%%; - line-height : 150%%; - } - h2.toc { - margin-left : 2em; - font-size : 110%%; - line-height : 140%%; - } - h3.toc { - margin-left : 3em; - font-size : 105%%; - line-height : 120%%; - } - h4.toc { - margin-left : 4em; - font-size : 100%%; - line-height : 120%%; - } - h5.toc { - margin-left : 5em; - font-size : 95%%; - line-height : 110%%; - } - h6.toc { - margin-left : 6em; - font-size : 90%%; - line-height : 110%%; - } - h7.toc { - margin-left : 7em; - font-size : 85%%; - line-height : 100%%; - } - .subtoc { - margin-right : 34%%; - font-weight : normal; - } - h5.subtoc { - margin-left : 2em; - font-size : 80%%; - margin-top : 2px; - margin-bottom : 2px; - } - h6.subtoc { - margin-left : 3em; - font-size : 75%%; - margin-top : 0px; - margin-bottom : 0px; - } - h7.subtoc { - margin-left : 4em; - font-size : 70%%; - margin-top : 0px; - margin-bottom : 0px; - } +note { white-space : pre; } +label.ocn { + width : 2%%; + float : right; + top : 0; + font-size : 10px; + margin-top : 0px; + margin-bottom : 5px; + margin-right : 5px; + text-align : right; + color : %s; + -khtml-user-select : none; + -moz-user-select : none; + -ms-user-select : none; + -o-user-select : none; + -webkit-user-select : none; + user-select : none; +} +table { + display : block; + margin-left : 5%%; + margin-right : 2em; + background-color : inherit; +} +tr { } +th,td { + vertical-align : top; + text-align : left; +} +th { + font-weight : bold; +} +em { + font-weight : bold; + font-style : italic; +} +p.left,th.left,td.left { + text-align : left; +} +p.small_left,th.small_left,td.small_left { + text-align : left; + font-size : 80%%; +} +p.right,th.right,td.right { + text-align : right; +} +ul, li { + list-style-type : none; + list-style : none; + padding-left : 20px; + font-weight : normal; + line-height : 150%%; + text-align : left; + text-indent : 0mm; + margin-left : 1em; + margin-right : 2em; + margin-top : 3px; + margin-bottom : 3px; +} +li { + background : url(../image_sys/bullet_09.png) no-repeat 0px 6px; +} +ul { } +h0, h1, h2, h3, h4, h5, h6, h7 { + font-weight : bold; + line-height : 120%%; + text-align : left; + margin-top : 20px; + margin-bottom : 10px; +} +h4.norm, h5.norm, h6.norm, h7.norm { + margin-top : 10px; + margin-bottom : 0px; +} +h0 { font-size : 125%%; } +h1 { font-size : 120%%; } +h2 { font-size : 115%%; } +h3 { font-size : 110%%; } +h4 { font-size : 105%%; } +h5 { font-size : 100%%; } +h6 { font-size : 100%%; } +h7 { font-size : 100%%; } +h0, h1, h2, h3, h4, h5, h6, h7 { + text-shadow : .2em .2em .3em #808080; +} +h1.i { margin-left : 2em; } +h2.i { margin-left : 3em; } +h3.i { margin-left : 4em; } +h4.i { margin-left : 5em; } +h5.i { margin-left : 6em; } +h6.i { margin-left : 7em; } +h7.i { margin-left : 8em; } +h8.i { margin-left : 9em; } +h9.i { margin-left : 10em; } +.toc { + font-weight : normal; + margin-top : 6px; + margin-bottom : 6px; +} +h0.toc { + margin-left : 1em; + font-size : 120%%; + line-height : 150%%; +} +h1.toc { + margin-left : 1em; + font-size : 115%%; + line-height : 150%%; +} +h2.toc { + margin-left : 2em; + font-size : 110%%; + line-height : 140%%; +} +h3.toc { + margin-left : 3em; + font-size : 105%%; + line-height : 120%%; +} +h4.toc { + margin-left : 4em; + font-size : 100%%; + line-height : 120%%; +} +h5.toc { + margin-left : 5em; + font-size : 95%%; + line-height : 110%%; +} +h6.toc { + margin-left : 6em; + font-size : 90%%; + line-height : 110%%; +} +h7.toc { + margin-left : 7em; + font-size : 85%%; + line-height : 100%%; +} +.subtoc { + margin-right : 34%%; + font-weight : normal; +} +h5.subtoc { + margin-left : 2em; + font-size : 80%%; + margin-top : 2px; + margin-bottom : 2px; +} +h6.subtoc { + margin-left : 3em; + font-size : 75%%; + margin-top : 0px; + margin-bottom : 0px; +} +h7.subtoc { + margin-left : 4em; + font-size : 70%%; + margin-top : 0px; + margin-bottom : 0px; +} ┃", _color_ocn_light, @@ -3683,523 +3683,523 @@ template spineCss() { _color_ocn_light, ); string _css_dark_epub = format(q"┃ - *{ - padding : 0px; - margin : 0px; - } - body { - height : 100vh; - background-color : #000000; - } - body { - color : #CCCCCC; - background : #000000; - background-color : #000000; - } - a:link { - color : #FFFFFF; - text-decoration : none; - } - a:visited { - color : #999999; - text-decoration : none; - } - a:hover { - color : #000000; - background-color : #555555; - } - a.lnkocn:link { - color : %s; - text-decoration : none; - } - a.lnkocn:visited { - color : #9ACD32; - text-decoration : none; - } - a.lnkocn:hover { - color : #BBBBBB; - font-size : 15px; - } - a:hover img { - background-color : #000000; - } - a:active { - color : #888888; - text-decoration : underline; - } - input { - color : #FFFFFF; - background-color : #777777; - } - div { - margin-left : 0; - margin-right : 0; - } - div.p { - margin-left : 5%%; - margin-right : 1%%; - } - div.substance { - width : 100%%; - background-color : #000000; - } - div.ocn { - width : 5%%; - float : right; - top : 0; - background-color : #000000; - } - div.endnote { - width : 95%%; - background-color : #000000; - } - div.toc { - position : absolute; - float : left; - margin : 0; - padding : 0; - padding-top : 0.5em; - border : 0; - width : 13em; - background-color : #111111; - margin-right : 1em; - } - div.summary { - margin : 0; - padding : 0; - border-left : 13em solid #111111; - padding-left : 1em; - background-color : #111111; - } - div.content, div.main_column { - margin : 0; - padding : 0; - border-left : 13em solid #000000; - padding-left : 1em; - padding-right : 1em; - } - div.content0, div.main_column0 { - margin : 0; - padding : 0; - border-left : 0%% solid #000000; - padding-left : 5%%; - } - div.scroll { - margin : 0; - padding : 0; - padding-left : 1em; - padding-right : 1em; - } - div.content:after { - content : ' '; - clear : both; - display : block; - height : 0; - overflow : hidden; - } - div.footer { - clear : left; - padding : 0.5em; - font-size : 80%%; - margin : 0; - } - div.toc ul { - list-style : none; - padding : 0; - margin : 0; - } - div.toc li ul a, li ul span.currentlink - { - font-weight : normal; - font-size : 90%%; - padding-left : 2em; - background-color : #111111; - } - div.toc a, span.currentlink{ - display : block; - text-decoration : none; - padding-left : 0.5em; - color : #FF00AA; - } - hr { - width : 90%%; - margin-left : 5%%; - margin-right : 2em; - margin-top : 1.8em; - margin-bottom : 1.8em; - } - span.currentlink { - text-decoration : none; - background-color : #AAAAF9; - } - div.toc a:visited { - color : #FF00AA; - } - div.toc a:hover { - color : #CCCCCC; - background-color : #F9F9AA; - } - nav#toc ol { - list-style-type : none; - } - .norm, .bold, .verse, .group, .block, .alt { - line-height : 133%%; - margin-top : 12px; - margin-bottom : 0px; - padding-left : 0em; - text-indent : 0em; - } - p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { - display : block; - font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; - margin-left : 5%%; - margin-right : 2em; - } - p { - font-size : 100%%; - font-weight : normal; - line-height : 133%%; - text-align : justify; - text-indent : 0mm; - margin-top : 0.8em; - margin-bottom : 0.8em; - } - img { - max-width : 100%%; - height : auto; - } - pre { - width : auto; - display : block; - clear : both; - color : #555555; - } - pre.codeline { - display : table; - clear : both; - table-layout : fixed; - margin-left : 5%%; - margin-right : 5%%; - width : 90%%; - white-space : pre-wrap; - border-style : none; - border-radius : 5px 5px 5px 5px; - box-shadow : 0 2px 5px #AAAAAA inset; - margin-bottom : 1em; - padding : 0.5em 1em; - page-break-inside : avoid; - word-wrap : break-word; - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - white-space : pre; - white-space : pre-wrap; - white-space : -moz-pre-wrap; - white-space : -o-pre-wrap; - background-color : #555555; - color : #DDDDDD; - font-size : 95%%; - line-height : 100%%; - } - pre.codeline::before { - counter-reset : linenum; - } - pre.codeline span.tr { - display : table-row; - counter-increment : linenum; - } - pre.codeline span.th { - display : table-cell; - user-select : none; - -moz-user-select : none; - -webkit-user-select : none; - padding : 0.5em 0.5em; - } - pre.codeline span.th::before { - content : counter(linenum) "."; - color : #999999; - text-align : right; - display : block; - } - pre.codeline span.th { - width : 4em; - } - pre.codeline code { - display : table-cell; - } - p.code { - border-style : none; - } - p.spaced { white-space : pre; } - p.block { - white-space : pre; - } - p.group { } - p.alt { } - p.verse { - white-space : pre; - margin-bottom : 6px; - } - p.caption { - text-align : left; - font-size : 80%%; - display : inline; - } - p.endnote { - font-size : 96%%; - line-height : 120%%; - text-align : left; - margin-right : 15mm; - padding-left : 1em; - text-indent : -1em; - } - p.center { - text-align : center; - } - p.bold { - font-weight : bold; - } - p.bold_left { - font-weight : bold; - text-align : left; - } - p.centerbold { - text-align : center; - font-weight : bold; - } - p.em { - font-weight : bold; - font-style : normal; - background : #FFF3B6; - } - p.small { - font-size : 80%%; - margin-top : 0px; - margin-bottom : 0px; - margin-right : 6px; - text-align : left; - } - .tiny, .tiny_left, .tiny_right, .tiny_center { - font-size : 10px; - margin-top : 0px; - margin-bottom : 0px; - color : #EEEEEE; - margin-right : 6px; - text-align : left; - } - p.tiny { } - p.tiny_left { - margin-left : 0px; - margin-right : 0px; - text-align : left; - } - p.tiny_right { - margin-right : 1em; - text-align : right; - } - p.tiny_center { - margin-left : 0px; - margin-right : 0px; - text-align : center; - } - p.concordance_word { - line-height : 150%%; - font-weight : bold; - display : inline; - margin-top : 4px; - margin-bottom : 1px; - } - p.concordance_count { - font-size : 80%%; - color : #555555; - display : inline; - margin-left : 0em; - } - p.concordance_object { - font-size : 80%%; - line-height : 120%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - p.book_index_lev1 { - line-height : 100%%; - margin-top : 4px; - margin-bottom : 1px; - } - p.book_index_lev2 { - line-height : 100%%; - text-align : left; - margin-left : 3em; - margin-top : 1px; - margin-bottom : 3px; - } - tt { - font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; - background-color : #555555; - color : #DDDDDD; - } +*{ + padding : 0px; + margin : 0px; +} +body { + height : 100vh; + background-color : #000000; +} +body { + color : #CCCCCC; + background : #000000; + background-color : #000000; +} +a:link { + color : #FFFFFF; + text-decoration : none; +} +a:visited { + color : #999999; + text-decoration : none; +} +a:hover { + color : #000000; + background-color : #555555; +} +a.lnkocn:link { + color : %s; + text-decoration : none; +} +a.lnkocn:visited { + color : #9ACD32; + text-decoration : none; +} +a.lnkocn:hover { + color : #BBBBBB; + font-size : 15px; +} +a:hover img { + background-color : #000000; +} +a:active { + color : #888888; + text-decoration : underline; +} +input { + color : #FFFFFF; + background-color : #777777; +} +div { + margin-left : 0; + margin-right : 0; +} +div.p { + margin-left : 5%%; + margin-right : 1%%; +} +div.substance { + width : 100%%; + background-color : #000000; +} +div.ocn { + width : 5%%; + float : right; + top : 0; + background-color : #000000; +} +div.endnote { + width : 95%%; + background-color : #000000; +} +div.toc { + position : absolute; + float : left; + margin : 0; + padding : 0; + padding-top : 0.5em; + border : 0; + width : 13em; + background-color : #111111; + margin-right : 1em; +} +div.summary { + margin : 0; + padding : 0; + border-left : 13em solid #111111; + padding-left : 1em; + background-color : #111111; +} +div.content, div.main_column { + margin : 0; + padding : 0; + border-left : 13em solid #000000; + padding-left : 1em; + padding-right : 1em; +} +div.content0, div.main_column0 { + margin : 0; + padding : 0; + border-left : 0%% solid #000000; + padding-left : 5%%; +} +div.scroll { + margin : 0; + padding : 0; + padding-left : 1em; + padding-right : 1em; +} +div.content:after { + content : ' '; + clear : both; + display : block; + height : 0; + overflow : hidden; +} +div.footer { + clear : left; + padding : 0.5em; + font-size : 80%%; + margin : 0; +} +div.toc ul { + list-style : none; + padding : 0; + margin : 0; +} +div.toc li ul a, li ul span.currentlink +{ + font-weight : normal; + font-size : 90%%; + padding-left : 2em; + background-color : #111111; +} +div.toc a, span.currentlink{ + display : block; + text-decoration : none; + padding-left : 0.5em; + color : #FF00AA; +} +hr { + width : 90%%; + margin-left : 5%%; + margin-right : 2em; + margin-top : 1.8em; + margin-bottom : 1.8em; +} +span.currentlink { + text-decoration : none; + background-color : #AAAAF9; +} +div.toc a:visited { + color : #FF00AA; +} +div.toc a:hover { + color : #CCCCCC; + background-color : #F9F9AA; +} +nav#toc ol { + list-style-type : none; +} +.norm, .bold, .verse, .group, .block, .alt { + line-height : 133%%; + margin-top : 12px; + margin-bottom : 0px; + padding-left : 0em; + text-indent : 0em; +} +p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { + display : block; + font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; + margin-left : 5%%; + margin-right : 2em; +} +p { + font-size : 100%%; + font-weight : normal; + line-height : 133%%; + text-align : justify; + text-indent : 0mm; + margin-top : 0.8em; + margin-bottom : 0.8em; +} +img { + max-width : 100%%; + height : auto; +} +pre { + width : auto; + display : block; + clear : both; + color : #555555; +} +pre.codeline { + display : table; + clear : both; + table-layout : fixed; + margin-left : 5%%; + margin-right : 5%%; + width : 90%%; + white-space : pre-wrap; + border-style : none; + border-radius : 5px 5px 5px 5px; + box-shadow : 0 2px 5px #AAAAAA inset; + margin-bottom : 1em; + padding : 0.5em 1em; + page-break-inside : avoid; + word-wrap : break-word; + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + white-space : pre; + white-space : pre-wrap; + white-space : -moz-pre-wrap; + white-space : -o-pre-wrap; + background-color : #555555; + color : #DDDDDD; + font-size : 95%%; + line-height : 100%%; +} +pre.codeline::before { + counter-reset : linenum; +} +pre.codeline span.tr { + display : table-row; + counter-increment : linenum; +} +pre.codeline span.th { + display : table-cell; + user-select : none; + -moz-user-select : none; + -webkit-user-select : none; + padding : 0.5em 0.5em; +} +pre.codeline span.th::before { + content : counter(linenum) "."; + color : #999999; + text-align : right; + display : block; +} +pre.codeline span.th { + width : 4em; +} +pre.codeline code { + display : table-cell; +} +p.code { + border-style : none; +} +p.spaced { white-space : pre; } +p.block { + white-space : pre; +} +p.group { } +p.alt { } +p.verse { + white-space : pre; + margin-bottom : 6px; +} +p.caption { + text-align : left; + font-size : 80%%; + display : inline; +} +p.endnote { + font-size : 96%%; + line-height : 120%%; + text-align : left; + margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; +} +p.center { + text-align : center; +} +p.bold { + font-weight : bold; +} +p.bold_left { + font-weight : bold; + text-align : left; +} +p.centerbold { + text-align : center; + font-weight : bold; +} +p.em { + font-weight : bold; + font-style : normal; + background : #FFF3B6; +} +p.small { + font-size : 80%%; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; +} +.tiny, .tiny_left, .tiny_right, .tiny_center { + font-size : 10px; + margin-top : 0px; + margin-bottom : 0px; + color : #EEEEEE; + margin-right : 6px; + text-align : left; +} +p.tiny { } +p.tiny_left { + margin-left : 0px; + margin-right : 0px; + text-align : left; +} +p.tiny_right { + margin-right : 1em; + text-align : right; +} +p.tiny_center { + margin-left : 0px; + margin-right : 0px; + text-align : center; +} +p.concordance_word { + line-height : 150%%; + font-weight : bold; + display : inline; + margin-top : 4px; + margin-bottom : 1px; +} +p.concordance_count { + font-size : 80%%; + color : #555555; + display : inline; + margin-left : 0em; +} +p.concordance_object { + font-size : 80%%; + line-height : 120%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +p.book_index_lev1 { + line-height : 100%%; + margin-top : 4px; + margin-bottom : 1px; +} +p.book_index_lev2 { + line-height : 100%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; +} +tt { + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + background-color : #555555; + color : #DDDDDD; +} %s - note { white-space : pre; } - label.ocn { - width : 2%%; - float : right; - top : 0; - font-size : 10px; - margin-top : 0px; - margin-bottom : 5px; - margin-right : 5px; - text-align : right; - color : %s; - -khtml-user-select : none; - -moz-user-select : none; - -ms-user-select : none; - -o-user-select : none; - -webkit-user-select : none; - user-select : none; - } - table { - display : block; - margin-left : 5%%; - margin-right : 2em; - background-color : inherit; - } - tr { } - th,td { - vertical-align : top; - text-align : left; - } - th { - font-weight : bold; - } - em { - font-weight : bold; - font-style : italic; - } - p.left,th.left,td.left { - text-align : left; - } - p.small_left,th.small_left,td.small_left { - text-align : left; - font-size : 80%%; - } - p.right,th.right,td.right { - text-align : right; - } - ul, li { - list-style-type : none; - list-style : none; - padding-left : 20px; - font-weight : normal; - line-height : 150%%; - text-align : left; - text-indent : 0mm; - margin-left : 1em; - margin-right : 2em; - margin-top : 3px; - margin-bottom : 3px; - } - li { - background : (../image_sys/bullet_09.png) no-repeat 0px 6px; - } - ul { } - h0, h1, h2, h3, h4, h5, h6, h7 { - font-weight : bold; - line-height : 120%%; - text-align : left; - margin-top : 20px; - margin-bottom : 10px; - } - h4.norm, h5.norm, h6.norm, h7.norm { - margin-top : 10px; - margin-bottom : 0px; - } - h0 { font-size : 125%%; } - h1 { font-size : 120%%; } - h2 { font-size : 115%%; } - h3 { font-size : 110%%; } - h4 { font-size : 105%%; } - h5 { font-size : 100%%; } - h6 { font-size : 100%%; } - h7 { font-size : 100%%; } - h0, h1, h2, h3, h4, h5, h6, h7 { - text-shadow : .2em .2em .3em #999999; - } - h1.i { margin-left : 2em; } - h2.i { margin-left : 3em; } - h3.i { margin-left : 4em; } - h4.i { margin-left : 5em; } - h5.i { margin-left : 6em; } - h6.i { margin-left : 7em; } - h7.i { margin-left : 8em; } - h8.i { margin-left : 9em; } - h9.i { margin-left : 10em; } - .toc { - font-weight : normal; - margin-top : 6px; - margin-bottom : 6px; - } - h0.toc { - margin-left : 1em; - font-size : 120%%; - line-height : 150%%; - } - h1.toc { - margin-left : 1em; - font-size : 115%%; - line-height : 150%%; - } - h2.toc { - margin-left : 2em; - font-size : 110%%; - line-height : 140%%; - } - h3.toc { - margin-left : 3em; - font-size : 105%%; - line-height : 120%%; - } - h4.toc { - margin-left : 4em; - font-size : 100%%; - line-height : 120%%; - } - h5.toc { - margin-left : 5em; - font-size : 95%%; - line-height : 110%%; - } - h6.toc { - margin-left : 6em; - font-size : 90%%; - line-height : 110%%; - } - h7.toc { - margin-left : 7em; - font-size : 85%%; - line-height : 100%%; - } - .subtoc { - margin-right : 34%%; - font-weight : normal; - } - h5.subtoc { - margin-left : 2em; - font-size : 80%%; - margin-top : 2px; - margin-bottom : 2px; - } - h6.subtoc { - margin-left : 3em; - font-size : 75%%; - margin-top : 0px; - margin-bottom : 0px; - } - h7.subtoc { - margin-left : 4em; - font-size : 70%%; - margin-top : 0px; - margin-bottom : 0px; - } +note { white-space : pre; } +label.ocn { + width : 2%%; + float : right; + top : 0; + font-size : 10px; + margin-top : 0px; + margin-bottom : 5px; + margin-right : 5px; + text-align : right; + color : %s; + -khtml-user-select : none; + -moz-user-select : none; + -ms-user-select : none; + -o-user-select : none; + -webkit-user-select : none; + user-select : none; +} +table { + display : block; + margin-left : 5%%; + margin-right : 2em; + background-color : inherit; +} +tr { } +th,td { + vertical-align : top; + text-align : left; +} +th { + font-weight : bold; +} +em { + font-weight : bold; + font-style : italic; +} +p.left,th.left,td.left { + text-align : left; +} +p.small_left,th.small_left,td.small_left { + text-align : left; + font-size : 80%%; +} +p.right,th.right,td.right { + text-align : right; +} +ul, li { + list-style-type : none; + list-style : none; + padding-left : 20px; + font-weight : normal; + line-height : 150%%; + text-align : left; + text-indent : 0mm; + margin-left : 1em; + margin-right : 2em; + margin-top : 3px; + margin-bottom : 3px; +} +li { + background : (../image_sys/bullet_09.png) no-repeat 0px 6px; +} +ul { } +h0, h1, h2, h3, h4, h5, h6, h7 { + font-weight : bold; + line-height : 120%%; + text-align : left; + margin-top : 20px; + margin-bottom : 10px; +} +h4.norm, h5.norm, h6.norm, h7.norm { + margin-top : 10px; + margin-bottom : 0px; +} +h0 { font-size : 125%%; } +h1 { font-size : 120%%; } +h2 { font-size : 115%%; } +h3 { font-size : 110%%; } +h4 { font-size : 105%%; } +h5 { font-size : 100%%; } +h6 { font-size : 100%%; } +h7 { font-size : 100%%; } +h0, h1, h2, h3, h4, h5, h6, h7 { + text-shadow : .2em .2em .3em #999999; +} +h1.i { margin-left : 2em; } +h2.i { margin-left : 3em; } +h3.i { margin-left : 4em; } +h4.i { margin-left : 5em; } +h5.i { margin-left : 6em; } +h6.i { margin-left : 7em; } +h7.i { margin-left : 8em; } +h8.i { margin-left : 9em; } +h9.i { margin-left : 10em; } +.toc { + font-weight : normal; + margin-top : 6px; + margin-bottom : 6px; +} +h0.toc { + margin-left : 1em; + font-size : 120%%; + line-height : 150%%; +} +h1.toc { + margin-left : 1em; + font-size : 115%%; + line-height : 150%%; +} +h2.toc { + margin-left : 2em; + font-size : 110%%; + line-height : 140%%; +} +h3.toc { + margin-left : 3em; + font-size : 105%%; + line-height : 120%%; +} +h4.toc { + margin-left : 4em; + font-size : 100%%; + line-height : 120%%; +} +h5.toc { + margin-left : 5em; + font-size : 95%%; + line-height : 110%%; +} +h6.toc { + margin-left : 6em; + font-size : 90%%; + line-height : 110%%; +} +h7.toc { + margin-left : 7em; + font-size : 85%%; + line-height : 100%%; +} +.subtoc { + margin-right : 34%%; + font-weight : normal; +} +h5.subtoc { + margin-left : 2em; + font-size : 80%%; + margin-top : 2px; + margin-bottom : 2px; +} +h6.subtoc { + margin-left : 3em; + font-size : 75%%; + margin-top : 0px; + margin-bottom : 0px; +} +h7.subtoc { + margin-left : 4em; + font-size : 70%%; + margin-top : 0px; + margin-bottom : 0px; +} ┃", _color_ocn_dark, diff --git a/src/doc_reform/meta/conf_make_meta_json.d b/src/doc_reform/meta/conf_make_meta_json.d index cc46754..574aebf 100644 --- a/src/doc_reform/meta/conf_make_meta_json.d +++ b/src/doc_reform/meta/conf_make_meta_json.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d index aff2465..2a95379 100644 --- a/src/doc_reform/meta/conf_make_meta_structs.d +++ b/src/doc_reform/meta/conf_make_meta_structs.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/conf_make_meta_yaml.d b/src/doc_reform/meta/conf_make_meta_yaml.d index eac55b7..6afec40 100644 --- a/src/doc_reform/meta/conf_make_meta_yaml.d +++ b/src/doc_reform/meta/conf_make_meta_yaml.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -230,7 +230,7 @@ template contentYAMLtoSpineStruct() { _struct_composite.make.substitute = _mk.substitute(_struct_composite.make_str.substitute); _struct_composite.make.texpdf_font = _mk.texpdf_font(_struct_composite.make_str.texpdf_font); } - + /+ conf ------------------------------------------------------------------- +/ if ("webserv" in _yaml && _yaml["webserv"].type.sequence @@ -1092,7 +1092,7 @@ template contentYAMLtoSpineStruct() { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -1174,7 +1174,7 @@ template configParseYAMLreturnSpineStruct() { - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/defaults.d b/src/doc_reform/meta/defaults.d index ec6ba49..060b0ad 100644 --- a/src/doc_reform/meta/defaults.d +++ b/src/doc_reform/meta/defaults.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/doc_debugs.d b/src/doc_reform/meta/doc_debugs.d index f68240d..bcc28b8 100644 --- a/src/doc_reform/meta/doc_debugs.d +++ b/src/doc_reform/meta/doc_debugs.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d index 525b32b..6f4a2a4 100644 --- a/src/doc_reform/meta/metadoc.d +++ b/src/doc_reform/meta/metadoc.d @@ -99,143 +99,143 @@ template spineAbstraction() { writeln("step4 commence → (doc_matters)"); } struct DocumentMatters { - @safe auto generator_program() { - struct Prog_ { - @safe string project_name() { - return "spine"; - } - @safe string name() { - return program_info.name; - } - @safe string ver() { - return program_info.ver; - } - @trusted string name_and_version() { - return format("%s-%s", - name, - ver, - ); - } - @safe string url_home() { - return "https://sisudoc.org"; - } - @safe string url_git() { - return "https://git.sisudoc.org/software/sisu"; - } - @safe auto compiler() { - return program_info.compiler; - } - @safe auto stime() { - return Clock.currTime(UTC()).toSimpleString(); - } + @safe auto generator_program() { + struct Prog_ { + @safe string project_name() { + return "spine"; } - return Prog_(); - } - @safe auto generated_time() { - auto _st = Clock.currTime(UTC()); - auto _time = _st.year.to!string - ~ "-" ~ _st.month.to!int.to!string // prefer as month number - ~ "-" ~ _st.day.to!string - ~ " [" ~ _st.isoWeek.to!string ~ "/" ~ _st.dayOfWeek.to!int.to!string ~ "]" - ~ " " ~ _st.hour.to!string - ~ ":" ~ _st.minute.to!string - ~ ":" ~ _st.second.to!string; - return _time; - } - @safe auto conf_make_meta() { - return _make_and_meta_struct; - } - @safe auto has() { - return _doc_has_struct; - } - @safe auto env() { - struct Env_ { - @safe auto pwd() { - return _manifest.env.pwd; - } - @safe auto home() { - return _manifest.env.home; - } + @safe string name() { + return program_info.name; } - return Env_(); - } - @safe auto opt() { - struct Opt_ { - @safe auto action() { - /+ getopt options, commandline instructions, raw - - processing instructions --epub --html etc. - - command line config instructions --output - +/ - return _opt_action; - } + @safe string ver() { + return program_info.ver; + } + @trusted string name_and_version() { + return format("%s-%s", + name, + ver, + ); + } + @safe string url_home() { + return "https://sisudoc.org"; + } + @safe string url_git() { + return "https://git.sisudoc.org/software/sisu"; + } + @safe auto compiler() { + return program_info.compiler; + } + @safe auto stime() { + return Clock.currTime(UTC()).toSimpleString(); } - return Opt_(); - } - @safe auto src() { - return _manifest.src; - } - @safe auto src_path_info() { - return spinePathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path } - @safe auto pod() { - return _manifest.pod; + return Prog_(); + } + @safe auto generated_time() { + auto _st = Clock.currTime(UTC()); + auto _time = _st.year.to!string + ~ "-" ~ _st.month.to!int.to!string // prefer as month number + ~ "-" ~ _st.day.to!string + ~ " [" ~ _st.isoWeek.to!string ~ "/" ~ _st.dayOfWeek.to!int.to!string ~ "]" + ~ " " ~ _st.hour.to!string + ~ ":" ~ _st.minute.to!string + ~ ":" ~ _st.second.to!string; + return _time; + } + @safe auto conf_make_meta() { + return _make_and_meta_struct; + } + @safe auto has() { + return _doc_has_struct; + } + @safe auto env() { + struct Env_ { + @safe auto pwd() { + return _manifest.env.pwd; + } + @safe auto home() { + return _manifest.env.home; + } } - @safe auto sqlite() { - struct SQLite_ { - @safe string filename() { - string _fn = ""; - string _pth = ""; - if (_opt_action.sqlite_filename.length > 0) { - _fn = _opt_action.sqlite_filename; - } else if (_make_and_meta_struct.conf.w_srv_db_sqlite_filename.length > 0) { - _fn = _make_and_meta_struct.conf.w_srv_db_sqlite_filename; - } - return _fn; - } - @safe string path() { - string _pth = ""; - if (_opt_action.sqlite_path.length > 0) { - _pth = _opt_action.sqlite_path; - } else if (_make_and_meta_struct.conf.w_srv_db_sqlite_path.length > 0) { - _pth = _make_and_meta_struct.conf.w_srv_db_sqlite_path; - } - return _pth; - } - @safe string cgi_filename() { - string _fn = ""; - if (_opt_action.cgi_sqlite_search_filename.length > 0) { - _fn = _opt_action.cgi_sqlite_search_filename; - } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script.length > 0) { - _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script; - } - return _fn; - } - @safe string cgi_filename_d() { - string _fn = ""; - if (_opt_action.cgi_sqlite_search_filename_d.length > 0) { - _fn = _opt_action.cgi_sqlite_search_filename_d; - } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d.length > 0) { - _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d; - } - return _fn; - } + return Env_(); + } + @safe auto opt() { + struct Opt_ { + @safe auto action() { + /+ getopt options, commandline instructions, raw + - processing instructions --epub --html etc. + - command line config instructions --output + +/ + return _opt_action; } - return SQLite_(); } - @safe auto output_path() { - return _make_and_meta_struct.conf.output_path; + return Opt_(); + } + @safe auto src() { + return _manifest.src; + } + @safe auto src_path_info() { + return spinePathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path + } + @safe auto pod() { + return _manifest.pod; + } + @safe auto sqlite() { + struct SQLite_ { + @safe string filename() { + string _fn = ""; + string _pth = ""; + if (_opt_action.sqlite_filename.length > 0) { + _fn = _opt_action.sqlite_filename; + } else if (_make_and_meta_struct.conf.w_srv_db_sqlite_filename.length > 0) { + _fn = _make_and_meta_struct.conf.w_srv_db_sqlite_filename; + } + return _fn; + } + @safe string path() { + string _pth = ""; + if (_opt_action.sqlite_path.length > 0) { + _pth = _opt_action.sqlite_path; + } else if (_make_and_meta_struct.conf.w_srv_db_sqlite_path.length > 0) { + _pth = _make_and_meta_struct.conf.w_srv_db_sqlite_path; + } + return _pth; + } + @safe string cgi_filename() { + string _fn = ""; + if (_opt_action.cgi_sqlite_search_filename.length > 0) { + _fn = _opt_action.cgi_sqlite_search_filename; + } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script.length > 0) { + _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script; + } + return _fn; + } + @safe string cgi_filename_d() { + string _fn = ""; + if (_opt_action.cgi_sqlite_search_filename_d.length > 0) { + _fn = _opt_action.cgi_sqlite_search_filename_d; + } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d.length > 0) { + _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d; + } + return _fn; + } } - @safe auto srcs() { - struct SRC_ { - auto file_insert_list() { - return _header_body_insertfilelist_imagelist[headBody.insert_file_list]; - } - auto image_list() { - return _doc_has_struct.imagelist; - } + return SQLite_(); + } + @safe auto output_path() { + return _make_and_meta_struct.conf.output_path; + } + @safe auto srcs() { + struct SRC_ { + auto file_insert_list() { + return _header_body_insertfilelist_imagelist[headBody.insert_file_list]; + } + auto image_list() { + return _doc_has_struct.imagelist; } - return SRC_(); } + return SRC_(); + } } auto doc_matters = DocumentMatters(); if ((_opt_action.debug_do) diff --git a/src/doc_reform/meta/metadoc_curate.d b/src/doc_reform/meta/metadoc_curate.d index 8190a9d..181b7c4 100644 --- a/src/doc_reform/meta/metadoc_curate.d +++ b/src/doc_reform/meta/metadoc_curate.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc_curate_authors.d b/src/doc_reform/meta/metadoc_curate_authors.d index 8c64f0c..c8c97f8 100644 --- a/src/doc_reform/meta/metadoc_curate_authors.d +++ b/src/doc_reform/meta/metadoc_curate_authors.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc_curate_topics.d b/src/doc_reform/meta/metadoc_curate_topics.d index 1fdc760..431783d 100644 --- a/src/doc_reform/meta/metadoc_curate_topics.d +++ b/src/doc_reform/meta/metadoc_curate_topics.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index bc19ec2..d433412 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc_object_setter.d b/src/doc_reform/meta/metadoc_object_setter.d index 0b208f7..af5670e 100644 --- a/src/doc_reform/meta/metadoc_object_setter.d +++ b/src/doc_reform/meta/metadoc_object_setter.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc_show_config.d b/src/doc_reform/meta/metadoc_show_config.d index 2b07c77..c5e24ac 100644 --- a/src/doc_reform/meta/metadoc_show_config.d +++ b/src/doc_reform/meta/metadoc_show_config.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc_show_make.d b/src/doc_reform/meta/metadoc_show_make.d index 14e142b..6378b1c 100644 --- a/src/doc_reform/meta/metadoc_show_make.d +++ b/src/doc_reform/meta/metadoc_show_make.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc_show_metadata.d b/src/doc_reform/meta/metadoc_show_metadata.d index 5e69256..17cf977 100644 --- a/src/doc_reform/meta/metadoc_show_metadata.d +++ b/src/doc_reform/meta/metadoc_show_metadata.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/metadoc_show_summary.d b/src/doc_reform/meta/metadoc_show_summary.d index 7fd2ab2..1fb02f1 100644 --- a/src/doc_reform/meta/metadoc_show_summary.d +++ b/src/doc_reform/meta/metadoc_show_summary.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/package.d b/src/doc_reform/meta/package.d index 3238017..a5e0114 100644 --- a/src/doc_reform/meta/package.d +++ b/src/doc_reform/meta/package.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d index 94e3864..4924823 100644 --- a/src/doc_reform/meta/rgx.d +++ b/src/doc_reform/meta/rgx.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/share/defaults.d b/src/doc_reform/share/defaults.d index e834714..36ade3a 100644 --- a/src/doc_reform/share/defaults.d +++ b/src/doc_reform/share/defaults.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d index 0893572..502ad15 100755 --- a/src/doc_reform/spine.d +++ b/src/doc_reform/spine.d @@ -41,7 +41,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -52,7 +52,7 @@ module doc_reform.sisu_document_parser; /++ name "spine" -description "A SiSU inspired document parser writen in D." +description "A SiSU inspired document parser written in D." homepage "https://sisudoc.org" +/ import @@ -119,11 +119,11 @@ string program_name = "spine"; "debug" : false, "digest" : false, "epub" : false, - "curate" : false, - "curate-authors" : false, - "curate-topics" : false, + "curate" : false, + "curate-authors" : false, + "curate-topics" : false, "html" : false, - "html-link-curate" : false, + "html-link-curate" : false, "html-link-search" : false, "html-seg" : false, "html-scroll" : false, @@ -177,6 +177,8 @@ string program_name = "spine"; "www-host" : "", //_cfg.www_host, // start with "localhost" ? "www-host-doc-root" : "", //_cfg.www_host_doc_root, // start with "localhost" ? "www-url-doc-root" : "", //_cfg.www_url_doc_root, // start with "http://localhost" ? + "cgi-http" : "", //_cfg.cgi_http, // suggest + "cgi-host" : "", //_cfg.cgi_host, // suggest "cgi-bin-root" : "", //_cfg.cgi_bin_root, // suggest "/var/www/cgi/cgi-bin" "cgi-sqlite-search-filename" : "", //_cfg.cgi_filename, // suggest "spine_search" (though "spine-search" would have been preferable?) "cgi-url-root" : "", //_cfg.cgi_url_root, // start with "http://localhost/cgi-bin" ? @@ -503,7 +505,7 @@ string program_name = "spine"; return settings["www-host-doc-root"]; } @trusted string webserver_url_doc_root() { - return settings["www-url-root"]; + return settings["www-url-doc-root"]; } @trusted string webserver_http() { return settings["www-http"]; @@ -654,7 +656,7 @@ string program_name = "spine"; auto _manifested = PathMatters!()(_opt_action, _env, ""); auto _manifests = [ _manifested ]; auto _conf_file_details = configFilePaths!()(_manifested, _env, _opt_action.config_path_set); - ConfComposite _config; + ConfComposite _siteConfig; if ( _opt_action.require_processing_files && _opt_action.config_path_set.empty @@ -666,7 +668,7 @@ string program_name = "spine"; _conf_file_details = configFilePaths!()(_manifested, _env, _opt_action.config_path_set); auto _config_local_site_struct = readConfigSite!()(_conf_file_details, _opt_action, _cfg); import doc_reform.meta.conf_make_meta_yaml; - _config = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_config, _manifested, _opt_action); // - get local site config + _siteConfig = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_siteConfig, _manifested, _opt_action); // - get local site config break; } } @@ -674,11 +676,11 @@ string program_name = "spine"; } else { /+ local site config +/ auto _config_local_site_struct = readConfigSite!()(_conf_file_details, _opt_action, _cfg); import doc_reform.meta.conf_make_meta_yaml; - _config = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_config, _manifested, _opt_action); // - get local site config + _siteConfig = _config_local_site_struct.configParseYAMLreturnSpineStruct!()(_siteConfig, _manifested, _opt_action); // - get local site config } if (_opt_action.show_config) { import doc_reform.meta.metadoc_show_config; - spineShowSiteConfig!()(_opt_action, _config); + spineShowSiteConfig!()(_opt_action, _siteConfig); } if (!(_opt_action.skip_output)) { if ((_opt_action.debug_do) @@ -686,15 +688,15 @@ string program_name = "spine"; ) { writeln("step0 commence → (without processing files)"); } - outputHubOp!()(_env, _opt_action, _config); + outputHubOp!()(_env, _opt_action, _siteConfig); if ((_opt_action.debug_do) || (_opt_action.very_verbose) ) { writeln("- step0 complete"); } } - ConfComposite _make_and_meta_struct = _config; - destroy(_config); + ConfComposite _make_and_meta_struct = _siteConfig; + destroy(_siteConfig); foreach(arg; args[1..$]) { if (arg.match(rgx.flag_action)) { /+ cli instruction, flag do +/ flag_action ~= " " ~ arg; // flags not taken by getopt diff --git a/sundry/editor-syntax-etc/emacs/README b/sundry/editor-syntax-etc/emacs/README new file mode 100644 index 0000000..6dabf72 --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/README @@ -0,0 +1,4 @@ +; put this into your .emacs file, then use the mode file: + +(load-file "~/emacs/el/sisu-spine-mode.el") +(add-to-list 'auto-mode-alist '("\\.sst$" . sisu-spine-mode)) diff --git a/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el b/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el new file mode 100644 index 0000000..4cc6332 --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el @@ -0,0 +1,10 @@ +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) +(autoload 'sisu-spine-mode "sisu-spine-mode" "\ +Major mode for editing SiSU (spine) markup files. +SiSU (https://www.sisudoc.org/) document structuring, publishing +and search. + +\(fn)" t nil) +(add-to-list 'auto-mode-alist '("\\.sst\\'" . sisu-spine-mode)) +(add-to-list 'auto-mode-alist '("\\.ssm\\'" . sisu-spine-mode)) +(add-to-list 'auto-mode-alist '("\\.ssi\\'" . sisu-spine-mode)) diff --git a/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el b/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el new file mode 100644 index 0000000..773fa5c --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el @@ -0,0 +1,493 @@ +;;; sisu-spine-mode.el --- Major mode for SiSU (spine parser) markup text + +;; Copyright (C) 2011, 2021 Free Software Foundation, Inc. + +;; Author: Ralph Amissah & Ambrose Kofi Laing +;; Maintainer: Ralph Amissah +;; Keywords: text, syntax, processes, tools +;; Version: 8.0.0 +;; URL: https://www.sisudoc.org/ +;; originally looked at (based on) doc-mode, with kind permission of the author +;; Author: SUN, Tong , (c)2001-6, all right reserved +;; Version: $Date: 2006/01/19 03:13:41 $ $Revision: 1.14 $ +;; Home URL: https://xpt.sourceforge.net/ +;; with contributions from Kevin Ryde and Stefan Monnier + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;; Viva Software Libre! +;; Support the free software movement! +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; Commentary: + +;; SiSU (https://www.sisudoc.org/) is a document structuring and +;; publishing framework. This package provides an Emacs major mode +;; for SiSU markup, as used by the spine parser (in D) which has a different +;; header (based on yaml) from the original sisu parser (in Ruby) which has +;; bespoke headers. + +;; When this package is installed, files ending in ".sst" are automatically +;; associated with sisu-spine-mode. If a file doesn't have a +;; .sst extension, add a first line: +;; # -*- sisuSpine -*- + +;; The documentation for the "Structure Of The Hierarchy Text" can be +;; found in the sisustring for the sisu-spine-mode function. + +;;; Code: + +;; Variables: + +(defgroup sisu-faces nil + "AsciiSisu highlighting" + :group 'sisus) + +;; == Colors +; color n is more prominent than color n+1 + +(defface sisu-title-1-face + `((((class color) + (background dark)) + (:foreground "brown3" :bold t :height 1.2 :inherit variable-pitch)) + (((class color) + (background light)) + (:foreground "brown3" :bold t :height 1.2 :inherit variable-pitch)) + (t (:weight bold :inherit variable-pitch))) + "Face for AsciiSisu titles at level 1." + :group 'sisu-faces) + +(defface sisu-title-2-face + `((((class color) + (background dark)) + (:foreground "yellow4" :bold t :height 1.1 :inherit variable-pitch)) + (((class color) + (background light)) + (:foreground "yellow4" :bold t :height 1.1 :inherit variable-pitch)) + (t (:weight bold :inherit variable-pitch))) + "Face for AsciiSisu titles at level 2." + :group 'sisu-faces) + +(defface sisu-title-3-face + `((((class color) + (background dark)) + (:foreground "sienna3" :bold t)) + (((class color) + (background light)) + (:foreground "sienna3" :bold t)) + (t (:weight bold))) + "Face for AsciiSisu titles at level 3." + :group 'sisu-faces) + +(defface sisu-title-4-face + `((((class color) + (background dark)) + (:foreground "burlywood3")) + (((class color) + (background light)) + (:foreground "burlywood3")) + (t ())) + "Face for AsciiSisu titles at level 4." + :group 'sisu-faces) + +(defface info-node + '((((class color) (background light)) (:foreground "brown" :bold t :italic t)) + (((class color) (background dark)) (:foreground "white" :bold t :italic t)) + (t (:bold t :italic t))) + "Face for Info node names." + :group 'sisu-faces) + +(defvar sisu-title-1 'sisu-title-1-face) +(defvar sisu-title-2 'sisu-title-2-face) +(defvar sisu-title-3 'sisu-title-3-face) +(defvar sisu-title-4 'sisu-title-4-face) + +(defvar sisu-general-font-lock-red1 font-lock-warning-face) +(defvar sisu-general-font-lock-red2 font-lock-comment-face) +(defvar sisu-general-font-lock-red3 font-lock-string-face) + +(defvar sisu-general-font-lock-green1 font-lock-type-face) +(defvar sisu-general-font-lock-green2 font-lock-constant-face) + +(defvar sisu-general-font-lock-blue1 font-lock-keyword-face) +(defvar sisu-general-font-lock-blue2 font-lock-function-name-face) +(defvar sisu-general-font-lock-blue3 font-lock-builtin-face) + +(defvar sisu-general-font-lock-yellow1 font-lock-variable-name-face) +(defvar sisu-general-font-lock-yellow2 font-lock-comment-face) + +;; == sisu-spine-mode settings + +(defvar sisu-spine-mode-hook nil + "Normal hook run when entering Sisu Text mode.") + +(defvar sisu-spine-mode-abbrev-table nil + "Abbrev table in use in Sisu-spine-mode buffers.") +(define-abbrev-table 'sisu-spine-mode-abbrev-table ()) + +(defconst sisu-font-lock-keywords + (eval-when-compile + (list + ;;grouped text --------- + ;(cons "^```[ ]code\\(.\\|\n\\)+?\n```\n" 'sisu-general-font-lock-red2) + (cons "^```[ ]+code.*?$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+table.*?$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+group$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+block$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+poem$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+alt$\\|^```$" 'sisu-general-font-lock-red2) + ;;grouped text --------- + (cons "^group{\\|^}group" 'sisu-general-font-lock-red2) + (cons "^block{\\|^}block" 'sisu-general-font-lock-red2) + (cons "^code{\\|^}code" 'sisu-general-font-lock-red2) + (cons "^poem{\\|^}poem" 'sisu-general-font-lock-red2) + (cons "^alt{\\|^}alt" 'sisu-general-font-lock-red2) + (cons "^table{.+\\|^}table" 'sisu-general-font-lock-red2) + (cons "^{table[^}]+}" 'sisu-general-font-lock-red2) + + (list + (concat + "^\`\\{3\\}[ ]+code.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + (list + (concat + "^\`\\{3\\}[ ]+table.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + (list + (concat + "^\`\\{3\\}[ ]+\\(group\\|block\\|alt\\|poem\\)$" + "\\(.\\|\n\\)+?" + "^\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + + ;; footnote/endnote ---- + ;(cons "\~{.+?}\~" 'sisu-general-font-lock-green1) + (cons "\~{\\*\\*\\|\~{\\*\\|\~{\\|}\~" 'sisu-general-font-lock-red2) + (cons "\~\\[\\+\\|\~\\[\\*\\|\~\\[\\|\\]\~" 'sisu-general-font-lock-red2) + (cons "\~\\^ \\|^\\^\~ " 'sisu-general-font-lock-red2) + (list + (concat + "\\(\*\~\\)" + "\\([^ \r\t\n]+\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-blue2 t) + ) + + ;; emphasis (can be program configured to be bold italics or underscore) + (list + (concat + "\\([*]{\\)" + "\\([^}]+\\)" + "\\(}[*]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; bold ---------------- + (list + (concat + "\\([!]{\\)" + "\\([^}]+\\)" + "\\(}[!]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + (cons "\\*[^ ]+\\*" 'sisu-general-font-lock-red1) + (cons "^!_ .+" 'sisu-general-font-lock-red1) + + ;; italics ------------- + (list + (concat + "\\([/]{\\)" + "\\([^}]+\\)" + "\\(}[/]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-blue1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; underscore ---------- + (list + (concat + "\\([_]{\\)" + "\\([^}]+\\)" + "\\(\}[_]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; monospace ----------- + (list + (concat + "\\([#]{\\)" + "\\([^}]+\\)" + "\\(}[#]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; citation ------------ + (list + (concat + "\\([\"]{\\)" + "\\([^}]+\\)" + "\\(}[\"]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; inserted text ------- + (list + (concat + "\\([\+]{\\)" + "\\([^}]+\\)" + "\\(}[\+]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; strike through ------ + (list + (concat + "\\(\\-{\\)" + "\\([^}]+\\)" + "\\(}\\-\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; superscript --------- + (list + (concat + "\\(\\^{\\)" + "\\([^}]+\\)" + "\\(}\\^\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; subscript ----------- + (list + (concat + "\\([,]{\\)" + "\\([^}]+\\)" + "\\(}[,]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; numbered list + (cons "^# \\|^_# " 'sisu-general-font-lock-red1) + + ;; bullet text + (cons "^_\\*[1-9] \\|^_\\* " 'sisu-general-font-lock-red1) + + ;; indented text + (cons "^_[1-9] " 'sisu-general-font-lock-red1) + (cons "^_[1-9]! " 'sisu-general-font-lock-red1) + + ;; hanging indented text [proposed enable when implemented] + (cons "^__[1-9] " 'sisu-general-font-lock-red1) + (cons "^_[0-9]_[0-9] " 'sisu-general-font-lock-red1) + (cons "^__[1-9]! " 'sisu-general-font-lock-red1) + (cons "^_[0-9]_[0-9]! " 'sisu-general-font-lock-red1) + + ;; url + (cons "\\(^\\|[ ]\\)https?:[/][/][^ \t\n\r<]+" 'sisu-general-font-lock-blue2) + + ;; Comment Lines + (cons "^% .*" 'sisu-general-font-lock-blue1) + + ;; page break + (cons "^\\(-\\\\\\\\-\\|=\\\\\\\\=\\|-\\.\\.-\\)" 'sisu-general-font-lock-red2) + + ;; line break + (cons " \\\\\\\\ " 'sisu-general-font-lock-red1) + + ;; line break (depreciated) + (cons "
" 'sisu-general-font-lock-red1) + + ;; Section titles + (list "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\)\\(.*\\)" + '(1 sisu-title-1 t) + '(3 sisu-title-2 t) + ) + + ;; hyper-links + (list + (concat + "\\({~^\\|{\\)" + "\\([^}{]+\\)" + "\\(}https?:[/][/][^ \r\n\t<]+\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; book index + (list + (concat + "^\\(\={\\)" + "\\([^}{]+\\)" + "\\(}\\)$" + ) + '(1 sisu-general-font-lock-green1 t) + '(2 nil t) + '(3 sisu-general-font-lock-green1 t) + ) + + ;(cons "^\={.+}" 'sisu-general-font-lock-green1) + + ;; numbers + (cons "\\<[.0-9]+\\>" 'sisu-general-font-lock-green2) + + ;; bullets sisu_normal (nearly copied regexp) + (cons "^_\\([1-9*]\\|[1-9]\\*\\) " 'sisu-general-font-lock-blue2) + + ;; image links + (list + (concat + "\\({\\)" + "\\([^}{]+\\)" + "\\(}image\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; insert file links + (list + (concat + "\\(<< \\)" + "\\([^ \r\t\n]+\\.ss\\)" + "\\(i\\|t\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-blue2 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; raw keywords + (list + (concat + "^\\(\\(" + "creator\\|" + "title\\|" + "date\\|" + "rights\\|" + "publisher\\|" + "classify\\|" + "identifier\\|" + "original\\|" + "notes\\|" + "links\\|" + "make\\|" + "\\):\\)\\(.*\\)" + ) + '(1 sisu-title-2 keep) + '(3 sisu-title-3 keep) + ) + ) + ) + "Default expressions to highlight in AsciiSisu mode." +) + +;; outline mode evil "folding" if available +;; (define-key evil-normal-state-map ",0" 'show-all) +;; (define-key evil-normal-state-map ",-" 'hide-body) +;; (define-key evil-normal-state-map ",+" 'show-subtree) +;; (define-key evil-normal-state-map ",=" 'show-subtree) + +;; + +;; Sisu & Autoload: + +;;;###autoload +(define-derived-mode sisu-spine-mode text-mode "SiSU" + "Major mode for editing SiSU files. +SiSU document structuring, publishing in multiple formats and search. +URL `https://www.sisudoc.org/'" + (modify-syntax-entry ?\' ".") + ;;(flyspell-mode nil) + + (make-local-variable 'paragraph-start) + (setq paragraph-start (concat "$\\|>" page-delimiter)) + (make-local-variable 'paragraph-separate) + (setq paragraph-separate paragraph-start) + (make-local-variable 'paragraph-ignore-fill-prefix) + (setq paragraph-ignore-fill-prefix t) + + (set (make-local-variable 'outline-regexp) + "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\|\\@[a-z]+:\\( \\|$\\)\\)") + + (make-local-variable 'require-final-newline) + (setq require-final-newline t) + + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults + '(sisu-font-lock-keywords + nil ; KEYWORDS-ONLY: no + nil ; CASE-FOLD: no + ((?_ . "w")) ; SYNTAX-ALIST + )) + ;; Enable outlining. + ;; TODO with outlining make sure linum (line numbering) is off, + ;; else performance penalty, sucks bigtime + (outline-minor-mode 1)) + +;;;###autoload (add-to-list 'auto-mode-alist '("\\.ss[imt]\\'" . sisu-spine-mode)) + +(provide 'sisu-spine-mode) + +;; + +;;; sisu-spine-mode.el ends here diff --git a/sundry/editor-syntax-etc/vim/colors/def-sisu.vim b/sundry/editor-syntax-etc/vim/colors/def-sisu.vim new file mode 100644 index 0000000..ac3e0c3 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/def-sisu.vim @@ -0,0 +1,223 @@ +" Vim color file +" Name: def-sisu +" Maintainer: Ralph Amissah +" Last Change: 2013-02-14 +" URL: +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +" (with occasional other colors selected from 256 color palate) +" .Xdefaults tweaking to make identical to def (256) provided, +" along with an alternative possibility using colors beyond +" 256 color palate +:hi clear +if exists("syntax_on") + syntax reset +endif +:set t_Co=256 +:set background=dark +:let colors_name = "def-sisu" +" ------- +" terminal def +" ------- +:hi Normal ctermbg=0 ctermfg=7 +":hi Cursor ctermbg=5 ctermfg=0 +:hi lCursor cterm=reverse +:hi StatusLine cterm=bold,reverse +:hi StatusLineNC cterm=reverse +:hi Search cterm=none ctermbg=57 ctermfg=0 +:hi IncSearch cterm=none ctermbg=154 ctermfg=0 +:hi SpecialKey ctermfg=4 +:hi Visual cterm=reverse +:hi VisualNOS cterm=bold,underline +:hi MoreMsg ctermfg=2 +:hi ModeMsg cterm=bold +:hi Question ctermfg=2 +:hi Title cterm=bold ctermfg=3 +:hi NonText cterm=bold ctermfg=4 +:hi LineNr cterm=bold ctermbg=0 ctermfg=0* +:hi CursorLineNr cterm=bold ctermbg=166 ctermfg=0 +:hi Directory ctermfg=4 +:hi WildMenu ctermbg=3 ctermfg=0 +:hi VertSplit cterm=reverse +:hi Folded cterm=none ctermbg=0 ctermfg=8 +:hi FoldColumn ctermbg=7 ctermfg=4 +:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 +:hi DiffChange cterm=none ctermbg=7 ctermfg=0 +:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 +:hi DiffText cterm=none ctermbg=6 ctermfg=0 +:hi String cterm=none ctermfg=3 +:hi Comment cterm=none ctermbg=0 ctermfg=4 +:hi Constant ctermfg=1 +:hi Special ctermfg=6 +:hi Identifier ctermfg=6 +:hi Statement ctermfg=6 +:hi Operator ctermfg=1 +:hi PreProc ctermbg=7 ctermfg=1 +:hi Type ctermfg=2 +:hi Delimiter cterm=none ctermfg=1 +:hi Ignore cterm=bold ctermfg=7 +:hi Todo ctermbg=3 ctermfg=0 +:hi Underlined cterm=underline +:hi Include ctermfg=1 +:hi Define ctermfg=3 +:hi Function ctermfg=6 +:hi Structure ctermfg=2 +:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +:hi CursorLine cterm=bold +:hi CursorColumn ctermbg=17 +:hi ColorColumn ctermbg=17 +:hi SpellBad cterm=underline ctermbg=0 ctermfg=5 +:hi SpellCap cterm=underline ctermbg=0 ctermfg=5 +:hi SpellLocal cterm=underline ctermbg=0 ctermfg=5 +:hi SpellRare cterm=underline ctermbg=0 ctermfg=5 +:hi TrailingWhitespace ctermbg=1 +:hi ExtraWhitespace ctermbg=1 +:hi WarningMsg ctermfg=1 +:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 +:hi Error cterm=bold ctermbg=1 ctermfg=7 +" ------- +" gui def +" ------- +:hi Normal guibg=#000000 guifg=#D3D3D3 +:hi Cursor guibg=#CC9966 guifg=#000000 +:hi lCursor gui=reverse +:hi StatusLine gui=bold,reverse +:hi StatusLineNC gui=reverse +:hi Search gui=none guibg=#5F00FF guifg=#000000 +:hi IncSearch gui=none guibg=#AFFF00 guifg=#000000 +:hi SpecialKey guifg=#5971AD +:hi Visual gui=reverse +:hi VisualNOS gui=bold,underline +:hi MoreMsg guifg=#4E9A06 +:hi ModeMsg gui=bold +:hi Question guifg=#4E9A06 +:hi Title gui=bold guifg=#C4A000 +:hi NonText gui=bold guifg=#5971AD +:hi LineNr gui=bold guibg=#000000 guifg=#808080 +:hi CursorLineNr gui=bold guibg=#D75F00 guifg=#000000 +:hi Directory guifg=#5971AD +:hi WildMenu guibg=#C4A000 guifg=#000000 +:hi VertSplit gui=reverse +:hi Folded gui=none guibg=#000000 guifg=#808080 +:hi FoldColumn guibg=#D3D3D3 guifg=#5971AD +:hi DiffAdd gui=none guibg=#4E9A06 guifg=#000000 +:hi DiffChange gui=none guibg=#D3D3D3 guifg=#000000 +:hi DiffDelete gui=none guibg=#D3D3D3 guifg=#000000 +:hi DiffText gui=none guibg=#06989A guifg=#000000 +:hi String gui=none guifg=#C4A000 +:hi Comment gui=none guibg=#000000 guifg=#5971AD +:hi Constant guifg=#CC0000 +:hi Special guifg=#06989A +:hi Identifier guifg=#06989A +:hi Statement guifg=#06989A +:hi Operator guifg=#CC0000 +:hi PreProc guibg=#D3D3D3 guifg=#CC0000 +:hi Type guifg=#4E9A06 +:hi Delimiter gui=none guifg=#CC0000 +:hi Ignore gui=bold guifg=#D3D3D3 +:hi Todo guibg=#C4A000 guifg=#000000 +:hi Underlined gui=underline +:hi Include guifg=#CC0000 +:hi Define guifg=#C4A000 +:hi Function guifg=#06989A +:hi Structure guifg=#4E9A06 +:hi MatchParen gui=bold guibg=#5971AD guifg=#D3D3D3 +:hi CursorLine gui=bold +:hi CursorColumn guibg=#00005F +:hi ColorColumn guibg=#00005F +:hi SpellBad gui=underline guibg=#000000 guifg=#75507B +:hi SpellCap gui=underline guibg=#000000 guifg=#75507B +:hi SpellLocal gui=underline guibg=#000000 guifg=#75507B +:hi SpellRare gui=underline guibg=#000000 guifg=#75507B +:hi TrailingWhitespace guibg=#080000 +:hi ExtraWhitespace guibg=#CC0000 +:hi WarningMsg guifg=#CC0000 +:hi ErrorMsg gui=bold guibg=#CC0000 guifg=#D3D3D3 +:hi Error gui=bold guibg=#CC0000 guifg=#D3D3D3 +" ------- +"256 color .Xdefaults vim: cterm giu +" +" +" ------- +" 256 color .Xdefaults vim: cterm giu def +" ------- +" 16 color standard altered 256 altered beyond 256 +" black/dark grey +" 0 [ 0:#000000] #000000 +" 8 [ 8:#808080] [59:#5F5F5F] #555555 +" red +" 1 [ 1:#800000] 160:#DF0000 #CC0000 +" 9 [ 9:#FF0000] #EF2929 +" green +" 2 [ 2:#008000] 112:#87DF00 #4E9A06 +" 10 [10:#00FF00] 154:#AFFF00 #8AE234 +" yellow/orange +" 3 [ 3:#808000] 178:#DFAF00 #C4A000 +" 11 [11:#FFFF00] 184:#DFDF00 #FC9E4F +" blue +" 4 [ 4:#000080] 24:#005F87 #5971AD +" 12 [12:#0000FF] 73:#5FAFAF #729FCF +" magenta +" 5 [ 5:#800080] 90:#870087 #75507B +" 13 [13:#FF00FF] 126:#AF0087 #AD7FA8 +" cyan +" 6 [ 6:#008080] 37:#00AFAF #06989A +" 14 [14:#00FFFF] 87:#5FFFFF #34E2E2 +" white +" 7 [ 7:#C0C0C0] #D3D3D3 +" 15 [15:#FFFFFF] #EEEEEE +" -------- +" .Xdefaults (rxvt urxvt setting beyond 256 colors, vim colorscheme "def" gui settings) +" (vim colorscheme "def" cterm matches "def" gui if .Xdefaults set thus) +" -------- +" ! black +" Rxvt.color0 : #000000 +" Rxvt.color8 : #555555 +" ! red +" Rxvt.color1 : #CC0000 +" Rxvt.color9 : #EF2929 +" ! green +" Rxvt.color2 : #4E9A06 +" Rxvt.color10 : #8AE234 +" ! yellow +" Rxvt.color3 : #C4A000 +" Rxvt.color11 : #FCE94F +" ! blue +" Rxvt.color4 : #5971AD +" Rxvt.color12 : #729FCF +" ! magenta +" Rxvt.color5 : #75507B +" Rxvt.color13 : #AD7FA8 +" ! cyan +" Rxvt.color6 : #06989A +" Rxvt.color14 : #34E2E2 +" ! white +" Rxvt.color7 : #D3D7CF +" Rxvt.color15 : #EEEEEE +" -------- +" .Xdefaults 256 (rxvt urxvt setting, vim colorscheme "def256" cterm & gui settings) +" (vim colorscheme "def" cterm matches "def256" if .Xdefaults set thus) +" -------- +" ! black +" Rxvt.color0 : #000000 +" Rxvt.color8 : #808080 +" ! red +" Rxvt.color1 : #DF0000 +" Rxvt.color9 : #FF0000 +" ! green +" Rxvt.color2 : #87DF00 +" Rxvt.color10 : #AFFF00 +" ! yellow +" Rxvt.color3 : #DFAF00 +" Rxvt.color11 : #FFFF00 +" ! blue +" Rxvt.color4 : #5F87DF +" Rxvt.color12 : #87DFFF +" ! magenta +" Rxvt.color5 : #8700DF +" Rxvt.color13 : #87DFFF +" ! cyan +" Rxvt.color6 : #00DFDF +" Rxvt.color14 : #5F5FDF +" ! white +" Rxvt.color7 : #C0C0C0 +" Rxvt.color15 : #FFFFFF diff --git a/sundry/editor-syntax-etc/vim/colors/def.vim b/sundry/editor-syntax-etc/vim/colors/def.vim new file mode 100644 index 0000000..aca1975 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/def.vim @@ -0,0 +1,223 @@ +" Vim color file +" Name: def +" Maintainer: Ralph Amissah +" Last Change: 2013-02-14 +" URL: +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +" (with occasional other colors selected from 256 color palate) +" .Xdefaults tweaking to make identical to def (256) provided, +" along with an alternative possibility using colors beyond +" 256 color palate +:hi clear +if exists("syntax_on") + syntax reset +endif +:set t_Co=256 +:set background=dark +:let colors_name = "def" +" ------- +" terminal def +" ------- +:hi Normal ctermbg=0 ctermfg=7 +":hi Cursor ctermbg=5 ctermfg=0 +:hi lCursor cterm=reverse +:hi StatusLine cterm=bold,reverse +:hi StatusLineNC cterm=reverse +:hi Search cterm=none ctermbg=57 ctermfg=0 +:hi IncSearch cterm=none ctermbg=154 ctermfg=0 +:hi SpecialKey ctermfg=4 +:hi Visual cterm=reverse +:hi VisualNOS cterm=bold,underline +:hi MoreMsg ctermfg=2 +:hi ModeMsg cterm=bold +:hi Question ctermfg=2 +:hi Title cterm=bold ctermfg=3 +:hi NonText cterm=bold ctermfg=4 +:hi LineNr cterm=bold ctermbg=0 ctermfg=0* +:hi CursorLineNr cterm=bold ctermbg=166 ctermfg=0 +:hi Directory ctermfg=4 +:hi WildMenu ctermbg=3 ctermfg=0 +:hi VertSplit cterm=reverse +:hi Folded cterm=none ctermbg=0 ctermfg=8 +:hi FoldColumn ctermbg=7 ctermfg=4 +:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 +:hi DiffChange cterm=none ctermbg=7 ctermfg=0 +:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 +:hi DiffText cterm=none ctermbg=6 ctermfg=0 +:hi String cterm=none ctermfg=3 +:hi Comment cterm=none ctermbg=0 ctermfg=4 +:hi Constant ctermfg=1 +:hi Special ctermfg=6 +:hi Identifier ctermfg=6 +:hi Statement ctermfg=2 +:hi Operator ctermfg=2 +:hi PreProc ctermfg=1 +:hi Type cterm=bold ctermfg=3 +:hi Delimiter cterm=none ctermfg=2 +:hi Ignore cterm=bold ctermfg=7 +:hi Todo ctermbg=3 ctermfg=0 +:hi Underlined cterm=underline +:hi Include ctermfg=1 +:hi Define ctermfg=3 +:hi Function ctermfg=6 +:hi Structure ctermfg=2 +:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +:hi CursorLine cterm=bold +:hi CursorColumn ctermbg=17 +:hi ColorColumn ctermbg=17 +:hi SpellBad cterm=underline ctermbg=0 ctermfg=5 +:hi SpellCap cterm=underline ctermbg=0 ctermfg=5 +:hi SpellLocal cterm=underline ctermbg=0 ctermfg=5 +:hi SpellRare cterm=underline ctermbg=0 ctermfg=5 +:hi TrailingWhitespace ctermbg=1 +:hi ExtraWhitespace ctermbg=1 +:hi WarningMsg ctermfg=1 +:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 +:hi Error cterm=bold ctermbg=1 ctermfg=7 +" ------- +" gui def +" ------- +:hi Normal guibg=#000000 guifg=#D3D3D3 +:hi Cursor guibg=#CC9966 guifg=#000000 +:hi lCursor gui=reverse +:hi StatusLine gui=bold,reverse +:hi StatusLineNC gui=reverse +:hi Search gui=none guibg=#5F00FF guifg=#000000 +:hi IncSearch gui=none guibg=#AFFF00 guifg=#000000 +:hi SpecialKey guifg=#5971AD +:hi Visual gui=reverse +:hi VisualNOS gui=bold,underline +:hi MoreMsg guifg=#4E9A06 +:hi ModeMsg gui=bold +:hi Question guifg=#4E9A06 +:hi Title gui=bold guifg=#C4A000 +:hi NonText gui=bold guifg=#5971AD +:hi LineNr gui=bold guibg=#000000 guifg=#808080 +:hi CursorLineNr gui=bold guibg=#D75F00 guifg=#000000 +:hi Directory guifg=#5971AD +:hi WildMenu guibg=#C4A000 guifg=#000000 +:hi VertSplit gui=reverse +:hi Folded gui=none guibg=#000000 guifg=#808080 +:hi FoldColumn guibg=#D3D3D3 guifg=#5971AD +:hi DiffAdd gui=none guibg=#4E9A06 guifg=#000000 +:hi DiffChange gui=none guibg=#D3D3D3 guifg=#000000 +:hi DiffDelete gui=none guibg=#D3D3D3 guifg=#000000 +:hi DiffText gui=none guibg=#06989A guifg=#000000 +:hi String gui=none guifg=#C4A000 +:hi Comment gui=none guibg=#000000 guifg=#5971AD +:hi Constant guifg=#CC0000 +:hi Special guifg=#06989A +:hi Identifier guifg=#06989A +:hi Statement guifg=#4E9A06 +:hi Operator guifg=#4E9A06 +:hi PreProc guifg=#CC0000 +:hi Type gui=bold guifg=#C4A000 +:hi Delimiter gui=none guifg=#4E9A06 +:hi Ignore gui=bold guifg=#D3D3D3 +:hi Todo guibg=#C4A000 guifg=#000000 +:hi Underlined gui=underline +:hi Include guifg=#CC0000 +:hi Define guifg=#C4A000 +:hi Function guifg=#06989A +:hi Structure guifg=#4E9A06 +:hi MatchParen gui=bold guibg=#5971AD guifg=#D3D3D3 +:hi CursorLine gui=bold +:hi CursorColumn guibg=#00005F +:hi ColorColumn guibg=#00005F +:hi SpellBad gui=underline guibg=#000000 guifg=#75507B +:hi SpellCap gui=underline guibg=#000000 guifg=#75507B +:hi SpellLocal gui=underline guibg=#000000 guifg=#75507B +:hi SpellRare gui=underline guibg=#000000 guifg=#75507B +:hi TrailingWhitespace guibg=#080000 +:hi ExtraWhitespace guibg=#CC0000 +:hi WarningMsg guifg=#CC0000 +:hi ErrorMsg gui=bold guibg=#CC0000 guifg=#D3D3D3 +:hi Error gui=bold guibg=#CC0000 guifg=#D3D3D3 +" ------- +"256 color .Xdefaults vim: cterm giu +" +" +" ------- +" 256 color .Xdefaults vim: cterm giu def +" ------- +" 16 color standard altered 256 altered beyond 256 +" black/dark grey +" 0 [ 0:#000000] #000000 +" 8 [ 8:#808080] [59:#5F5F5F] #555555 +" red +" 1 [ 1:#800000] 160:#DF0000 #CC0000 +" 9 [ 9:#FF0000] #EF2929 +" green +" 2 [ 2:#008000] 112:#87DF00 #4E9A06 +" 10 [10:#00FF00] 154:#AFFF00 #8AE234 +" yellow/orange +" 3 [ 3:#808000] 178:#DFAF00 #C4A000 +" 11 [11:#FFFF00] 184:#DFDF00 #FC9E4F +" blue +" 4 [ 4:#000080] 24:#005F87 #5971AD +" 12 [12:#0000FF] 73:#5FAFAF #729FCF +" magenta +" 5 [ 5:#800080] 90:#870087 #75507B +" 13 [13:#FF00FF] 126:#AF0087 #AD7FA8 +" cyan +" 6 [ 6:#008080] 37:#00AFAF #06989A +" 14 [14:#00FFFF] 87:#5FFFFF #34E2E2 +" white +" 7 [ 7:#C0C0C0] #D3D3D3 +" 15 [15:#FFFFFF] #EEEEEE +" -------- +" .Xdefaults (rxvt urxvt setting beyond 256 colors, vim colorscheme "def" gui settings) +" (vim colorscheme "def" cterm matches "def" gui if .Xdefaults set thus) +" -------- +" ! black +" Rxvt.color0 : #000000 +" Rxvt.color8 : #555555 +" ! red +" Rxvt.color1 : #CC0000 +" Rxvt.color9 : #EF2929 +" ! green +" Rxvt.color2 : #4E9A06 +" Rxvt.color10 : #8AE234 +" ! yellow +" Rxvt.color3 : #C4A000 +" Rxvt.color11 : #FCE94F +" ! blue +" Rxvt.color4 : #5971AD +" Rxvt.color12 : #729FCF +" ! magenta +" Rxvt.color5 : #75507B +" Rxvt.color13 : #AD7FA8 +" ! cyan +" Rxvt.color6 : #06989A +" Rxvt.color14 : #34E2E2 +" ! white +" Rxvt.color7 : #D3D7CF +" Rxvt.color15 : #EEEEEE +" -------- +" .Xdefaults 256 (rxvt urxvt setting, vim colorscheme "def256" cterm & gui settings) +" (vim colorscheme "def" cterm matches "def256" if .Xdefaults set thus) +" -------- +" ! black +" Rxvt.color0 : #000000 +" Rxvt.color8 : #808080 +" ! red +" Rxvt.color1 : #DF0000 +" Rxvt.color9 : #FF0000 +" ! green +" Rxvt.color2 : #87DF00 +" Rxvt.color10 : #AFFF00 +" ! yellow +" Rxvt.color3 : #DFAF00 +" Rxvt.color11 : #FFFF00 +" ! blue +" Rxvt.color4 : #5F87DF +" Rxvt.color12 : #87DFFF +" ! magenta +" Rxvt.color5 : #8700DF +" Rxvt.color13 : #87DFFF +" ! cyan +" Rxvt.color6 : #00DFDF +" Rxvt.color14 : #5F5FDF +" ! white +" Rxvt.color7 : #C0C0C0 +" Rxvt.color15 : #FFFFFF diff --git a/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim b/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim new file mode 100644 index 0000000..aae822d --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim @@ -0,0 +1,66 @@ +" Vim color file +" Name: frugal-cterm-sisu +" Maintainer: Ralph Amissah +" Last Change: 2013-02-09 +" URL: +" Note: 8 color cterm, related colorschemes 8 & sparse +:set background=dark +:hi clear +if exists("syntax_on") + syntax reset +endif +:let colors_name = "frugal-cterm-sisu" +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +:hi Normal ctermbg=0 ctermfg=7 +:hi Cursor cterm=reverse +:hi lCursor cterm=reverse +:hi StatusLine cterm=bold,reverse +:hi StatusLineNC cterm=reverse +:hi Search cterm=none ctermbg=2 ctermfg=0 +:hi IncSearch cterm=bold ctermbg=2 ctermfg=7 +:hi SpecialKey ctermfg=4 +:hi Visual cterm=reverse +:hi VisualNOS cterm=bold,underline +:hi MoreMsg ctermfg=2 +:hi ModeMsg cterm=bold +:hi Question ctermfg=2 +:hi Title cterm=bold ctermfg=3 +:hi NonText cterm=bold ctermfg=4 +:hi LineNr cterm=bold ctermbg=0 ctermfg=0* +:hi Directory ctermfg=4 +:hi WildMenu ctermbg=3 ctermfg=0 +:hi VertSplit cterm=reverse +:hi Folded cterm=none ctermbg=0 ctermfg=7 +:hi FoldColumn ctermbg=7 ctermfg=4 +:hi DiffChange cterm=none ctermbg=7 ctermfg=0 +:hi DiffText cterm=none ctermbg=6 ctermfg=0 +:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 +:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 +:hi String cterm=none ctermfg=3 +:hi Comment cterm=none ctermbg=0 ctermfg=7 +:hi Constant ctermfg=1 +:hi Special ctermfg=6 +:hi Identifier ctermfg=6 +:hi Statement ctermfg=6 +:hi Operator ctermfg=1 +:hi PreProc ctermbg=7 ctermfg=1 +:hi Type ctermfg=2 +:hi Delimiter cterm=none ctermfg=1 +:hi Ignore cterm=bold ctermfg=7 +:hi Todo ctermbg=3 ctermfg=0 +:hi Underlined cterm=underline +:hi Include ctermfg=1 +:hi Define ctermfg=3 +:hi Function ctermfg=6 +:hi Structure ctermfg=2 +:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +:hi CursorLine cterm=bold,underline +:hi CursorColumn cterm=bold +:hi ColorColumn ctermbg=8 +:hi SpellBad cterm=none ctermbg=7 ctermfg=0 +:hi SpellCap cterm=none ctermbg=7 ctermfg=0 +:hi SpellLocal cterm=none ctermbg=7 ctermfg=0 +:hi SpellRare cterm=none ctermbg=7 ctermfg=0 +:hi WarningMsg ctermfg=1 +:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 +:hi Error cterm=bold ctermbg=1 ctermfg=7 diff --git a/sundry/editor-syntax-etc/vim/colors/slate.vim b/sundry/editor-syntax-etc/vim/colors/slate.vim new file mode 100644 index 0000000..4d741e8 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/slate.vim @@ -0,0 +1,75 @@ +"%% SiSU Vim color file +" Name: Slate +" Maintainer: Ralph Amissah +" Last Change: 2013-02-09 +" URL: +" Notes: cterm now uses frugal-sisu 8 colors for term +" (for gui originally looked at desert Hans Fugal +" (April/May 2003)) +:set background=dark +:hi clear +if exists("syntax_on") + syntax reset +endif +:let colors_name = "slate" +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +:hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white +:hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey +:hi lCursor term=reverse cterm=reverse +:hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black +:hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat +:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green +:hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen +:hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki +:hi VisualNOS term=bold,underline cterm=bold,underline +:hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen +:hi ModeMsg term=bold cterm=bold guifg=goldenrod +:hi Question term=standout ctermfg=2 guifg=springgreen +:hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold +:hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue +:hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 +:hi Directory term=bold ctermfg=4 +:hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black +:hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +:hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 +:hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 +:hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white +:hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white +:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white +:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black +:hi String cterm=none ctermfg=3 guifg=SkyBlue +:hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 +:hi Constant term=underline ctermfg=1 guifg=#ffa0a0 +:hi Special term=bold ctermfg=6 guifg=darkkhaki +:hi Identifier term=underline ctermfg=6 guifg=salmon +:hi Statement term=bold ctermfg=6 guifg=CornflowerBlue +:hi Operator term=bold ctermfg=1 guifg=red +:hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red +:hi Type term=underline ctermfg=2 guifg=CornflowerBlue +:hi Delimiter term=none cterm=none ctermfg=1 +:hi Ignore cterm=bold ctermfg=7 guifg=grey40 +:hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered +:hi Underlined term=underline cterm=underline +:hi Include ctermfg=1 guifg=red +:hi Define ctermfg=3 gui=bold guifg=gold +:hi Function ctermfg=6 guifg=navajowhite +:hi Structure ctermfg=2 guifg=green +:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +:hi CursorLine cterm=bold,underline guibg=black +:hi CursorColumn cterm=bold guibg=black +:hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +:hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 +:hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +:hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 +:hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon +:hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +:hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +:hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black +:hi Red ctermbg=black ctermfg=red guibg=black guifg=red +:hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta +:hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue +:hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan +:hi Green ctermbg=black ctermfg=green guibg=black guifg=green +:hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow +:hi White ctermbg=black ctermfg=white guibg=black guifg=white diff --git a/sundry/editor-syntax-etc/vim/filetype.vim b/sundry/editor-syntax-etc/vim/filetype.vim new file mode 100644 index 0000000..917c3e0 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/filetype.vim @@ -0,0 +1,8 @@ +" SiSU filetype file +if exists("did_load_filetypes") + finish +endif +augroup filetypedetect + au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu + au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu +augroup END diff --git a/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim b/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim new file mode 100644 index 0000000..43c7e53 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim @@ -0,0 +1,224 @@ +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah +" SiSU Markup: SiSU (sisu-3.3) 2012-08-18 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype off +":filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map :if &guioptions =~# 'm' + \set guioptions-=m + \set guioptions-=T + \else + \set guioptions+=m + \set guioptions-=T + \endif +:set paste +""% statusline +"set statusline= " +"set fillchars=stl:―,stlnc:—,vert:│,fold:۰,diff:· +"" [ buffer number ] +"set statusline +=%#Normal#[ " +"set statusline +=%#Identifier#%n " buffer number +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ file name (& modified?) ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Statement#%<%F%* " full path +""set statusline +=%#Statement#%<%t " full path +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ column : line number / number of lines in file, percentage of file ] [%v:%l/%L\ %p%%] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Identifier#%v " column & line +"set statusline +=%#Normal#: " +"set statusline +=%#Identifier#%l " column & line +"set statusline +=%#SpecialKey#/%L\ " total lines +"set statusline +=%#Identifier#%p " percentage of file +"set statusline +=%#SpecialKey#%% " +"set statusline +=%#Normal#] " " +"" [ file format : file type ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#SpecialKey#%{&fenc} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%{&ff} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%y " file type +"set statusline +=%#Normal#] " +"" [ character under cursor ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#String#0x%04B " character under cursor +"set statusline +=%#Normal#]\ " +"" [ syntastic ] +"set statusline +=%#warningmsg# +"set statusline +=%{SyntasticStatuslineFlag()}\ " +""set statusline+=%* +"" Status line background +"set statusline +=%#Folded#\ " +"" misc +"set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map paste :set invpaste +"% wrap/formatting paragraph according to the current 'textwidth' with ^\ (control-\): +:imap gqap +:nmap gqap +:vmap gq +"% save file, go to next file in buffer +:map nf :w :n +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map ls :vs :Explore +:map dir :vs :Explore +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap gj +:nnoremap gk +:vnoremap gj +:vnoremap gk +:inoremap gj +:inoremap gk +"% search and replace +:map rd :.,$s///c "search and replace down +:map rg :%s///c "search and replace whole file +:map rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map e :e =expand("%:p:h") . "/" +:map pwd :exe 'cd ' . expand ("%:p:h") +"% searchhighlight t93: Toggle search highlight +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap :silent call ToggleHLSearched() +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map fs :set foldmethod=expr foldcolumn=2 foldlevel=0 +:map ff :F +:map fe :F zE +"% foldtoggle Fold Toggle mapped to +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap :call ToggleFold() +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake() +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% linenumbering, on, relative, off +:map nn :set ={'00':'','01':'r','10':'nor'}[&rnu.&nu]nu +"% cursorline +:map cu :if &cursorcolumn + \set nocursorline nocursorcolumn + \else + \set cursorline cursorcolumn + \endif +:map cu- :set nocursorline nocursorcolumn +:map cu+ :set cursorline cursorcolumn diff --git a/sundry/editor-syntax-etc/vim/templates/ssi.tpl b/sundry/editor-syntax-etc/vim/templates/ssi.tpl new file mode 100644 index 0000000..28e8101 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/templates/ssi.tpl @@ -0,0 +1,30 @@ +# SiSU 8.0 insert + +title: + main: "#___#" + sub: "#___#" + language: "#___#" + +creator: + author: "#___#" + +date: + :published: "YYYY-MM-DD" + +rights: + copyright: "#___#" + license: "#___#" + +classify: + topic_register: "#___#" + +make: + breaks: "new=:B; break=1" +# home_button_text: "#___#" +# footer: "#___#" + +#% -- body --- + +:A~ @title @author + +1~ #___# diff --git a/sundry/editor-syntax-etc/vim/templates/ssm.tpl b/sundry/editor-syntax-etc/vim/templates/ssm.tpl new file mode 100644 index 0000000..579375f --- /dev/null +++ b/sundry/editor-syntax-etc/vim/templates/ssm.tpl @@ -0,0 +1,30 @@ +# SiSU 8.0 master + +title: + main: "#___#" + sub: "#___#" + language: "#___#" + +creator: + author: "#___#" + +date: + :published: "YYYY-MM-DD" + +rights: + copyright: "#___#" + license: "#___#" + +classify: + topic_register: "#___#" + +make: + breaks: "new=:B; break=1" +# home_button_text: "#___#" +# footer: "#___#" + +#% -- body --- + +:A~ @title @author + +1~ #___# diff --git a/sundry/editor-syntax-etc/vim/templates/sst.tpl b/sundry/editor-syntax-etc/vim/templates/sst.tpl new file mode 100644 index 0000000..069d498 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/templates/sst.tpl @@ -0,0 +1,30 @@ +# SiSU 8.0 + +title: + main: "#___#" + sub: "#___#" + language: "#___#" + +creator: + author: "#___#" + +date: + :published: "YYYY-MM-DD" + +rights: + copyright: "#___#" + license: "#___#" + +classify: + topic_register: "#___#" + +make: + breaks: "new=:B; break=1" +# home_button_text: "#___#" +# footer: "#___#" + +#% -- body --- + +:A~ @title @author + +1~ #___# diff --git a/sundry/editor-syntax-etc/vim/vim-sisu.yaml b/sundry/editor-syntax-etc/vim/vim-sisu.yaml new file mode 100644 index 0000000..ca665bc --- /dev/null +++ b/sundry/editor-syntax-etc/vim/vim-sisu.yaml @@ -0,0 +1,7 @@ +#vim-addons: debian vim-addon-manager +addon: sisu +description: SiSU documents - structuring, publishing in multiple formats and search +basedir: /usr/share/vim-scripts/ +files: + - ftplugin/sisu.vim + - syntax/sisu.vim diff --git a/sundry/misc/util/d/cgi/search/src/spine_cgi_sqlite_search.d b/sundry/misc/util/d/cgi/search/src/spine_cgi_sqlite_search.d index 987c319..aa073c0 100644 --- a/sundry/misc/util/d/cgi/search/src/spine_cgi_sqlite_search.d +++ b/sundry/misc/util/d/cgi/search/src/spine_cgi_sqlite_search.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -118,325 +118,325 @@ void cgi_function_intro(Cgi cgi) { // cgi.write(field ~ ": " ~ content ~ "
"); // } } - static struct Rgx { - // static canned_query = ctRegex!(`\A(?P.+)\Z`, "m"); - static search_text_area = ctRegex!(`\A(?P.+)\Z`, "m"); - // static fulltext = ctRegex!(`\A(?P.+)\Z`, "m"); - static line = ctRegex!(`^(?P.+?)(?: ~|$)`, "m"); - static text = ctRegex!(`(?:^|\s~\s*)text:\s+(?P.+?)(?: ~|$)`, "m"); - static author = ctRegex!(`(?:^|\s~\s*)author:\s+(?P.+)$`, "m"); - static title = ctRegex!(`(?:^|\s~\s*)title:\s+(?P.+)$`, "m"); - static uid = ctRegex!(`(?:^|\s~\s*)uid:\s+(?P.+)$`, "m"); - static fn = ctRegex!(`(?:^|\s~\s*)fn:\s+(?P.+)$`, "m"); - static keywords = ctRegex!(`(?:^|\s~\s*)keywords:\s+(?P.+)$`, "m"); - static topic_register = ctRegex!(`(?:^|\s~\s*)topic_register:\s+(?P.+)$`, "m"); - static subject = ctRegex!(`(?:^|\s~\s*)subject:\s+(?P.+)$`, "m"); - static description = ctRegex!(`(?:^|\s~\s*)description:\s+(?P.+)$`, "m"); - static publisher = ctRegex!(`(?:^|\s~\s*)publisher:\s+(?P.+)$`, "m"); - static editor = ctRegex!(`(?:^|\s~\s*)editor:\s+(?P.+)$`, "m"); - static contributor = ctRegex!(`(?:^|\s~\s*)contributor:\s+(?P.+)$`, "m"); - static date = ctRegex!(`(?:^|\s~\s*)date:\s+(?P.+)$`, "m"); - static results_type = ctRegex!(`(?:^|\s~\s*)type:\s+(?P.+)$`, "m"); - static format = ctRegex!(`(?:^|\s~\s*)format:\s+(?P.+)$`, "m"); - static identifier = ctRegex!(`(?:^|\s~\s*)identifier:\s+(?P.+)$`, "m"); - static source = ctRegex!(`(?:^|\s~\s*)source:\s+(?P.+)$`, "m"); - static language = ctRegex!(`(?:^|\s~\s*)language:\s+(?P.+)$`, "m"); - static relation = ctRegex!(`(?:^|\s~\s*)relation:\s+(?P.+)$`, "m"); - static coverage = ctRegex!(`(?:^|\s~\s*)coverage:\s+(?P.+)$`, "m"); - static rights = ctRegex!(`(?:^|\s~\s*)rights:\s+(?P.+)$`, "m"); - static comment = ctRegex!(`(?:^|\s~\s*)comment:\s+(?P.+)$`, "m"); - // static abstract_ = ctRegex!(`(?:^|\s~\s*)abstract:\s+(?P.+)$`, "m"); - static src_filename_base = ctRegex!(`^src_filename_base:\s+(?P.+)$`, "m"); - } - struct searchFields { - string canned_query = ""; // GET canned_query == cq - string search_text_area = ""; // POST search_text_area == tsa - string text = ""; // text == txt - string author = ""; // author == au - string title = ""; // title == ti - string uid = ""; // uid == uid - string fn = ""; // fn == fn - string keywords = ""; // keywords == kw - string topic_register = ""; // topic_register == tr - string subject = ""; // subject == su - string description = ""; // description == de - string publisher = ""; // publisher == pb - string editor = ""; // editor == ed - string contributor = ""; // contributor == ct - string date = ""; // date == dt - string format = ""; // format == fmt - string identifier = ""; // identifier == id - string source = ""; // source == src sfn - string language = ""; // language == lng - string relation = ""; // relation == rl - string coverage = ""; // coverage == cv - string rights = ""; // rights == rgt - string comment = ""; // comment == cmt - // string abstract = ""; - string src_filename_base = ""; // src_filename_base == bfn - string results_type = ""; // results_type == rt radio - string sql_match_limit = ""; // sql_match_limit == sml radio - string sql_match_offset = ""; // sql_match_offset == smo - string stats = ""; // stats == sts checked - string echo = ""; // echo == ec checked - string url = ""; // url == url checked - string searched = ""; // searched == se checked - string sql = ""; // sql == sql checked - } - auto rgx = Rgx(); - auto got = searchFields(); - if (environment.get("REQUEST_METHOD", "POST") == "POST") { - if ("sf" in cgi.post) { - got.search_text_area = cgi.post["sf"]; - if (auto m = got.search_text_area.matchFirst(rgx.text)) { + static struct Rgx { + // static canned_query = ctRegex!(`\A(?P.+)\Z`, "m"); + static search_text_area = ctRegex!(`\A(?P.+)\Z`, "m"); + // static fulltext = ctRegex!(`\A(?P.+)\Z`, "m"); + static line = ctRegex!(`^(?P.+?)(?: ~|$)`, "m"); + static text = ctRegex!(`(?:^|\s~\s*)text:\s+(?P.+?)(?: ~|$)`, "m"); + static author = ctRegex!(`(?:^|\s~\s*)author:\s+(?P.+)$`, "m"); + static title = ctRegex!(`(?:^|\s~\s*)title:\s+(?P.+)$`, "m"); + static uid = ctRegex!(`(?:^|\s~\s*)uid:\s+(?P.+)$`, "m"); + static fn = ctRegex!(`(?:^|\s~\s*)fn:\s+(?P.+)$`, "m"); + static keywords = ctRegex!(`(?:^|\s~\s*)keywords:\s+(?P.+)$`, "m"); + static topic_register = ctRegex!(`(?:^|\s~\s*)topic_register:\s+(?P.+)$`, "m"); + static subject = ctRegex!(`(?:^|\s~\s*)subject:\s+(?P.+)$`, "m"); + static description = ctRegex!(`(?:^|\s~\s*)description:\s+(?P.+)$`, "m"); + static publisher = ctRegex!(`(?:^|\s~\s*)publisher:\s+(?P.+)$`, "m"); + static editor = ctRegex!(`(?:^|\s~\s*)editor:\s+(?P.+)$`, "m"); + static contributor = ctRegex!(`(?:^|\s~\s*)contributor:\s+(?P.+)$`, "m"); + static date = ctRegex!(`(?:^|\s~\s*)date:\s+(?P.+)$`, "m"); + static results_type = ctRegex!(`(?:^|\s~\s*)type:\s+(?P.+)$`, "m"); + static format = ctRegex!(`(?:^|\s~\s*)format:\s+(?P.+)$`, "m"); + static identifier = ctRegex!(`(?:^|\s~\s*)identifier:\s+(?P.+)$`, "m"); + static source = ctRegex!(`(?:^|\s~\s*)source:\s+(?P.+)$`, "m"); + static language = ctRegex!(`(?:^|\s~\s*)language:\s+(?P.+)$`, "m"); + static relation = ctRegex!(`(?:^|\s~\s*)relation:\s+(?P.+)$`, "m"); + static coverage = ctRegex!(`(?:^|\s~\s*)coverage:\s+(?P.+)$`, "m"); + static rights = ctRegex!(`(?:^|\s~\s*)rights:\s+(?P.+)$`, "m"); + static comment = ctRegex!(`(?:^|\s~\s*)comment:\s+(?P.+)$`, "m"); + // static abstract_ = ctRegex!(`(?:^|\s~\s*)abstract:\s+(?P.+)$`, "m"); + static src_filename_base = ctRegex!(`^src_filename_base:\s+(?P.+)$`, "m"); + } + struct searchFields { + string canned_query = ""; // GET canned_query == cq + string search_text_area = ""; // POST search_text_area == tsa + string text = ""; // text == txt + string author = ""; // author == au + string title = ""; // title == ti + string uid = ""; // uid == uid + string fn = ""; // fn == fn + string keywords = ""; // keywords == kw + string topic_register = ""; // topic_register == tr + string subject = ""; // subject == su + string description = ""; // description == de + string publisher = ""; // publisher == pb + string editor = ""; // editor == ed + string contributor = ""; // contributor == ct + string date = ""; // date == dt + string format = ""; // format == fmt + string identifier = ""; // identifier == id + string source = ""; // source == src sfn + string language = ""; // language == lng + string relation = ""; // relation == rl + string coverage = ""; // coverage == cv + string rights = ""; // rights == rgt + string comment = ""; // comment == cmt + // string abstract = ""; + string src_filename_base = ""; // src_filename_base == bfn + string results_type = ""; // results_type == rt radio + string sql_match_limit = ""; // sql_match_limit == sml radio + string sql_match_offset = ""; // sql_match_offset == smo + string stats = ""; // stats == sts checked + string echo = ""; // echo == ec checked + string url = ""; // url == url checked + string searched = ""; // searched == se checked + string sql = ""; // sql == sql checked + } + auto rgx = Rgx(); + auto got = searchFields(); + if (environment.get("REQUEST_METHOD", "POST") == "POST") { + if ("sf" in cgi.post) { + got.search_text_area = cgi.post["sf"]; + if (auto m = got.search_text_area.matchFirst(rgx.text)) { + got.text = m["matched"]; + got.canned_query ~= "sf=" ~ m["matched"]; + } else if (auto m = got.search_text_area.matchFirst(rgx.line)) { + if ( + !(m["matched"].matchFirst(rgx.author)) + && !(m["matched"].matchFirst(rgx.title)) + ) { got.text = m["matched"]; got.canned_query ~= "sf=" ~ m["matched"]; - } else if (auto m = got.search_text_area.matchFirst(rgx.line)) { - if ( - !(m["matched"].matchFirst(rgx.author)) - && !(m["matched"].matchFirst(rgx.title)) - ) { - got.text = m["matched"]; - got.canned_query ~= "sf=" ~ m["matched"]; - } - } - if (auto m = got.search_text_area.matchFirst(rgx.author)) { - got.author = m["matched"]; - got.canned_query ~= "&au=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.title)) { - got.title = m["matched"]; - got.canned_query ~= "&ti=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.uid)) { - got.uid = m["matched"]; - got.canned_query ~= "&uid=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.fn)) { - got.fn = m["matched"]; - got.canned_query ~= "&fn=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.keywords)) { - got.keywords = m["matched"]; - got.canned_query ~= "&kw=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.topic_register)) { - got.topic_register = m["matched"]; - got.canned_query ~= "&tr=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.subject)) { - got.subject = m["matched"]; - got.canned_query ~= "&su=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.description)) { - got.description = m["matched"]; - got.canned_query ~= "&de=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.publisher)) { - got.publisher = m["matched"]; - got.canned_query ~= "&pb=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.editor)) { - got.editor = m["matched"]; - got.canned_query ~= "&ed=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.contributor)) { - got.contributor = m["matched"]; - got.canned_query ~= "&ct=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.date)) { - got.date = m["matched"]; - got.canned_query ~= "&dt=" ~ m["matched"]; - } - // if (auto m = got.search_text_area.matchFirst(rgx.results_type)) { - // got.results_type = m["matched"]; - // got.canned_query ~= "&rt=" ~ m["matched"]; - // } - if (auto m = got.search_text_area.matchFirst(rgx.format)) { - got.format = m["matched"]; - got.canned_query ~= "&fmt=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.identifier)) { - got.identifier = m["matched"]; - got.canned_query ~= "&id=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.source)) { - got.source = m["matched"]; - got.canned_query ~= "&src=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.language)) { - got.language = m["matched"]; - got.canned_query ~= "&lng=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.relation)) { - got.relation = m["matched"]; - got.canned_query ~= "&rl=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.coverage)) { - got.coverage = m["matched"]; - got.canned_query ~= "&cv=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.rights)) { - got.rights = m["matched"]; - got.canned_query ~= "&rgt=" ~ m["matched"]; - } - if (auto m = got.search_text_area.matchFirst(rgx.comment)) { - got.comment = m["matched"]; - got.canned_query ~= "&cmt=" ~ m["matched"]; - } - // if (auto m = search_text_area.matchFirst(rgx.abstract)) { - // got.abstract = m["matched"]; - // } - if (auto m = got.search_text_area.matchFirst(rgx.src_filename_base)) { - got.src_filename_base = m["matched"]; - got.canned_query ~= "&bfn=" ~ m["matched"]; } } - if ("fn" in cgi.post) { - got.fn = cgi.post["fn"]; - got.canned_query ~= "&fn=" ~ cgi.post["fn"]; + if (auto m = got.search_text_area.matchFirst(rgx.author)) { + got.author = m["matched"]; + got.canned_query ~= "&au=" ~ m["matched"]; } - if ("rt" in cgi.post) { - got.results_type = cgi.post["rt"]; - got.canned_query ~= "&rt=" ~ cgi.post["rt"]; + if (auto m = got.search_text_area.matchFirst(rgx.title)) { + got.title = m["matched"]; + got.canned_query ~= "&ti=" ~ m["matched"]; } - if ("sts" in cgi.post) { - got.stats = cgi.post["sts"]; - got.canned_query ~= "&sts=" ~ cgi.post["sts"]; + if (auto m = got.search_text_area.matchFirst(rgx.uid)) { + got.uid = m["matched"]; + got.canned_query ~= "&uid=" ~ m["matched"]; } - if ("ec" in cgi.post) { - got.echo = cgi.post["ec"]; - got.canned_query ~= "&ec=" ~ cgi.post["ec"]; + if (auto m = got.search_text_area.matchFirst(rgx.fn)) { + got.fn = m["matched"]; + got.canned_query ~= "&fn=" ~ m["matched"]; } - if ("url" in cgi.post) { - got.url = cgi.post["url"]; - got.canned_query ~= "&url=" ~ cgi.post["url"]; + if (auto m = got.search_text_area.matchFirst(rgx.keywords)) { + got.keywords = m["matched"]; + got.canned_query ~= "&kw=" ~ m["matched"]; } - if ("se" in cgi.post) { - got.searched = cgi.post["se"]; - got.canned_query ~= "&se=" ~ cgi.post["se"]; + if (auto m = got.search_text_area.matchFirst(rgx.topic_register)) { + got.topic_register = m["matched"]; + got.canned_query ~= "&tr=" ~ m["matched"]; } - if ("sql" in cgi.post) { - got.sql = cgi.post["sql"]; - got.canned_query ~= "&sql=" ~ cgi.post["sql"]; + if (auto m = got.search_text_area.matchFirst(rgx.subject)) { + got.subject = m["matched"]; + got.canned_query ~= "&su=" ~ m["matched"]; } - if ("sml" in cgi.post) { - got.sql_match_limit = cgi.post["sml"]; - got.canned_query ~= "&sml=" ~ cgi.post["sml"]; - } - if ("smo" in cgi.post) { - got.sql_match_offset = "0"; // cgi.post["smo"]; - got.canned_query ~= "&smo=0"; // ~ cgi.post["smo"]; - } - got.canned_query = got.canned_query.strip.split(" ").join("%20"); - conf.query_string = got.canned_query; - // cgi.write("f.canned_query: " ~ got.canned_query ~ "
"); - } else if (environment.get("REQUEST_METHOD", "POST") == "GET") { - got.canned_query = environment.get("QUERY_STRING", ""); - // cgi.write("f.canned_query: " ~ got.canned_query ~ "
"); - got.search_text_area = ""; - if ("sf" in canned_query && !(canned_query["sf"]).empty) { - got.text = canned_query["sf"].split("%20").join(" "); - got.search_text_area ~= "text: " ~ got.text ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.description)) { + got.description = m["matched"]; + got.canned_query ~= "&de=" ~ m["matched"]; } - if ("au" in canned_query && !(canned_query["au"]).empty) { - got.author = canned_query["au"].split("%20").join(" "); - got.search_text_area ~= "author: " ~ got.author ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.publisher)) { + got.publisher = m["matched"]; + got.canned_query ~= "&pb=" ~ m["matched"]; } - if ("ti" in canned_query && !(canned_query["ti"]).empty) { - got.title = canned_query["ti"].split("%20").join(" "); - got.search_text_area ~= "title: " ~ got.title ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.editor)) { + got.editor = m["matched"]; + got.canned_query ~= "&ed=" ~ m["matched"]; } - if ("uid" in canned_query && !(canned_query["uid"]).empty) { - got.uid = canned_query["uid"].split("%20").join(" "); - got.search_text_area ~= "uid: " ~ got.uid ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.contributor)) { + got.contributor = m["matched"]; + got.canned_query ~= "&ct=" ~ m["matched"]; } - if ("fn" in canned_query && !(canned_query["fn"]).empty) { - got.fn = canned_query["fn"].split("%20").join(" "); - got.search_text_area ~= "fn: " ~ got.fn ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.date)) { + got.date = m["matched"]; + got.canned_query ~= "&dt=" ~ m["matched"]; } - if ("kw" in canned_query && !(canned_query["kw"]).empty) { - got.keywords = canned_query["kw"].split("%20").join(" "); - got.search_text_area ~= "keywords: " ~ got.keywords ~ "\n"; - } - if ("tr" in canned_query && !(canned_query["tr"]).empty) { - got.topic_register = canned_query["tr"].split("%20").join(" "); - got.search_text_area ~= "topic_register: " ~ got.topic_register ~ "\n"; - } - if ("su" in canned_query && !(canned_query["su"]).empty) { - got.subject = canned_query["su"].split("%20").join(" "); - got.search_text_area ~= "subject: " ~ got.subject ~ "\n"; - } - if ("de" in canned_query && !(canned_query["de"]).empty) { - got.description = canned_query["de"].split("%20").join(" "); - got.search_text_area ~= "description: " ~ got.description ~ "\n"; - } - if ("pb" in canned_query && !(canned_query["pb"]).empty) { - got.publisher = canned_query["pb"].split("%20").join(" "); - got.search_text_area ~= "publisher: " ~ got.publisher ~ "\n"; - } - if ("ed" in canned_query && !(canned_query["ed"]).empty) { - got.editor = canned_query["ed"].split("%20").join(" "); - got.search_text_area ~= "editor: " ~ got.editor ~ "\n"; - } - if ("ct" in canned_query && !(canned_query["ct"]).empty) { - got.contributor = canned_query["ct"].split("%20").join(" "); - got.search_text_area ~= "contributor: " ~ got.contributor ~ "\n"; - } - if ("dt" in canned_query && !(canned_query["dt"]).empty) { - got.date = canned_query["dt"].split("%20").join(" "); - got.search_text_area ~= "date: " ~ got.date ~ "\n"; - } - if ("rt" in canned_query && !(canned_query["rt"]).empty) { - got.results_type = canned_query["rt"].split("%20").join(" "); - // got.search_text_area ~= "results_type: " ~ got.results_type ~ "\n"; - } - if ("fmt" in canned_query && !(canned_query["fmt"]).empty) { - got.format = canned_query["fmt"].split("%20").join(" "); - got.search_text_area ~= "format: " ~ got.format ~ "\n"; + // if (auto m = got.search_text_area.matchFirst(rgx.results_type)) { + // got.results_type = m["matched"]; + // got.canned_query ~= "&rt=" ~ m["matched"]; + // } + if (auto m = got.search_text_area.matchFirst(rgx.format)) { + got.format = m["matched"]; + got.canned_query ~= "&fmt=" ~ m["matched"]; } - if ("id" in canned_query && !(canned_query["id"]).empty) { - got.identifier = canned_query["id"].split("%20").join(" "); - got.search_text_area ~= "identifier: " ~ got.identifier ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.identifier)) { + got.identifier = m["matched"]; + got.canned_query ~= "&id=" ~ m["matched"]; } - if ("src" in canned_query && !(canned_query["src"]).empty) { - got.source = canned_query["src"].split("%20").join(" "); - got.search_text_area ~= "source: " ~ got.source ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.source)) { + got.source = m["matched"]; + got.canned_query ~= "&src=" ~ m["matched"]; } - if ("lng" in canned_query && !(canned_query["lng"]).empty) { - got.language = canned_query["lng"].split("%20").join(" "); - got.search_text_area ~= "language: " ~ got.language ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.language)) { + got.language = m["matched"]; + got.canned_query ~= "&lng=" ~ m["matched"]; } - if ("rl" in canned_query && !(canned_query["rl"]).empty) { - got.relation = canned_query["rl"].split("%20").join(" "); - got.search_text_area ~= "relation: " ~ got.relation ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.relation)) { + got.relation = m["matched"]; + got.canned_query ~= "&rl=" ~ m["matched"]; } - if ("cv" in canned_query && !(canned_query["cv"]).empty) { - got.coverage = canned_query["cv"].split("%20").join(" "); - got.search_text_area ~= "coverage: " ~ got.coverage ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.coverage)) { + got.coverage = m["matched"]; + got.canned_query ~= "&cv=" ~ m["matched"]; } - if ("rgt" in canned_query && !(canned_query["rgt"]).empty) { - got.rights = canned_query["rgt"].split("%20").join(" "); - got.search_text_area ~= "rights: " ~ got.rights ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.rights)) { + got.rights = m["matched"]; + got.canned_query ~= "&rgt=" ~ m["matched"]; } - if ("cmt" in canned_query && !(canned_query["cmt"]).empty) { - got.comment = canned_query["cmt"].split("%20").join(" "); - got.search_text_area ~= "comment: " ~ got.comment ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.comment)) { + got.comment = m["matched"]; + got.canned_query ~= "&cmt=" ~ m["matched"]; } - // if ("abstract" in canned_query && !(canned_query["abstract"]).empty) { - // got.abstract = canned_query["abstract"]; + // if (auto m = search_text_area.matchFirst(rgx.abstract)) { + // got.abstract = m["matched"]; // } - if ("bfn" in canned_query && !(canned_query["bfn"]).empty) { // search_field - got.src_filename_base = canned_query["bfn"].split("%20").join(" "); - got.search_text_area ~= "src_filename_base: " ~ got.src_filename_base ~ "\n"; - } - if ("sml" in canned_query && !(canned_query["sml"]).empty) { - got.sql_match_limit = canned_query["sml"].split("%20").join(" "); - // got.search_text_area ~= "sql_match_limit: " ~ got.sql_match_limit ~ "\n"; + if (auto m = got.search_text_area.matchFirst(rgx.src_filename_base)) { + got.src_filename_base = m["matched"]; + got.canned_query ~= "&bfn=" ~ m["matched"]; } - // cgi.write("f.search_text_area: " ~ got.search_text_area ~ "
"); } - return got; + if ("fn" in cgi.post) { + got.fn = cgi.post["fn"]; + got.canned_query ~= "&fn=" ~ cgi.post["fn"]; + } + if ("rt" in cgi.post) { + got.results_type = cgi.post["rt"]; + got.canned_query ~= "&rt=" ~ cgi.post["rt"]; + } + if ("sts" in cgi.post) { + got.stats = cgi.post["sts"]; + got.canned_query ~= "&sts=" ~ cgi.post["sts"]; + } + if ("ec" in cgi.post) { + got.echo = cgi.post["ec"]; + got.canned_query ~= "&ec=" ~ cgi.post["ec"]; + } + if ("url" in cgi.post) { + got.url = cgi.post["url"]; + got.canned_query ~= "&url=" ~ cgi.post["url"]; + } + if ("se" in cgi.post) { + got.searched = cgi.post["se"]; + got.canned_query ~= "&se=" ~ cgi.post["se"]; + } + if ("sql" in cgi.post) { + got.sql = cgi.post["sql"]; + got.canned_query ~= "&sql=" ~ cgi.post["sql"]; + } + if ("sml" in cgi.post) { + got.sql_match_limit = cgi.post["sml"]; + got.canned_query ~= "&sml=" ~ cgi.post["sml"]; + } + if ("smo" in cgi.post) { + got.sql_match_offset = "0"; // cgi.post["smo"]; + got.canned_query ~= "&smo=0"; // ~ cgi.post["smo"]; + } + got.canned_query = got.canned_query.strip.split(" ").join("%20"); + conf.query_string = got.canned_query; + // cgi.write("f.canned_query: " ~ got.canned_query ~ "
"); + } else if (environment.get("REQUEST_METHOD", "POST") == "GET") { + got.canned_query = environment.get("QUERY_STRING", ""); + // cgi.write("f.canned_query: " ~ got.canned_query ~ "
"); + got.search_text_area = ""; + if ("sf" in canned_query && !(canned_query["sf"]).empty) { + got.text = canned_query["sf"].split("%20").join(" "); + got.search_text_area ~= "text: " ~ got.text ~ "\n"; + } + if ("au" in canned_query && !(canned_query["au"]).empty) { + got.author = canned_query["au"].split("%20").join(" "); + got.search_text_area ~= "author: " ~ got.author ~ "\n"; + } + if ("ti" in canned_query && !(canned_query["ti"]).empty) { + got.title = canned_query["ti"].split("%20").join(" "); + got.search_text_area ~= "title: " ~ got.title ~ "\n"; + } + if ("uid" in canned_query && !(canned_query["uid"]).empty) { + got.uid = canned_query["uid"].split("%20").join(" "); + got.search_text_area ~= "uid: " ~ got.uid ~ "\n"; + } + if ("fn" in canned_query && !(canned_query["fn"]).empty) { + got.fn = canned_query["fn"].split("%20").join(" "); + got.search_text_area ~= "fn: " ~ got.fn ~ "\n"; + } + if ("kw" in canned_query && !(canned_query["kw"]).empty) { + got.keywords = canned_query["kw"].split("%20").join(" "); + got.search_text_area ~= "keywords: " ~ got.keywords ~ "\n"; + } + if ("tr" in canned_query && !(canned_query["tr"]).empty) { + got.topic_register = canned_query["tr"].split("%20").join(" "); + got.search_text_area ~= "topic_register: " ~ got.topic_register ~ "\n"; + } + if ("su" in canned_query && !(canned_query["su"]).empty) { + got.subject = canned_query["su"].split("%20").join(" "); + got.search_text_area ~= "subject: " ~ got.subject ~ "\n"; + } + if ("de" in canned_query && !(canned_query["de"]).empty) { + got.description = canned_query["de"].split("%20").join(" "); + got.search_text_area ~= "description: " ~ got.description ~ "\n"; + } + if ("pb" in canned_query && !(canned_query["pb"]).empty) { + got.publisher = canned_query["pb"].split("%20").join(" "); + got.search_text_area ~= "publisher: " ~ got.publisher ~ "\n"; + } + if ("ed" in canned_query && !(canned_query["ed"]).empty) { + got.editor = canned_query["ed"].split("%20").join(" "); + got.search_text_area ~= "editor: " ~ got.editor ~ "\n"; + } + if ("ct" in canned_query && !(canned_query["ct"]).empty) { + got.contributor = canned_query["ct"].split("%20").join(" "); + got.search_text_area ~= "contributor: " ~ got.contributor ~ "\n"; + } + if ("dt" in canned_query && !(canned_query["dt"]).empty) { + got.date = canned_query["dt"].split("%20").join(" "); + got.search_text_area ~= "date: " ~ got.date ~ "\n"; + } + if ("rt" in canned_query && !(canned_query["rt"]).empty) { + got.results_type = canned_query["rt"].split("%20").join(" "); + // got.search_text_area ~= "results_type: " ~ got.results_type ~ "\n"; + } + if ("fmt" in canned_query && !(canned_query["fmt"]).empty) { + got.format = canned_query["fmt"].split("%20").join(" "); + got.search_text_area ~= "format: " ~ got.format ~ "\n"; + } + if ("id" in canned_query && !(canned_query["id"]).empty) { + got.identifier = canned_query["id"].split("%20").join(" "); + got.search_text_area ~= "identifier: " ~ got.identifier ~ "\n"; + } + if ("src" in canned_query && !(canned_query["src"]).empty) { + got.source = canned_query["src"].split("%20").join(" "); + got.search_text_area ~= "source: " ~ got.source ~ "\n"; + } + if ("lng" in canned_query && !(canned_query["lng"]).empty) { + got.language = canned_query["lng"].split("%20").join(" "); + got.search_text_area ~= "language: " ~ got.language ~ "\n"; + } + if ("rl" in canned_query && !(canned_query["rl"]).empty) { + got.relation = canned_query["rl"].split("%20").join(" "); + got.search_text_area ~= "relation: " ~ got.relation ~ "\n"; + } + if ("cv" in canned_query && !(canned_query["cv"]).empty) { + got.coverage = canned_query["cv"].split("%20").join(" "); + got.search_text_area ~= "coverage: " ~ got.coverage ~ "\n"; + } + if ("rgt" in canned_query && !(canned_query["rgt"]).empty) { + got.rights = canned_query["rgt"].split("%20").join(" "); + got.search_text_area ~= "rights: " ~ got.rights ~ "\n"; + } + if ("cmt" in canned_query && !(canned_query["cmt"]).empty) { + got.comment = canned_query["cmt"].split("%20").join(" "); + got.search_text_area ~= "comment: " ~ got.comment ~ "\n"; + } + // if ("abstract" in canned_query && !(canned_query["abstract"]).empty) { + // got.abstract = canned_query["abstract"]; + // } + if ("bfn" in canned_query && !(canned_query["bfn"]).empty) { // search_field + got.src_filename_base = canned_query["bfn"].split("%20").join(" "); + got.search_text_area ~= "src_filename_base: " ~ got.src_filename_base ~ "\n"; + } + if ("sml" in canned_query && !(canned_query["sml"]).empty) { + got.sql_match_limit = canned_query["sml"].split("%20").join(" "); + // got.search_text_area ~= "sql_match_limit: " ~ got.sql_match_limit ~ "\n"; + } + // cgi.write("f.search_text_area: " ~ got.search_text_area ~ "
"); + } + return got; } auto tf = text_fields; // struct SQL_select { @@ -573,96 +573,96 @@ void cgi_function_intro(Cgi cgi) { conf.http_host, ); } - { - table = format(q"┃ - - -
- - -
-
- SiSU - -
- git - -
-
- + { + table = format(q"┃ + + + +
+ +
+
+ SiSU + +
+ git +
- ┃"); - } - { - string post_value(string field_name, string type="box", string set="on") { - string val = ""; - switch (type) { - case "field": - val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) - ? cgi.post[field_name] - : (field_name in cgi.get) - ? cgi.get[field_name] - : ""); - val = tf.search_text_area; - break; - case "box": // generic for checkbox or radio; checkbox set == "on" radio set == "name set" - val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) - ? (cgi.post[field_name] == set ? "checked" : "off") - : (field_name in cgi.get) - ? (cgi.get[field_name] == set ? "checked" : "off") - : "off"); - break; - case "radio": // used generic bo - val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) - ? (cgi.post[field_name] == set ? "checked" : "off") - : (field_name in cgi.get) - ? (cgi.get[field_name] == set ? "checked" : "off") - : "checked"); - break; - case "checkbox": // used generic bo - val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) - ? (cgi.post[field_name] == set ? "checked" : "off") - : (field_name in cgi.get) - ? (cgi.get[field_name] == set ? "checked" : "off") - : "checked"); - break; - default: - } - return val; +
+ +
+┃"); + } +{ + string post_value(string field_name, string type="box", string set="on") { + string val = ""; + switch (type) { + case "field": + val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) + ? cgi.post[field_name] + : (field_name in cgi.get) + ? cgi.get[field_name] + : ""); + val = tf.search_text_area; + break; + case "box": // generic for checkbox or radio; checkbox set == "on" radio set == "name set" + val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) + ? (cgi.post[field_name] == set ? "checked" : "off") + : (field_name in cgi.get) + ? (cgi.get[field_name] == set ? "checked" : "off") + : "off"); + break; + case "radio": // used generic bo + val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) + ? (cgi.post[field_name] == set ? "checked" : "off") + : (field_name in cgi.get) + ? (cgi.get[field_name] == set ? "checked" : "off") + : "checked"); + break; + case "checkbox": // used generic bo + val = ((field_name in cgi.post && !(cgi.post[field_name]).empty) + ? (cgi.post[field_name] == set ? "checked" : "off") + : (field_name in cgi.get) + ? (cgi.get[field_name] == set ? "checked" : "off") + : "checked"); + break; + default: } - string the_can(string fv) { - string show_the_can = post_value("url"); - string _the_can = ""; - if (show_the_can == "checked") { - tf = text_fields; - string method_get_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ environment.get("QUERY_STRING", ""); - string method_post_url_construct = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ tf.canned_query; - // assert(method_get_url == environment.get("HTTP_REFERER", conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ conf.query_string)); - if (conf.request_method == "POST") { - _the_can = - "" - ~ "POST: " - ~ "" - ~ method_post_url_construct - ~ "" - ~ "
"; - } else if (conf.request_method == "GET") { - _the_can = - "" - ~ "GET:  " - ~ "" - ~ method_get_url - ~ ""; - } - conf.http_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ tf.canned_query; - } - return _the_can; + return val; + } +string the_can(string fv) { + string show_the_can = post_value("url"); + string _the_can = ""; + if (show_the_can == "checked") { + tf = text_fields; + string method_get_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ environment.get("QUERY_STRING", ""); + string method_post_url_construct = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ tf.canned_query; + // assert(method_get_url == environment.get("HTTP_REFERER", conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ "?" ~ conf.query_string)); + if (conf.request_method == "POST") { + _the_can = + "" + ~ "POST: " + ~ "" + ~ method_post_url_construct + ~ "" + ~ "
"; + } else if (conf.request_method == "GET") { + _the_can = + "" + ~ "GET:  " + ~ "" + ~ method_get_url + ~ ""; } + conf.http_url = conf.http_request_type ~ "://" ~ conf.http_host ~ conf.cgi_script ~ tf.canned_query; + } + return _the_can; +} string provide_tip() { string searched_tip = post_value("se"); string tip = ""; @@ -732,59 +732,59 @@ void cgi_function_intro(Cgi cgi) {
┃", - "spine-search", - (post_value("ec") == "checked") ? post_value("sf", "field") : "", - provide_tip, - search_note, - the_can(post_value("sf", "field")), - cv.db_selected, - cv.db_selected, - post_value("rt", "box", "idx"), - post_value("rt", "box", "txt"), - post_value("sml", "box", "1000"), - post_value("sml", "box", "2500"), - post_value("ec"), - post_value("sts"), - post_value("url"), - post_value("se"), - post_value("tip"), - post_value("sql"), - ); - { - string set_value(string field_name, string default_val) { - string val; - if (field_name in cgi.post) { - val = cgi.post[field_name]; - } else if (field_name in cgi.get) { - val = cgi.get[field_name]; - } else { val = default_val; } - return val; - } - bool set_bool(string field_name) { - bool val; - if (field_name in cgi.post - && cgi.post[field_name] == "on") { - val = true; - } else if (field_name in cgi.get - && cgi.get[field_name] == "on") { - val = true; - } else { val = false; } - return val; - } - cv.db_selected = set_value("selected_db", "spine.search.db"); // selected_db == db - cv.sql_match_limit = set_value("sml", "1000"); - cv.sql_match_offset = set_value("smo", "0"); - cv.search_text = set_value("sf", "test"); // remove test - cv.results_type = set_value("rt", "idx"); - cv.checked_echo = set_bool("ec"); - cv.checked_stats = set_bool("sts"); - cv.checked_url = set_bool("url"); - cv.checked_searched = set_bool("se"); - cv.checked_tip = set_bool("tip"); - cv.checked_sql = set_bool("sql"); - tf = text_fields; + "spine-search", + (post_value("ec") == "checked") ? post_value("sf", "field") : "", + provide_tip, + search_note, + the_can(post_value("sf", "field")), + cv.db_selected, + cv.db_selected, + post_value("rt", "box", "idx"), + post_value("rt", "box", "txt"), + post_value("sml", "box", "1000"), + post_value("sml", "box", "2500"), + post_value("ec"), + post_value("sts"), + post_value("url"), + post_value("se"), + post_value("tip"), + post_value("sql"), +); + { + string set_value(string field_name, string default_val) { + string val; + if (field_name in cgi.post) { + val = cgi.post[field_name]; + } else if (field_name in cgi.get) { + val = cgi.get[field_name]; + } else { val = default_val; } + return val; + } + bool set_bool(string field_name) { + bool val; + if (field_name in cgi.post + && cgi.post[field_name] == "on") { + val = true; + } else if (field_name in cgi.get + && cgi.get[field_name] == "on") { + val = true; + } else { val = false; } + return val; } + cv.db_selected = set_value("selected_db", "spine.search.db"); // selected_db == db + cv.sql_match_limit = set_value("sml", "1000"); + cv.sql_match_offset = set_value("smo", "0"); + cv.search_text = set_value("sf", "test"); // remove test + cv.results_type = set_value("rt", "idx"); + cv.checked_echo = set_bool("ec"); + cv.checked_stats = set_bool("sts"); + cv.checked_url = set_bool("url"); + cv.checked_searched = set_bool("se"); + cv.checked_tip = set_bool("tip"); + cv.checked_sql = set_bool("sql"); + tf = text_fields; } +} { cgi.write(header); cgi.write(table); @@ -888,68 +888,68 @@ LIMIT %s OFFSET %s cv.sql_match_limit, cv.sql_match_offset, ); - (cv.checked_sql) - ? cgi.write(previous_next ~ "
" ~ sql_select.the_body.split("\n ").join(" ").split("\n").join("
") ~ "
\n") - : ""; - cgi.write(previous_next); - auto select_query_results = db.execute(sql_select.the_body).cached; - string _old_uid = ""; - if (!select_query_results.empty) { - foreach (row; select_query_results) { - if (row["uid"].as!string != _old_uid) { - _old_uid = row["uid"].as!string; - auto m = (row["date_published"].as!string).match(regex(r"^([0-9]{4})")); // breaks if row missing or no match? - cgi.write( - "
\"" - ~ row["title"].as!string ~ "\"" - ~ " (" - ~ m.hit - ~ ") " - ~ "[" - ~ row["language_document_char"].as!string - ~ "] " - ~ row["creator_author_last_first"].as!string - ~ ":
\n" - ); - } - if (cv.results_type == "txt") { - cgi.write( - "
" - ~ row["ocn"].as!string - ~ "" - ~ "
" - ~ row["body"].as!string - ); - } else { - cgi.write( - "" - ~ row["ocn"].as!string - ~ ", " - ); - } + (cv.checked_sql) + ? cgi.write(previous_next ~ "
" ~ sql_select.the_body.split("\n ").join(" ").split("\n").join("
") ~ "
\n") + : ""; + cgi.write(previous_next); + auto select_query_results = db.execute(sql_select.the_body).cached; + string _old_uid = ""; + if (!select_query_results.empty) { + foreach (row; select_query_results) { + if (row["uid"].as!string != _old_uid) { + _old_uid = row["uid"].as!string; + auto m = (row["date_published"].as!string).match(regex(r"^([0-9]{4})")); // breaks if row missing or no match? + cgi.write( + "
\"" + ~ row["title"].as!string ~ "\"" + ~ " (" + ~ m.hit + ~ ") " + ~ "[" + ~ row["language_document_char"].as!string + ~ "] " + ~ row["creator_author_last_first"].as!string + ~ ":
\n" + ); + } + if (cv.results_type == "txt") { + cgi.write( + "
" + ~ row["ocn"].as!string + ~ "" + ~ "
" + ~ row["body"].as!string + ); + } else { + cgi.write( + "" + ~ row["ocn"].as!string + ~ ", " + ); } - cgi.write( previous_next); - } else { // offset_not_beyond_limit = false; - cgi.write("select_query_results empty

\n"); } + cgi.write( previous_next); + } else { // offset_not_beyond_limit = false; + cgi.write("select_query_results empty

\n"); } - sql_search_query; } + sql_search_query; +} { db.close; } diff --git a/sundry/misc/util/rb/tex/dr_tex.rb b/sundry/misc/util/rb/tex/dr_tex.rb index b71d8c1..f310735 100755 --- a/sundry/misc/util/rb/tex/dr_tex.rb +++ b/sundry/misc/util/rb/tex/dr_tex.rb @@ -3,51 +3,51 @@ # - Name: Spine, Doc Reform [a part of] # - Description: documents, structuring, processing, publishing, search # - static content generator -# +# # - Author: Ralph Amissah # [ralph.amissah@gmail.com] -# +# # - Copyright: (C) 2015 - 2021 Ralph Amissah, All Rights # Reserved. -# +# # - License: AGPL 3 or later: -# +# # Spine (SiSU), a framework for document structuring, publishing and # search -# +# # Copyright (C) Ralph Amissah -# +# # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU AFERO General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. -# +# # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. -# +# # You should have received a copy of the GNU General Public License along with # this program. If not, see [https://www.gnu.org/licenses/]. -# +# # If you have Internet connection, the latest version of the AGPL should be # available at these locations: # [https://www.fsf.org/licensing/licenses/agpl.html] # [https://www.gnu.org/licenses/agpl.html] -# +# # - Spine (by Doc Reform, related to SiSU) uses standard: # - docReform markup syntax # - standard SiSU markup syntax with modified headers and minor modifications # - docReform object numbering # - standard SiSU object citation numbering & system -# -# - Hompages: +# +# - Homepages: # [https://www.doc_reform.org] # [https://www.sisudoc.org] -# +# # - Git # [https://git.sisudoc.org/projects/?p=software/spine.git;a=summary] -# +# # +/ require 'fileutils' pwd = Dir.pwd diff --git a/sundry/spine_search_cgi/src/spine_search.d_ b/sundry/spine_search_cgi/src/spine_search.d_ index b22c959..836c746 100755 --- a/sundry/spine_search_cgi/src/spine_search.d_ +++ b/sundry/spine_search_cgi/src/spine_search.d_ @@ -41,7 +41,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -1368,21 +1368,21 @@ void cgi_function_intro(Cgi cgi) { ); } { - table = format(q"┃ - - - -
- - -
- %s -
-
-
- ┃", - conf.cgi_search_form_html_title, - ); + table = format(q"┃ + + + +
+ + +
+ %s +
+
+
+ ┃", + conf.cgi_search_form_html_title, + ); } { string post_value(string field_name, string type="box", string set="on") { @@ -1822,7 +1822,7 @@ LIMIT %s OFFSET %s } } cgi.write( previous_next); - + } else { // offset_not_beyond_limit = false; cgi.write("select_query_results empty

\n"); } diff --git a/sundry/util/d/tools/markup_conversion/README b/sundry/util/d/tools/markup_conversion/README new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/sundry/util/d/tools/markup_conversion/README @@ -0,0 +1 @@ + diff --git a/sundry/util/d/tools/markup_conversion/endnotes_inline_from_binary.d b/sundry/util/d/tools/markup_conversion/endnotes_inline_from_binary.d new file mode 100755 index 0000000..b084052 --- /dev/null +++ b/sundry/util/d/tools/markup_conversion/endnotes_inline_from_binary.d @@ -0,0 +1,123 @@ +#!/usr/bin/env rdmd +/+ + - read in file .sst .ssi .ssm + - loop twice + - first + - check for and skip code blocks + - use unique code marker for endnote markers in text and give an endnote + number ★1, increment + - extract all endnotes in array + - second + - check that the footnote marker number count matches the number of notes + in the array + - if they match either: + - substitute each endnote marker with the array footnote[number-1] + - substitute each endnote marker with footnote + as inlined footnote markup (footnote number not needed) + - if they do not match exit + - check whether changes have been made + - if so write file with inline footnotes in sub-directory converted_output_/ + using the same name as the original file + - else, exit ++/ +import std.stdio; +import std.file; +import std.array : split; +import std.exception; +import core.stdc.errno; +import std.regex; +import std.format; +import std.conv; +void main(string[] args) { + static comment = ctRegex!(`^%+ `); + static block_tic_code_open = ctRegex!("^`{3} code(?:[.](?P[a-z][0-9a-z#+_]+))?(?:[(](?P[ a-zA-Z0-9;:,]*)[)])?"); + static block_tic_close = ctRegex!("^(`{3})$","m"); + static block_curly_code_open = ctRegex!(`^(?:code(?:[.](?P[a-z][0-9a-z_]+))?(?:[(](?P[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`); + static block_curly_code_close = ctRegex!(`^([}]code)`); + auto rgx_endnote_ref = ctRegex!(`([~]\^)(?P[)\]]? |$)`, "gm"); + auto rgx_endnote = ctRegex!(`^\^~\s+(.+|\n)`, "gm"); + foreach(arg; args[1..$]) { + if ( + !(arg.match(regex(r"--\w+"))) + && arg.match(regex(r"\w+?\.ss[itm]")) + ) { + writeln(arg); + string filename = arg; + try { + string[] contents, endnotes, endnote_refs; + string text = filename.readText; + string[] paragraphs = text.split("\n\n"); + int endnote_ref_count = 0; + int code_block_status = 0; + enum codeBlock { off, curly, tic, } + foreach (paragraph; paragraphs) { /+ loop to gather binary endnotes +/ + if (code_block_status == codeBlock.off + && paragraph.match(rgx_endnote) + ) { + endnotes ~= replaceAll!(m => m[1]) + (paragraph, rgx_endnote); + } else { + if ((code_block_status == codeBlock.curly + && paragraph.matchFirst(block_curly_code_close)) + || ((code_block_status == codeBlock.tic + && paragraph.matchFirst(block_tic_close)) + ) { + code_block_status = codeBlock.off; + } else if ( type["curly_code"] == 1 || type["tic_code"] == 1) { + // skip, prevent search for endnotes + } else if (paragraph.matchFirst(block_curly_code_open)) { + code_block_status = codeBlock.curly; + } else if (paragraph.matchFirst(block_tic_code_open)) { + code_block_status = codeBlock.tic; + } else if (auto m = paragraph.matchAll(rgx_endnote_ref)) { + foreach (n; m) { + endnote_ref_count++; // endnote_refs ~= (n.captures[1]); + } + } + contents ~= paragraph; + } + } + if (endnotes.length == endnote_ref_count) { + import std.outbuffer; + writeln("endnote ref count: ", endnote_ref_count); + writeln("number of binary endnotes: ", endnotes.length); + int endnote_count = -1; + auto buffer = new OutBuffer(); + foreach (content; contents) { /+ loop to inline endnotes +/ + content = replaceAll!(m => "~{ " ~ endnotes[++endnote_count] ~ " }~" ~ m["tail"] ) + (content, rgx_endnote_ref); + buffer.write(content ~ "\n\n"); + } + if (buffer) { + try { + string dir_out = "converted_output_"; + string path_and_file_out = dir_out ~ "/" ~ filename; + dir_out.mkdirRecurse; + auto f = File(path_and_file_out, "w"); + f.write(buffer); + writeln("wrote: ", path_and_file_out); + } catch (FileException ex) { + writeln("did not write file"); + // Handle errors + } + } + } else { + writeln("ERROR binary endnote mismatch, check markup,\nmisatch in the number of endnotes & endnote references!"); + writeln(" number of endnotes: ", endnotes.length); + writeln(" number of endnote refs: ", endnote_ref_count); // endnote_refs.length, + } + // assert(endnotes.length == endnote_ref_count); + } catch (ErrnoException ex) { + switch(ex.errno) { + case EPERM: + case EACCES: // Permission denied + break; + case ENOENT: // File does not exist + break; + default: // Handle other errors + break; + } + } + } + } +} diff --git a/sundry/util/d/tools/markup_conversion/markup_changes_header_and_content.d b/sundry/util/d/tools/markup_conversion/markup_changes_header_and_content.d new file mode 100755 index 0000000..86792ff --- /dev/null +++ b/sundry/util/d/tools/markup_conversion/markup_changes_header_and_content.d @@ -0,0 +1,244 @@ +#!/usr/bin/env rdmd +/+ + - read in file .sst .ssi .ssm + - loop twice + - first + - check for and skip code blocks + - use unique code marker for endnote markers in text and give an endnote + number ★1, increment + - extract all endnotes in array + - second + - check that the footnote marker number count matches the number of notes + in the array + - if they match either: + - substitute each endnote marker with the array footnote[number-1] + - substitute each endnote marker with footnote + as inlined footnote markup (footnote number not needed) + - if they do not match exit + - check whether changes have been made + - if so write file with inline footnotes in sub-directory converted_output_/ + using the same name as the original file + - else, exit ++/ +import std.stdio; +import std.file; +import std.array : split; +import std.exception; +// import std.range; +import core.stdc.errno; +import std.regex; +import std.format; +import std.conv; +void main(string[] args) { + static heading_a = ctRegex!(`^:?[A][~] `, "m"); + static comment = ctRegex!(`^%+ `); + static block_tic_code_open = ctRegex!("^`{3} code(?:[.](?P[a-z][0-9a-z#+_]+))?(?:[(](?P[ a-zA-Z0-9;:,]*)[)])?"); + static block_tic_close = ctRegex!("^(`{3})$","m"); + static block_curly_code_open = ctRegex!(`^(?:code(?:[.](?P[a-z][0-9a-z_]+))?(?:[(](?P[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`); + static block_curly_code_close = ctRegex!(`^([}]code)`); + auto rgx_endnote_ref = ctRegex!(`([~]\^)(?P[)\]]? |$)`, "gm"); + auto rgx_endnote = ctRegex!(`^\^~\s+(.+|\n)`, "gm"); + char[][] header0Content1(in string src_text) { // cast(char[]) + /+ split string on _first_ match of "^:?A~\s" into [header, content] array/tuple +/ + char[][] header_and_content; + auto m = (cast(char[]) src_text).matchFirst(heading_a); + header_and_content ~= m.pre; + header_and_content ~= m.hit ~ m.post; + assert(header_and_content.length == 2, + "document markup is broken, header body split == " + ~ header_and_content.length.to!string + ~ "; (header / body array split should == 2 (split is on level A~))" + ); + return header_and_content; + } + foreach(arg; args[1..$]) { + if ( + !(arg.match(regex(r"--\w+"))) + && arg.match(regex(r"\w+?\.ss[itm]")) + ) { + writeln(arg); + string filename = arg; + try { + string[] munged_header, munged_contents, munged_endnotes, endnote_refs; + string text = filename.readText; + char[][] hc = header0Content1(text); + char[] src_header = hc[0]; + string[] headers = src_header.to!string.split("\n\n"); + char[] src_txt = hc[1]; + string[] paragraphs = src_txt.to!string.split("\n\n"); + int endnote_ref_count = 0; + int[string] type = [ + "curly_code" : 0, + "tic_code" : 0, + ]; + string _tmp_header; + foreach (h_; headers) { /+ loop to inline endnotes +/ + _tmp_header = ""; + if (h_.match(regex(r"^[@\[]?title[:\]]?"))) { // title + if (auto m = h_.match(regex(r"^@title:(?:\s+(?P.+)|$)"))) { // sisu bespoke markup + if (m.captures["c"].length == 0) { + _tmp_header ~= "title:"; + } else { + _tmp_header ~= "title:\n main: " ~ "\"" ~ m.captures["c"] ~ "\""; + } + } else if (auto m = h_.match(regex(r"^title\s*=\s*(?P.+)"))) { // toml? + if (m.captures["c"].length == 0) { + _tmp_header ~= "title:"; + } else { + _tmp_header ~= "title:\n main: " ~ "\"" ~ m.captures["c"] ~ "\""; + } + } else if (auto m = h_.match(regex(r"^\[title\]"))) { // toml markup + _tmp_header ~= "title:"; + } else if (auto m = h_.match(regex(r"^title(?:\s+(?P.+)|\s+\\$)"))) { // sdlang markup + if (m.captures["c"].length == 0) { + _tmp_header ~= "title:"; + } else { + _tmp_header ~= "title:\n main: " ~ "\"" ~ m.captures["c"] ~ "\""; + } + } + if (h_.match(regex(r"^\s*[:]?(?:main)[:= ]?", "m"))) { + if (auto m = h_.match(regex(r"^\s+(?P:main):(?:\s+(?P.+)|$)", "m"))) { // sisu bespoke markup + _tmp_header ~= " main: " ~ "\"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^\s*(?Pmain)\s*=\s*(?P.+)", "m"))) { // toml? + _tmp_header ~= " main: " ~ m.captures["c"]; + } else if (auto m = h_.match(regex(r"^\s+(?Pmain)(?:\s*\s*(?P.+)|$)", "m"))) { // toml markup + _tmp_header ~= " main: " ~ "\"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^\s+(?Pmain)(?:\s+(?P.+)|\s+\\$)", "m"))) { // sdlang markup + _tmp_header ~= " main: " ~ "\"" ~ m.captures["c"] ~ "\""; + } + } + if (h_.match(regex(r"^\s*[:]?(?:sub(title)?)[:= ]?", "m"))) { + if (auto m = h_.match(regex(r"^\s+:sub(?:title)?:(?:\s+(?P.+)|$)", "m"))) { // sisu bespoke markup + _tmp_header ~= " subtitle: " ~ "\"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^\s*sub(?:title)?\s*=\s*(?P.+)$", "m"))) { // toml? + _tmp_header ~= " subtitle: " ~ m.captures["c"]; + } else if (auto m = h_.match(regex(r"^\s+(?:title)?(?:\s*\s*(?P.+)|$)", "m"))) { // toml markup + _tmp_header ~= " subtitle: " ~ "\"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^\s+(?:title)?(?:\s+(?P.+)|\s+\\$)", "m"))) { // sdlang markup + _tmp_header ~= " subtitle: " ~ "\"" ~ m.captures["c"] ~ "\""; + } + } + } + if (h_.match(regex(r"^[@\[]?rights[:\]]?"))) { // rights + if (auto m = h_.match(regex(r"^@rights:[ ]+(?P.+)$"))) { // sisu bespoke markup + _tmp_header ~= "rights: \n copyright: \"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^@rights:"))) { // sisu bespoke markup + _tmp_header ~= "rights:"; + } else if (auto m = h_.match(regex(r"^\[rights\]", "m"))) { // toml markup + _tmp_header ~= "rights:"; + } else if (auto m = h_.match(regex(r"^rights:"))) { // sdlang markup + _tmp_header ~= "rights:"; + } + if (h_.match(regex(r"^\s*[:]?copyright[:= ]?", "m"))) { + if (auto m = h_.match(regex(r"^\s+:copyright:(?:\s+(?P.+)|$)", "m"))) { // sisu bespoke markup + _tmp_header ~= " copyright: " ~ "\"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^\s*copyright\s*=\s*(?P.+)", "m"))) { // toml? + _tmp_header ~= " copyright: " ~ m.captures["c"]; + } else if (auto m = h_.match(regex(r"^\s+copyright(?:\s*\s*(?P.+)|$)", "m"))) { // toml markup + _tmp_header ~= " copyright: " ~ "\"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^\s+copyright(?:\s+(?P.+)|\s+\\$)", "m"))) { // sdlang markup + _tmp_header ~= " copyright: " ~ "\"" ~ m.captures["c"] ~ "\""; + } + } + if (h_.match(regex(r"^\s*[:]?licen[cs]e[:= ]?", "m"))) { + if (auto m = h_.match(regex(r"^\s+:licen[cs]e:(?:\s+(?P.+)|$)", "m"))) { // sisu bespoke markup + _tmp_header ~= " license: " ~ "\"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^\s*licen[cs]e\s*=\s*(?P.+)$", "m"))) { // toml? + _tmp_header ~= " license: " ~ m.captures["c"]; + } else if (auto m = h_.match(regex(r"^\s+licen[cs]e(?:\s*\s*(?P.+)|$)", "m"))) { // toml markup + _tmp_header ~= " license: " ~ "\"" ~ m.captures["c"] ~ "\""; + } else if (auto m = h_.match(regex(r"^\s+licen[cs]e(?:\s+(?P.+)|\s+\\$)", "m"))) { // sdlang markup + _tmp_header ~= " license: " ~ "\"" ~ m.captures["c"] ~ "\""; + } + } + } + if (_tmp_header.length > 0) { + munged_header ~= _tmp_header; + } else { + munged_header ~= h_; + } + } + writeln(munged_header); + foreach (paragraph; paragraphs) { /+ loop to gather binary endnotes +/ + if ( !( type["curly_code"] == 1 || type["tic_code"] == 1) + && paragraph.match(rgx_endnote) + ) { + munged_endnotes ~= replaceAll!(m => m[1]) + (paragraph, rgx_endnote); + } else { + if ( type["curly_code"] == 1 || type["tic_code"] == 1 + || paragraph.matchFirst(block_curly_code_open) + || paragraph.matchFirst(block_tic_code_open) + ) { /+ code blocks identified, no munging +/ + if ( type["curly_code"] == 1 + && paragraph.matchFirst(block_curly_code_close) + ) { + type["curly_code"] = 0; + } else if (type["tic_code"] == 1 + && paragraph.matchFirst(block_tic_close) + ) { + type["tic_code"] = 0; + } else if (paragraph.matchFirst(block_curly_code_open)) { + type["curly_code"] = 1; + } else if (paragraph.matchFirst(block_tic_code_open)) { + type["tic_code"] = 1; + } + munged_contents ~= paragraph; + } else { /+ regular content, not a code block +/ + if (auto m = paragraph.matchAll(rgx_endnote_ref)) { + foreach (n; m) { + endnote_ref_count++; // endnote_refs ~= (n.captures[1]); + } + } + paragraph = replaceAll!(m => " \\\\ " ) + (paragraph, regex(r"\s*<(?:/\s*|:)?br>\s*")); // (paragraph, regex(r"(
)")); + munged_contents ~= paragraph; + } + } + } + { + import std.outbuffer; + auto buffer = new OutBuffer(); + foreach (header; munged_header) { /+ loop to inline endnotes +/ + buffer.write(header ~ "\n\n"); + } + if (munged_endnotes.length == endnote_ref_count) { + int endnote_count = -1; + foreach (content; munged_contents) { /+ loop to inline endnotes +/ + content = replaceAll!(m => "~{ " ~ munged_endnotes[++endnote_count] ~ " }~" ~ m["tail"] ) + (content, rgx_endnote_ref); // endnote_ref cannot occur in a code block or else fail + buffer.write(content ~ "\n\n"); + } + if (buffer) { + try { + string dir_out = "converted_output_"; + string path_and_file_out = dir_out ~ "/" ~ filename; + dir_out.mkdirRecurse; + auto f = File(path_and_file_out, "w"); + f.write(buffer); + // writeln("wrote: ", path_and_file_out); + } catch (FileException ex) { + writeln("did not write file"); + // Handle errors + } + } + } else { + foreach (content; munged_contents) { /+ loop to inline endnotes +/ + buffer.write(content ~ "\n\n"); + } + } + } + } catch (ErrnoException ex) { + switch(ex.errno) { + case EPERM: + case EACCES: // Permission denied + break; + case ENOENT: // File does not exist + break; + default: // Handle other errors + break; + } + } + } + } +} diff --git a/sundry/util/d/tools/markup_conversion/markup_conversion_from_sisu_ruby_to_sisu_spine.d b/sundry/util/d/tools/markup_conversion/markup_conversion_from_sisu_ruby_to_sisu_spine.d new file mode 100755 index 0000000..0ec541d --- /dev/null +++ b/sundry/util/d/tools/markup_conversion/markup_conversion_from_sisu_ruby_to_sisu_spine.d @@ -0,0 +1,367 @@ +#!/usr/bin/env rdmd +/+ + - read in file .sst .ssi .ssm + - loop twice + - first + - check for and skip code blocks + - use unique code marker for endnote markers in text and give an endnote + number ★1, increment + - extract all endnotes in array + - second + - check that the footnote marker number count matches the number of notes + in the array + - if they match either: + - substitute each endnote marker with the array footnote[number-1] + - substitute each endnote marker with footnote + as inlined footnote markup (footnote number not needed) + - if they do not match exit + - check whether changes have been made + - if so write file with inline footnotes in sub-directory converted_output_/ + using the same name as the original file + - else, exit ++/ +import std.stdio; +import std.file; +import std.array : split, join; +import std.exception; +// import std.range; +import core.stdc.errno; +import std.regex; +import std.format; +import std.conv; +void main(string[] args) { + static heading_a = ctRegex!(`^:?[A][~] `, "m"); + static comment = ctRegex!(`^%+ `); + static block_tic_code_open = ctRegex!("^`{3} code(?:[.](?P[a-z][0-9a-z#+_]+))?(?:[(](?P[ a-zA-Z0-9;:,]*)[)])?"); + static block_tic_close = ctRegex!("^(`{3})$","m"); + static block_curly_code_open = ctRegex!(`^(?:code(?:[.](?P[a-z][0-9a-z_]+))?(?:[(](?P[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`); + static block_curly_code_close = ctRegex!(`^([}]code)`); + auto rgx_endnote_ref = ctRegex!(`([~]\^)(?P[)\]]? |$)`, "gm"); + auto rgx_endnote = ctRegex!(`^\^~\s+(.+|\n)`, "gm"); + char[][] header0Content1(in string src_text) { // cast(char[]) + /+ split string on _first_ match of "^:?A~\s" into [header, content] array/tuple +/ + char[][] header_and_content; + auto m = (cast(char[]) src_text).matchFirst(heading_a); + header_and_content ~= m.pre; + header_and_content ~= m.hit ~ m.post; + assert(header_and_content.length == 2, + "document markup is broken, header body split == " + ~ header_and_content.length.to!string + ~ "; (header / body array split should == 2 (split is on level A~))" + ); + return header_and_content; + } + string format_body_string(string s) { + string o; + o = s + .replaceAll(regex("^<(?:/[ ]*)?br>[ ]*"), " \\\\ ") + .replaceAll(regex("[ ]*<(?:/[ ]*)?br>$"), " \\\\") + .replaceAll(regex("[ ]*<(?:/[ ]*)?br>[ ]*"), " \\\\ "); + return o; + } + string format_header_string(string s) { + string o; + o = s + .replaceAll(regex("\""), "\\\"") + .replaceAll(regex("[ ]*<(?:/[ ]*)?br>$"), " \\\\") + .replaceAll(regex("[ ]*<(?:/[ ]*)?br>[ ]*"), " \\\\ "); + return o; + } + string format_main_header(string hm, string hs = "", string c = "") { + string o; + if (c.length == 0) { + o ~= hm ~ ":\n"; + } else { + o ~= hm ~ ":\n" + ~ " " ~ hs ~ ": " + ~ "\"" ~ format_header_string(c) ~ "\"\n"; + } + return o; + } + string format_sub_header(string hs, string c) { + string o; + o ~= " " ~ hs ~ ": " + ~ "\"" ~ format_header_string(c) ~ "\"\n"; + return o; + } + foreach(arg; args[1..$]) { + if ( + !(arg.match(regex(r"--\w+"))) + && arg.match(regex(r"\w+?\.ss[itm]")) + ) { + writeln(arg); + string filename = arg; + try { + string[] munged_header, munged_contents, munged_endnotes, endnote_refs; + char[][] hc; + char[] src_header; + string[] headers; + char[] src_txt; + string[] paragraphs; + enum codeBlock { off, curly, tic, } + string _tmp_header; + int endnote_ref_count = 0; + int code_block_status = codeBlock.off; + string text = filename.readText; + if (arg.match(regex(r"\w+?\.ss[tm]"))) { + hc = header0Content1(text); + src_header = hc[0]; + headers = src_header.to!string.split("\n\n"); + src_txt = hc[1]; + paragraphs = src_txt.to!string.split("\n\n"); + } else if (arg.match(regex(r"\w+?\.ssi"))) { + headers = []; + paragraphs = text.split("\n\n"); + } + if (headers.length > 0) { + headers[0] = headers[0].replaceFirst(regex(r"^%\s+SiSU.+", "i"), "# SiSU 8.0 spine (auto-conversion)"); + foreach (h_; headers) { + _tmp_header = ""; + if (auto m = h_.match(regex(r"^%\s*", "m"))) { + h_ = h_.replaceAll(regex(r"^%\s*", "m"), "# ") ~ "\n"; + } + if (h_.match(regex(r"^@title:|@subtitle"))) { + if (auto m = h_.match(regex(r"^@(?Ptitle):(?:[ ]+(?P.+)|\n)"))) { + _tmp_header ~= format_main_header(m.captures["h"], "main", m.captures["c"]); + } + if (auto m = h_.match(regex(r"^@(?Psubtitle):(?:[ ]+(?P.+)|$)"))) { + if (m.captures["c"].length == 0) { + } else { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + } + if (auto m = h_.match(regex(r"^\s+:(?Pmain):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:sub(?:title)?:(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header("subtitle", m.captures["c"]); + } + } else if (h_.match(regex(r"^@creator:|@author:"))) { + if (auto m = h_.match(regex(r"^(?:@creator:|@author:)(?:[ ]+(?P.+)|\n)"))) { + _tmp_header ~= format_main_header("creator", "author", m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pauthor):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + } else if (h_.match(regex(r"^@rights:"))) { + if (auto m = h_.match(regex(r"^@(?Prights):(?:[ ]+(?P.+)|\n)"))) { + _tmp_header ~= format_main_header(m.captures["h"], "copyright", m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pcopyright):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:licen[cs]e:(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header("license", m.captures["c"]); + } + } else if (h_.match(regex(r"^@date:|@date\."))) { + if (auto m = h_.match(regex(r"^@(?Pdate):(?:[ ]+(?P.+)|\n)"))) { + _tmp_header ~= format_main_header(m.captures["h"], "published", m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Ppublished):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pavailable):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pmodified):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pcreated):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pissued):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pvalid):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^@date\.(?Pavailable):[ ]+(?P.+)$"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^@date\.(?Pmodified):[ ]+(?P.+)$"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^@date\.(?Pcreated):[ ]+(?P.+)$"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^@date\.(?Pissued):[ ]+(?P.+)$"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^@date\.(?Pvalid):[ ]+(?P.+)$"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + } else if (h_.match(regex(r"^@classify:"))) { + if (auto m = h_.match(regex(r"^@classify:"))) { + _tmp_header ~= "classify:\n"; + } + if (auto m = h_.match(regex(r"^\s+:(?Ptopic_register):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:type:(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= "# type: " ~ "\"" ~ m.captures["c"] ~ "\"\n"; + } + } else if (h_.match(regex(r"^(?:@identifier:|@identify:)"))) { + if (auto m = h_.match(regex(r"^(?:@identifier:|@idenfify)"))) { + _tmp_header ~= "identify:\n"; + } + if (auto m = h_.match(regex(r"^\s+:(?Poclc):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pisbn):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pdewey):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + } else if (h_.match(regex(r"^@publisher:"))) { + if (auto m = h_.match(regex(r"^@publisher:[ ]+(?P.+)$"))) { + _tmp_header ~= "publisher: " ~ "\"" ~ m.captures["c"] ~ "\"\n"; + } + } else if (h_.match(regex(r"^@make:"))) { + // writeln(h_); + if (auto m = h_.match(regex(r"^@make:"))) { + _tmp_header ~= "make:\n"; + } + if (auto m = h_.match(regex(r"^\s+:(?Pbreaks):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pnum_top):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pheadings):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pitalics):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pbold):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pemphasis):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Psubstitute):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Ptexpdf_font):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Phome_button_text):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Phome_button_image):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pcover_image):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + if (auto m = h_.match(regex(r"^\s+:(?Pfooter):(?:[ ]+(?P.+)|$)", "m"))) { + _tmp_header ~= format_sub_header(m.captures["h"], m.captures["c"]); + } + // writeln(_tmp_header); + } else if (h_.match(regex(r"^@\w+:"))) { + _tmp_header ~= "# " ~ h_.split("\n").join("\n# ") ~ "\n"; + } else if (h_.match(regex(r"^\s+:\w+:", "m"))) { + if (auto m = h_.match(regex(r"^(?P\s+:\w+:.*)"))) { + _tmp_header ~= "# " ~ m.captures["g"] ~ "\n"; + } + } + if (h_.match(regex(r"^#", "m"))) { + if (auto m = h_.match(regex(r"^(?P#.*)", "m"))) { + _tmp_header ~= m.captures["g"] ~ "\n"; + } + } + if (_tmp_header.length > 0) { + munged_header ~= _tmp_header.split("\n\n"); + } else if (h_.length > 0) { + writeln("munging required: ", h_); + h_ = h_.replaceAll((regex(r"\n\n\n+", "m")), "\n\n"); + munged_header ~= h_; + } + } + // writeln(munged_header.join("\n")); + } + foreach (paragraph; paragraphs) { /+ loop to gather binary endnotes +/ + if (code_block_status == codeBlock.off + && paragraph.match(rgx_endnote) + ) { + munged_endnotes ~= replaceAll!(m => m[1]) + (paragraph, rgx_endnote); + } else { + if ( code_block_status != codeBlock.off + || paragraph.matchFirst(block_curly_code_open) + || paragraph.matchFirst(block_tic_code_open) + ) { /+ code blocks identified, no munging +/ + if ((code_block_status == codeBlock.curly + && paragraph.matchFirst(block_curly_code_close)) + || (code_block_status == codeBlock.tic + && paragraph.matchFirst(block_tic_close)) + ) { + code_block_status = codeBlock.off; + } else if (paragraph.matchFirst(block_curly_code_open)) { + code_block_status = codeBlock.curly; + } else if (paragraph.matchFirst(block_tic_code_open)) { + code_block_status = codeBlock.tic; + } + munged_contents ~= paragraph; + } else { /+ regular content, not a code block +/ + if (auto m = paragraph.matchAll(rgx_endnote_ref)) { + foreach (n; m) { + endnote_ref_count++; // endnote_refs ~= (n.captures[1]); + } + } + paragraph = format_body_string(paragraph); + // paragraph = replaceAll!(m => " \\\\ " ) + // (paragraph, regex(r"\s*<(?:/\s*|:)?br>\s*")); // (paragraph, regex(r"(
)")); + munged_contents ~= paragraph; + } + } + } + { + import std.outbuffer; + auto buffer = new OutBuffer(); + if (munged_header.length > 0) { + foreach (header; munged_header) { /+ loop to inline endnotes +/ + buffer.write(header ~ "\n"); + } + } + if (munged_endnotes.length == endnote_ref_count) { + int endnote_count = -1; + foreach (k, content; munged_contents) { /+ loop to inline endnotes +/ + content = replaceAll!(m => "~{ " ~ munged_endnotes[++endnote_count] ~ " }~" ~ m["tail"] ) + (content, rgx_endnote_ref); // endnote_ref cannot occur in a code block or else fail + buffer.write(content ~ ((k == munged_contents.length - 1) ? "" : "\n\n")); + } + if (buffer) { + try { + string dir_out = "converted_output_"; + string path_and_file_out = dir_out ~ "/" ~ filename; + dir_out.mkdirRecurse; + auto f = File(path_and_file_out, "w"); + f.write(buffer); + // writeln("wrote: ", path_and_file_out); + } catch (FileException ex) { + writeln("did not write file"); + // Handle errors + } + } + } else { + foreach (content; munged_contents) { /+ loop to inline endnotes +/ + buffer.write(content ~ "\n\n"); + } + } + } + } catch (ErrnoException ex) { + switch(ex.errno) { + case EPERM: + case EACCES: // Permission denied + break; + case ENOENT: // File does not exist + break; + default: // Handle other errors + break; + } + } + } + } +} diff --git a/sundry/util/rb/cgi/spine.search.cgi b/sundry/util/rb/cgi/spine.search.cgi new file mode 100755 index 0000000..36f109d --- /dev/null +++ b/sundry/util/rb/cgi/spine.search.cgi @@ -0,0 +1,952 @@ +#!/usr/bin/env ruby +=begin + * Name: SiSU information Structuring Universe + * Author: Ralph Amissah + * https://sisudoc.org + * https://git.sisudoc.org + + * Description: generates naive cgi search form for search of sisu database (sqlite) + * Name: SiSU generated sample cgi search form + + * Description: generated sample cgi search form for SiSU + (SiSU is a framework for document structuring, publishing and search) + + * Author: Ralph Amissah + + * Copyright: (C) 1997 - 2014, Ralph Amissah, All Rights Reserved. + + * License: GPL 3 or later: + + SiSU, a framework for document structuring, publishing and search + + Copyright (C) Ralph Amissah + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see . + + If you have Internet connection, the latest version of the GPL should be + available at these locations: + + + + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system + + * Homepages: + + + * Ralph Amissah + + + +=end +begin + require 'cgi' + require 'fcgi' + require 'sqlite3' +rescue LoadError + puts 'cgi, fcgi or sqlite3 NOT FOUND (LoadError)' +end +@stub_default = 'search' +@image_src = "https://#{ENV['HTTP_HOST']}/image_sys" +@hosturl_cgi = "https://#{ENV['HTTP_HOST']}#{ENV['PATH_INFO']}" +@hosturl_files = "https://#{ENV['HTTP_HOST']}" +@output_dir_structure_by = 'language' +@lingual = 'multi' +@db_name_prefix = 'spine.' +@base = "https://#{ENV['HTTP_HOST']}#{ENV['PATH_INFO']}#{ENV['SCRIPT_NAME']}" +#Common TOP +@@offset = 0 +@@canned_search_url = @base +@color_heading = '#DDFFAA' +@color_match = '#ffff48' +class Form + def initialize(base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can='') + search_note = '' if checked_searched !~ /\S/ + the_can = '' if checked_url !~ /\S/ + search_field = '' if checked_echo !~ /\S/ + @base,@search_field,@selected_db,@result_type,@checked_sql_limit,@checked_tip,@checked_stats,@checked_searched,@checked_url,@checked_case,@checked_echo,@checked_sql,@checked_all,@checked_none,@checked_selected,@checked_default,@search_note,@the_can=base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can + @tip = if checked_tip =~ /\S/ + 'text:__; fulltxt:__; keywords:__; title:__; author:__; topic_register:__; subject:__; description:__; publisher:__; editor:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; src_filename_base:__;
' + else '' + end + end +def submission_form + search_form =<<-WOK + + + + + <meta charset="utf-8"> + <meta name="sourcefile" content="SiSU._sst" /> + SiSU search form (sample): SiSU information Structuring Universe + + + + + + + + + +
+ + +
+
+ SiSU + +
+ git + +
+
+ +
+

+ + +
+ + + #{@tip} + #{@search_note} + #{@the_can} +
+
+ + + + to search: select which database to search (drop-down menu below); enter your search query (in the form above); and click on the search button (below) +
+ + + index + text / grep +
+ match limit: + 1,000 + 2,500 +
+ echo query + result stats + search url + searched + available fields + sql statement +
+ checks: + default + selected + all + none +
+
+ + WOK + end +end +class SearchRequest #% search_for + attr_accessor :text1,:fulltext,:keywords,:title,:author,:topic_register,:subject,:description,:publisher,:editor,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:src_filename_base + def initialize(search_field='',q='') + @search_field,@q=search_field,q + @text1=@fulltext=@keywords=@title=@author=@topic_register=@subject=@description=@publisher=@editor=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@comment=@abstract=@owner=@date_created=@date_issued=@date_modified=@date_available=@date_valid=@filename='' + if @search_field=~/\S/ + @text1 = text_to_match('text:') + @fulltext = text_to_match('fulltxt:') + @topic_register = text_to_match('topic_register:') + @title = text_to_match('title:') # DublinCore 1 - title + @author = text_to_match('(?:author|creator)s?:') # DublinCore 2 - creator/author + @subject = text_to_match('subj(?:ect)?:') # DublinCore 3 - subject + @description = text_to_match('description:') # DublinCore 4 - description + @publisher = text_to_match('pub(?:lisher)?:') # DublinCore 5 - publisher + @editor = text_to_match('editor:') + @contributor = text_to_match('contributor:') # DublinCore 6 - contributor + @date = text_to_match('date:') # DublinCore 7 - date dd-mm-yy + @type = text_to_match('type:') # DublinCore 8 - type + @format = text_to_match('format:') # DublinCore 9 - format + @identifier = text_to_match('identifier:') # DublinCore 10 - identifier + @source = text_to_match('source:') # DublinCore 11 - source + @language = text_to_match('language:') # DublinCore 12 - language + @relation = text_to_match('relation:') # DublinCore 13 - relation + @coverage = text_to_match('coverage:') # DublinCore 14 - coverage + @rights = text_to_match('rights:') # DublinCore 15 - rights + @keywords = text_to_match('key(?:words?)?:') + @comment = text_to_match('comment:') + @abstract = text_to_match('abs(?:tract)?:') + @owner = text_to_match('owner:') + @date_created = text_to_match('date_created:') + @date_issued = text_to_match('date_issued:') + @date_modified = text_to_match('date_modified:') + @date_available = text_to_match('date_available:') + @date_valid = text_to_match('date_valid:') + @filename = text_to_match('src_filename_base:') + @text1 = text_to_match unless @keywords or @author or @title or @text1 or @fulltext or @comment or @abstract or @rights or @subject or @publisher or @date or @filename or @topic_register + else + @text1 = q['s1'] if q['s1'] =~ /\S/ + @fulltext = q['ft'] if q['ft'] =~ /\S/ + @keywords = q['key'] if q['key'] =~ /\S/ + @title = q['ti'] if q['ti'] =~ /\S/ + @author = q['au'] if q['au'] =~ /\S/ + @topic_register = q['tr'] if q['tr'] =~ /\S/ + @subject = q['sj'] if q['sj'] =~ /\S/ + @description = q['dsc'] if q['dsc'] =~ /\S/ + @publisher = q['pb'] if q['pb'] =~ /\S/ + @editor = q['cntr'] if q['cntr'] =~ /\S/ + @contributor = q['cntr'] if q['cntr'] =~ /\S/ + @date = q['dt'] if q['dt'] =~ /\S/ + @type = q['ty'] if q['ty'] =~ /\S/ + @identifier = q['id'] if q['id'] =~ /\S/ + @source = q['src'] if q['src'] =~ /\S/ + @language = q['lang'] if q['lang'] =~ /\S/ + @relation = q['rel'] if q['rel'] =~ /\S/ + @coverage = q['cov'] if q['cov'] =~ /\S/ + @rights = q['cr'] if q['cr'] =~ /\S/ + @comment = q['co'] if q['co'] =~ /\S/ + @abstract = q['ab'] if q['ab'] =~ /\S/ + @date_created = q['dtc'] if q['dtc'] =~ /\S/ + @date_issued = q['dti'] if q['dti'] =~ /\S/ + @date_modified = q['dtm'] if q['dtm'] =~ /\S/ + @date_available = q['dta'] if q['dta'] =~ /\S/ + @date_valid = q['dtv'] if q['dtv'] =~ /\S/ + @filename = if q['doc'] and q['search'] !~ /search db/ then q['doc'] + elsif q['fns'] =~ /\S/ then q['fns'] + end + @@limit = q['ltd'] if q['ltd'] =~ /\d+/ # 1000 + @@offset = q['off'] if q['off'] =~ /\d+/ # 0 + end + end +def text_to_match(identifier='') + m={ + string: /#{identifier}\s*(.+?)/, + string: /#{identifier}\s*(.+?)(?:;|\n|\r|$)/, + word: /#{identifier}[\s(]*(\S+)/ + } + search_string=if @search_field =~m[:word] + search_string=if @search_field =~m[:braces] then m[:braces].match(@search_field)[1] + elsif @search_field =~m[:string] then m[:string].match(@search_field)[1] + else + str=m[:word].match(@search_field)[1] + str=str.gsub(/[()]/,'') + str + end + search_string=search_string.strip.gsub(/\s+/,'+') + #else + # "__" + end + end +end +class DBI_SearchString + def initialize(l,t,q,cse=false) + @l,@t,@q=l,t,q + end + def string + search={ search: [], flag: false } + if @t =~/\S+/ or @q =~/\S+/ + if @t =~/\S+/ then unescaped_search=CGI.unescape(@t) + elsif @q =~/\S+/ then unescaped_search=CGI.unescape(@q) + end + search_construct=[] + unescaped_search=unescaped_search.gsub(/\s*(AND|OR)\s*/,"%' \) \\1 #{@l} LIKE \( '%"). + gsub(/(.+)/,"#{@l} LIKE \( '%\\1%' \)") + search_construct << unescaped_search + search_construct=search_construct.join(' ') + search[:search] << search_construct + search[:flag]=true + search + end + search + end +end +class DBI_SearchStatement + attr_reader :text_search_flag,:sql_select_body_format,:sql_offset,:sql_limit + def initialize(conn,search_for,q,c) + @conn=conn + @text_search_flag=false + @sql_statement={ body: '', endnotes: '', range: '' } + #@offset||=@@offset + #@offset+=@@limit + search={ text: [], endnotes: [] } + cse=(c =~/\S/) ? true : false + st=DBI_SearchString.new('doc_objects.clean',search_for.text1,q['s1'],cse).string + se=DBI_SearchString.new('endnotes.clean',search_for.text1,q['s1'],cse).string + @text_search_flag=st[:flag] + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.fulltext',search_for.fulltext,q['ft'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.title',search_for.title,q['ti'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.creator_author',search_for.author,q['au'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.classify_topic_register',search_for.topic_register,q['tr'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.classify_subject',search_for.subject,q['sj'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.classify_keywords',search_for.keywords,q['key'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.notes_description',search_for.description,q['dsc'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.publisher',search_for.publisher,q['pb'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.creator_editor',search_for.editor,q['cntr'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.creator_contributor',search_for.contributor,q['cntr'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.date_published',search_for.date,q['dt'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.notes_type',search_for.type,q['ty'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.original_source',search_for.source,q['src'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.language_document_char',search_for.language,q['lang'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.notes_relation',search_for.relation,q['rel'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.notes_coverage',search_for.coverage,q['cov'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.rights_all',search_for.rights,q['cr'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.notes_comment',search_for.comment,q['co'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.notes_abstract',search_for.abstract,q['ab'],cse).string + if st[:flag] + search[:text] << st[:search] + end + st = DBI_SearchString.new('metadata_and_text.src_filename_base',search_for.src_filename_base,q['fns'],cse).string + if st[:flag] + search[:text] << st[:search] + end + @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000 + @@offset=q['off'] if q['off']=~/\d+/ # 0 + @search_text='' + @search_text=search[:text].flatten.join(' AND ') + @search_text=@search_text.gsub(/(doc_objects\.clean\s+LIKE\s+\(\s*'%[^']+%'\s*\)\s+(?:(?:AND|OR)\s+doc_objects\.clean\s+LIKE\s+\(\s*'%[^']+%'\s*\))+)/,'(\1)') + end +def sql_offset + @@offset +end +def sql_match_limit + @@limit +end +def sql_canned_search + @offset_next=sql_offset.to_i + sql_match_limit.to_i + @offset_previous=sql_offset.to_i - sql_match_limit.to_i + def current + @@canned_search_url.to_s + '<d=' + sql_match_limit.to_s + '&off=' + sql_offset.to_s + end + def next + @@canned_search_url.to_s + '<d=' + sql_match_limit.to_s + '&off=' + @offset_next.to_s + end + def previous + @offset_previous >= 0 \ + ? (@@canned_search_url.to_s + '<d=' + sql_match_limit.to_s + '&off=' + @offset_previous.to_s) + : '' + end + def start + @@canned_search_url.to_s + '<d=' + sql_match_limit.to_s + '&off=' + 0.to_s + end + self +end +def pre_next(beyond_limit,img) + can=sql_canned_search + page=(sql_offset.to_i + sql_match_limit.to_i)/sql_match_limit.to_i + if beyond_limit + if page.to_s =~ /^1$/ + %{
+ pg. #{page.to_s} + +  >> + +
} + elsif page.to_s =~ /^2$/ + %{
+ + <<  + + pg. #{page.to_s} + +  >> + +
} + else + %{
+ + |<  + + + <<  + + pg. #{page.to_s} + +  >> + +
} + end + else + if page.to_s =~ /^1$/ then '' + elsif page.to_s =~ /^2$/ + %{
+ + <<  + + pg. #{page.to_s} +
} + else + %{
+ + |<  + + + <<  + + pg. #{page.to_s} +
} + end + end +end +def sql_select_body + limit ||= @@limit + offset ||= @@offset + @sql_statement[:body] = %{ + SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename_base, metadata_and_text.language_document_char, metadata_and_text.notes_suffix, doc_objects.body, doc_objects.seg_name, doc_objects.ocn, metadata_and_text.uid + FROM doc_objects, metadata_and_text + WHERE #{@search_text} AND doc_objects.uid_metadata_and_text = metadata_and_text.uid + ORDER BY metadata_and_text.language_document_char, metadata_and_text.title, metadata_and_text.src_filename_base, doc_objects.ocn + } + @sql_statement[:range] = %{LIMIT #{limit} OFFSET #{offset} ;} + select = @sql_statement[:body] + ' ' + @sql_statement[:range] + select + end + def sql_select_body_format + %{#{sql_select_body}} + end + def contents + @conn.execute(sql_select_body) + end +end +def tail + <<-'WOK' +


+ + + + + + +
+ + +
+
+ SiSU + +
+ git + +
+
+ +

+ Generated by + SiSU 6.3.1 2014-10-19 (2014w41/7) +
+ + SiSU © Ralph Amissah + 1993, current 2014. + All Rights Reserved. +
+ SiSU is software for document structuring, publishing and search, +
+ + www.sisudoc.org + + sources + + git.sisudoc.org + +
+ w3 since October 3 1993 + + ralph@amissah.com + +
+ mailing list subscription + + https://lists.sisudoc.org/listinfo/sisu + +
+ + sisu@lists.sisudoc.org + +

+
+

+ SiSU using: +
Standard SiSU markup syntax, +
Standard SiSU meta-markup syntax, and the +
Standard SiSU object citation numbering and system, (object/text identifying/locating system) +
+ © Ralph Amissah 1997, current 2014. + All Rights Reserved. +

+
+

+ + .: + +

+
+

+ SiSU is released under + GPL v3 + or later, + + https://www.gnu.org/licenses/gpl.html + +

+
+

+ SiSU, developed using + + Ruby + + on + + Debian/Gnu/Linux + + software infrastructure, + with the usual GPL (or OSS) suspects. +

+
+ + + WOK +end +@tail=tail +@counter_txt_doc,@counter_txt_ocn,@counter_endn_doc,@counter_endn_ocn=0,0,0,0 +@counters_txt,@counters_endn,@sql_select_body='','','' +FCGI.each_cgi do |cgi| + begin # all code goes in begin section + @search={ text: [], endnotes: [] } + q=CGI.new + @db=if cgi['db'] =~ /#{@db_name_prefix}(\S+)/ + @stub=$1 + cgi['db'] + else + @stub=@stub_default + @db_name_prefix + @stub + end + checked_url,checked_stats,checked_searched,checked_tip,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,selected_db='','','','','','','','','' + result_type=(cgi['view']=~/text/) \ + ? result_type={ index: '', text: 'checked'} + : result_type={ index: 'checked', text: ''} + @@limit=if cgi['sql_match_limit'].to_s=~/2500/ + checked_sql_limit={ l1000: '', l2500: 'checked'} + '2500' + else + checked_sql_limit={ l1000: 'checked', l2500: ''} + '1000' + end + checked_echo = 'checked' if cgi['echo'] =~/\S/ + checked_stats = 'checked' if cgi['stats'] =~/\S/ + checked_url = 'checked' if cgi['url'] =~/\S/ or cgi['u'].to_i==1 + checked_searched = 'checked' if cgi['searched'] =~/\S/ + checked_tip = 'checked' if cgi['tip'] =~/\S/ + checked_case = 'checked' if cgi['casesense'] =~/\S/ + checked_sql = 'checked' if cgi['sql'] =~/\S/ + if cgi['checks'] =~ /check_all/ or cgi['check_all'] =~/\S/ or cgi['a'].to_i==1 + checked_all = 'checked' + checked_echo=checked_stats=checked_url=checked_searched=checked_tip=checked_sql='checked' + checked_none ='' + elsif cgi['checks'] =~ /check_none/ + checked_none = 'checked' + checked_all=checked_url=checked_stats=checked_searched=checked_tip=checked_echo=checked_sql='' + elsif cgi['checks'] =~ /check_selected/ + checked_selected = 'checked' + elsif cgi['checks'] =~ /check_default/ + checked_default = 'checked' + checked_echo=checked_stats=checked_url='checked' + checked_searched=checked_tip=checked_case=checked_sql='' + else + checked_selected='checked' + checked_echo=checked_stats=checked_url='checked' + checked_searched=checked_tip=checked_case=checked_sql='' + end + selected_db=case cgi['db'] + when /spine.sqlite/ then '' + end + db_name='spine.search.sql.db' + #db_name='spine.sqlite.db' + #db_name='sisu_sqlite.db' + db_sqlite=case cgi['db'] + when /spine.sqlite/ then "/srv/complete.sisudoc.org/web/manual/#{db_name}" + else "/var/www/sqlite/#{db_name}" + end + #when /spine.sqlite/ then "/srv/complete.sisudoc.org/web/manual/#{db_name}" + #else "/srv/complete.sisudoc.org/web/manual/#{db_name}" + #end + #@conn=SQLite3::Database.new(db_sqlite) + @conn=SQLite3::Database.new("/var/www/sqlite/spine.search.sql.db") + #@conn=SQLite3::Database.new("/var/www/spine.sqlite.db") + @conn.results_as_hash=true + search_field=cgi['find'] if cgi['find'] # =~/\S+/ + @search_for=SearchRequest.new(search_field,q) #.analyze #% search_for + #% searches +#Canned_search.new(@base,@search_for.text1,cgi) + if @search_for.text1=~/\S+/ or @search_for.fulltext=~/\S+/ or @search_for.author=~/\S+/ or @search_for.topic_register=~/\S+/ #and search_field =~/\S/ + s1 = 's1=' + CGI.escape(@search_for.text1) if @search_for.text1 =~ /\S/ + ft = '&ft=' + CGI.escape(@search_for.fulltext) if @search_for.fulltext =~ /\S/ + key = 'key=' + CGI.escape(@search_for.keywords) if @search_for.keywords =~ /\S/ + ti = '&ti=' + CGI.escape(@search_for.title) if @search_for.title =~ /\S/ + au = '&au=' + CGI.escape(@search_for.author) if @search_for.author =~ /\S/ + tr = '&tr=' + CGI.escape(@search_for.topic_register) if @search_for.topic_register =~ /\S/ + sj = '&sj=' + CGI.escape(@search_for.subject) if @search_for.subject =~ /\S/ + dsc = '&dsc=' + CGI.escape(@search_for.description) if @search_for.description =~ /\S/ + pb = '&pb=' + CGI.escape(@search_for.publisher) if @search_for.publisher =~ /\S/ + edt = '&edt=' + CGI.escape(@search_for.editor) if @search_for.editor =~ /\S/ + cntr = '&cntr=' + CGI.escape(@search_for.contributor) if @search_for.contributor =~ /\S/ + dt = '&dt=' + CGI.escape(@search_for.date) if @search_for.date =~ /\S/ + ty = '&ty=' + CGI.escape(@search_for.type) if @search_for.type =~ /\S/ + id = '&id=' + CGI.escape(@search_for.identifier) if @search_for.identifier =~ /\S/ + src = '&src=' + CGI.escape(@search_for.source) if @search_for.source =~ /\S/ + lang = '&lang=' + CGI.escape(@search_for.language) if @search_for.language =~ /\S/ + rel = '&rel=' + CGI.escape(@search_for.relation) if @search_for.relation =~ /\S/ + cov = '&cov=' + CGI.escape(@search_for.coverage) if @search_for.coverage =~ /\S/ + cr = '&cr=' + CGI.escape(@search_for.rights) if @search_for.rights =~ /\S/ + co = '&co=' + CGI.escape(@search_for.comment) if @search_for.comment =~ /\S/ + ab = '&ab=' + CGI.escape(@search_for.abstract) if @search_for.abstract =~ /\S/ + dtc = '&dtc=' + CGI.escape(@search_for.date_created) if @search_for.date_created =~ /\S/ + dti = '&dti=' + CGI.escape(@search_for.date_issued) if @search_for.date_issued =~ /\S/ + dtm = '&dtm=' + CGI.escape(@search_for.date_modified) if @search_for.date_modified =~ /\S/ + dta = '&dta=' + CGI.escape(@search_for.date_available) if @search_for.date_available =~ /\S/ + dtv = '&dtv=' + CGI.escape(@search_for.date_valid) if @search_for.date_valid =~ /\S/ + fns = '&fns=' + CGI.escape(@search_for.src_filename_base) if @search_for.src_filename_base =~ /\S/ + @@canned_search_url=(checked_all =~/checked/) \ + ? "#{@base}?#{s1}#{ft}#{key}#{ti}#{au}#{tr}#{sj}#{dsc}#{pb}#{edt}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}&a=1" + : "#{@base}?#{s1}#{ft}#{key}#{ti}#{au}#{tr}#{sj}#{dsc}#{pb}#{edt}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}" + mod=ft=~/\S+/ ? (ft.gsub(/ft/,'s1')) : s1 + @canned_base_url="#{@base}?#{mod}&db=#{cgi['db']}" + if checked_case=~/\S/ + @search[:text][1]=%{doc_objects.clean~'#{@search_for.text1}'} #s1 + else + @search[:text][1]=%{doc_objects.clean~*'#{@search_for.text1}'} #s1 + end + canned_note='search url:' + else + @@canned_search_url="#{@base}?db=#{@db}&view=index" + canned_note='search url example:' + end + if search_field =~/\S+/ + analyze_format=search_field.gsub(/\s*\n/,'; ') + elsif checked_all =~/checked/ or checked_url =~/checked/ + canned_search=@@canned_search_url.scan(/(?:s1|ft|au|ti|fns|tr)=[^&]+/) + af=canned_search.join('; ') + af=af.gsub(/s1=/,'text: '). + gsub(/ft=/,'fulltxt: '). + gsub(/au=/,'author: '). + gsub(/ti=/,'title: '). + gsub(/fns=/,'src_filename_base: '). + gsub(/tr=/,'topic_register: '). + gsub(/%2B/,' ') + analyze_format=af + st=af.split(/\s*;\s*/) + search_field=st.join("\n") + end + green=%{} + canned_search_url_txt=CGI.escapeHTML(@@canned_search_url) + the_can=%{#{canned_note} #{canned_search_url_txt}
} + p_text=p_fulltext=p_keywords=p_title=p_author=p_topic_register=p_subject=p_description=p_publisher=p_editor=p_contributor=p_date=p_type=p_format=p_identifier=p_source=p_language=p_relation=p_coverage=p_rights=p_comment=p_abstract=p_filename='' + p_filename = %{src_filename_base: #{green}#{@search_for.src_filename_base}

} if @search_for.src_filename_base =~ /\S+/ + p_text = %{text: #{green}#{@search_for.text1}
} if @search_for.text1 =~ /\S+/ + p_fulltext = %{fulltxt: #{green}#{@search_for.fulltext}
} if @search_for.fulltext =~ /\S+/ + p_title = %{title: #{green}#{@search_for.title}
} if @search_for.title =~ /\S+/ + p_author = %{author: #{green}#{@search_for.author}
} if @search_for.author =~ /\S+/ + p_editor = %{editor: #{green}#{@search_for.editor}
} if @search_for.editor =~ /\S+/ + p_contributor = %{contributor: #{green}#{@search_for.contributor}
} if @search_for.contributor =~ /\S+/ + p_date = %{date: #{green}#{@search_for.date}
} if @search_for.date =~ /\S+/ + p_rights = %{rights: #{green}#{@search_for.rights}
} if @search_for.rights =~ /\S+/ + p_topic_register = %{topic_register: #{green}#{@search_for.topic_register}
} if @search_for.topic_register =~ /\S+/ + p_subject = %{subject: #{green}#{@search_for.subject}
} if @search_for.subject =~ /\S+/ + p_keywords = %{keywords: #{green}#{@search_for.keywords}
} if @search_for.keywords =~ /\S+/ + p_identifier = %{identifier: #{green}#{@search_for.identifier}
} if @search_for.identifier =~ /\S+/ + p_type = %{type: #{green}#{@search_for.type}
} if @search_for.type =~ /\S+/ + p_format = %{format: #{green}#{@search_for.format}
} if @search_for.format =~ /\S+/ + p_relation = %{relation: #{green}#{@search_for.relation}
} if @search_for.relation =~ /\S+/ + p_coverage = %{coverage: #{green}#{@search_for.coverage}
} if @search_for.coverage =~ /\S+/ + p_description = %{description: #{green}#{@search_for.description}
} if @search_for.description =~ /\S+/ + p_abstract = %{abstract: #{green}#{@search_for.abstract}
} if @search_for.abstract =~ /\S+/ + p_comment = %{comment: #{green}#{@search_for.comment}
} if @search_for.comment =~ /\S+/ + p_publisher = %{publisher: #{green}#{@search_for.publisher}
} if @search_for.publisher =~ /\S+/ + p_source = %{source: #{green}#{@search_for.source}
} if @search_for.source =~ /\S+/ + p_language = %{language: #{green}#{@search_for.language}
} if @search_for.language =~ /\S+/ + search_note=<<-WOK + + database: #{green}#{@db}; selected view: #{green}#{cgi['view']} + search string: "#{green}#{analyze_format}"
+ #{p_text} #{p_fulltext} #{p_keywords} #{p_title} #{p_author} #{p_topic_register} #{p_subject} #{p_description} #{p_publisher} #{p_editor} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} #{p_filename} + + WOK +#eg = %{canned search e.g.:
#{url}
find: #{analyze}
database: #{database}} +#% dbi_canning +@header = Form.new(@base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can).submission_form #% form +unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/ + print "Content-type: text/html\n\n" + puts (@header+@tail) +else #% searches + s1=(@search_for.text1 =~/\S/) \ + ? @search_for.text1 + : 'Unavailable' + if checked_case=~/\S/ + @search[:text]<<%{doc_objects.clean~'#{CGI.unescape(s1)}'} + else + @search[:text]<<%{doc_objects.clean~*'#{CGI.unescape(s1)}'} + end + #% dbi_request + dbi_statement=DBI_SearchStatement.new(@conn,@search_for,q,checked_case) + @text_search_flag=false + @text_search_flag=dbi_statement.text_search_flag + s_contents=dbi_statement.contents + @body_main='' + @search_regx=nil + olduid="" + if @text_search_flag + if checked_sql =~/\S/ + sql_select_body=dbi_statement.sql_select_body_format + else sql_select_body='' + end + @body_main << sql_select_body + #@body_main << '



Main Text:
' << sql_select_body + else + end + @hostpath = "#{@hosturl_files}" + #@hostpath="#{@hosturl_files}/#{@stub}" + def path_manifest(fn,ln=nil) + case @output_dir_structure_by + when 'filename' + @lingual =='mono' \ + ? "#{@hostpath}/#{fn}/sisu_manifest.html" + : "#{@hostpath}/#{fn}/sisu_manifest.#{ln}.html" + when 'filetype' + @lingual =='mono' \ + ? "#{@hostpath}/manifest/#{fn}.html" + : "#{@hostpath}/manifest/#{fn}.#{ln}.html" + else + "#{@hostpath}/#{ln}/manifest/#{fn}.html" + end + end + def path_html_seg(fn,ln=nil) + case @output_dir_structure_by + when 'filename' + "#{@hostpath}/#{fn}" + when 'filetype' + "#{@hostpath}/html/#{fn}" + else + "#{@hostpath}/#{ln}/html/#{fn}" + end + end + def path_toc(fn,ln=nil) + if @output_dir_structure_by =='filename' \ + or @output_dir_structure_by =='filetype' + @lingual =='mono' \ + ? "#{path_html_seg(fn,ln)}/toc.html" + : "#{path_html_seg(fn,ln)}/toc.#{ln}.html" + else + "#{path_html_seg(fn,ln)}/toc.html" + end + end + def path_filename(fn,seg_name,ln=nil) + if @output_dir_structure_by =='filename' \ + or @output_dir_structure_by =='filetype' + @lingual =='mono' \ + ? "#{path_html_seg(fn,ln)}/#{seg_name}.html" + : "#{path_html_seg(fn,ln)}/#{seg_name}.#{ln}.html" + else + "#{path_html_seg(fn,ln)}/#{seg_name}.html" + end + end + def path_html_doc(fn,ln=nil) + case @output_dir_structure_by + when 'filename' + @lingual =='mono' \ + ? "#{path_html_seg(fn,ln)}/scroll.html" + : "#{path_html_seg(fn,ln)}/scroll.#{ln}.html" + when 'filetype' + @lingual =='mono' \ + ? "#{@hostpath}/html/#{fn}.html" + : "#{@hostpath}/html/#{fn}.#{ln}.html" + else + "#{@hostpath}/#{ln}/html/#{fn}.html" + end + end +#% text_objects_body +s_contents.each do |c| #% text body + location=c['src_filename_base'][/(.+?)\.(?:ssm\.sst|sst)$/,1] + file_suffix=c['src_filename_base'][/.+?\.(ssm\.sst|sst)$/,1] + lang=if location =~ /\S+?~(\S\S\S?)$/ + l=location[/\S+?~(\S\S\S?)$/,1] + location=location.gsub(/(\S+?)~\S\S\S?/,'\1') + l=".#{l}" + else '' + end +#% metadata_found_body + if c['uid'] != olduid + ti=c['title'] + can_txt_srch=(cgi['view']=~/index/) \ + ? %{search } + : %{search } + title = %{ #{ti} [#{c['language_document_char']}] by #{c['creator_author']} #{can_txt_srch}
} + title=@text_search_flag \ + ? '

'+title + : '
'+title + @counter_txt_doc+=1 + olduid=c['uid'] + else title='' + end + if @text_search_flag + if cgi['view']=~/text/ \ + or (cgi['view']!~/index/ and cgi['search'] !~/search db/) #% txt body + text=if c['suffix'] !~/1/ #seg + if @search_for.text1 =~/\S+/ \ + or q['s1'] =~/\S+/ #% only this branch is working !! + unescaped_search=if @search_for.text1 =~/\S+/ + CGI.unescape(@search_for.text1) + elsif q['s1'] =~/\S+/ + CGI.unescape(q['s1']) + else nil + end + @search_regx=if unescaped_search #check + search_regex=[] + build=unescaped_search.scan(/\S+/).each do |g| + (g.to_s =~/(AND|OR)/) \ + ? (search_regex << '|') + : (search_regex << %{#{g.to_s}}) + end + search_regex=search_regex.join(' ') + search_regex=search_regex.gsub(/\s*\|\s*/,'|') + Regexp.new(search_regex, Regexp::IGNORECASE) + else nil + end + else nil + end + matched_para=(@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) \ + ? (c['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#{@search_regx})/mi,%{\\1})) + : c['body'] + %{

ocn #{c['ocn']}:

#{matched_para}} + elsif c['suffix'] =~/1/ #doc + %{#{title}

ocn #{c['ocn']}:#{c['body']}} + end + @counter_txt_ocn+=1 + output=title+text + else #elsif cgi['view']=~/index/ #% idx body + if c['suffix'] !~/1/ #seg + index=%{#{c['ocn']}, } if @text_search_flag + elsif c['suffix'] =~/1/ #doc #FIX + index=%{#{c['ocn']}, } + end + if c['seg_name'] =~/\S+/ + if @text_search_flag + @counter_txt_ocn+=1 + output=title+index + end + else + @counter_txt_ocn+=1 + output=c['suffix'] !~/1/ \ + ? title+index + : %{#{title}#{c['ocn'].sort}, } + end + end + else output=title + end + @counters_txt=if @counter_txt_doc > 0 + if checked_stats =~/\S/ + @@lt_t=(@counter_txt_ocn==dbi_statement.sql_match_limit.to_i) ? true : false + start=(@@offset.to_i+1).to_s + range=(@@offset.to_i+@counter_txt_ocn.to_i).to_s + %{


Found #{@counter_txt_ocn} times in the main body of #{@counter_txt_doc} documents [ matches #{start} to #{range} ]
} + else '' + end + else '' + end + @body_main << output #+ details +end +olduid = "" + offset=dbi_statement.sql_offset.to_s + limit=dbi_statement.sql_match_limit.to_s + @@lt_t ||=false; @@lt_e ||=false + canned=(@@lt_t or @@lt_e) \ + ? dbi_statement.pre_next(true,@image_src).to_s + : dbi_statement.pre_next(false,@image_src).to_s + limit=dbi_statement.sql_match_limit.to_s + cgi.out{ + @header.force_encoding("UTF-8") \ + + @counters_txt.force_encoding("UTF-8") \ + + @counters_endn.force_encoding("UTF-8") \ + + canned.force_encoding("UTF-8") \ + + @body_main.force_encoding("UTF-8") \ + + canned.force_encoding("UTF-8") \ + + @tail.force_encoding("UTF-8") + } #% print cgi_output_header+counters+body + end + rescue Exception => e + s='
' + CGI::escapeHTML(e.backtrace.reverse.join("\n"))
+    s << CGI::escapeHTML(e.message) + '
' + cgi.out{s} + next + ensure # eg. disconnect from server + @conn.disconnect if @conn + end +end -- cgit v1.2.3