diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2021-08-12 13:14:49 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2021-08-20 12:03:17 -0400 |
commit | 24269204508d8cf8f963eb9c7d149d18840e4dad (patch) | |
tree | c94ac0fdab5496fa4969098604ffcfaa87c18678 | |
parent | configuration reorganized into config files (diff) |
config, clean up and make a bit more consistent
- check version settings with:
rg -A2 _version_set$ org
30 files changed, 481 insertions, 386 deletions
diff --git a/.envrc-local_ b/.envrc-local_ index 11de339..2139454 100644 --- a/.envrc-local_ +++ b/.envrc-local_ @@ -109,8 +109,7 @@ $SpineBIN/spine --verbose --dark --pod --epub --html --html-link-harvest --harve #+END_SRC ** sequential tasks - -*** sqlite db (shared) - create db +*** sqlite db (shared) - create db #+BEGIN_SRC sh $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned" @@ -129,7 +129,7 @@ - Copyright: (C) 2008 - 2021 Adam D. Ruppe - - code: cgi.d (copy in ./misc/ext_lib/src/arsd/) + - code: cgi.d (copy in ./sundry/spine_search_cgi/src/ext_depends_cgi/arsd) aria2c https://raw.githubusercontent.com/adamdruppe/arsd/master/cgi.d - License: BSL-1.0 @@ -95,18 +95,18 @@ default: digest: "sha256" webserv: http: "http" - domain: "localhost" + host: "localhost" data_http: "http" - data_domain: "localhost" + data_host: "localhost" data_root_url: "http://localhost" data_root_path: "/var/www/html" data_root_part: "" images_root_part: "image" - cgi_title: "≅ SiSU Spine search" + cgi_search_form_title: "≅ SiSU Spine search" cgi_http: "http" - cgi_domain: "localhost" + cgi_host: "localhost" cgi_bin_url: "http://localhost/cgi-bin" - cgi_bin_part: "cgi-bin" + cgi_bin_subpath: "/cgi-bin" cgi_bin_path: "/usr/lib/cgi-bin" cgi_search_script: "spine-search" cgi_search_script_raw_fn_d: "spine_search.d" diff --git a/doc/man/man1/spine.1 b/doc/man/man1/spine.1 index 723d14a..64a916a 100644 --- a/doc/man/man1/spine.1 +++ b/doc/man/man1/spine.1 @@ -494,18 +494,18 @@ default: digest: "sha256" webserv: http: "http" - domain: "localhost" + host: "localhost" data_http: "http" - data_domain: "localhost" + data_host: "localhost" data_root_url: "http://localhost" data_root_path: "/var/www/html" data_root_part: "" images_root_part: "image" - cgi_title: "≅ SiSU Spine search" + cgi_search_form_title: "≅ SiSU Spine search" cgi_http: "http" - cgi_domain: "localhost" + cgi_host: "localhost" cgi_bin_url: "http://localhost/cgi-bin" - cgi_bin_part: "cgi-bin" + cgi_bin_subpath: "/cgi-bin" cgi_bin_path: "/usr/lib/cgi-bin" cgi_search_script: "spine-search" cgi_search_script_raw_fn_d: "spine_search.d" diff --git a/org/cgi_spine_search.org b/org/cgi_spine_search.org index b695783..0a1b244 100644 --- a/org/cgi_spine_search.org +++ b/org/cgi_spine_search.org @@ -35,7 +35,7 @@ struct Version { ** set program version VERSION :version:set:project: -#+NAME: spine_version_current_set +#+NAME: spine_version_set #+BEGIN_SRC d enum _ver = Version(0, 11, 3); #+END_SRC @@ -78,7 +78,8 @@ version (Posix) { void cgi_function_intro(Cgi cgi) { mixin(import("configuration.txt")); <<spine_search_init_1>> - <<spine_search_config>> + <<spine_search_config_struct_init>> + <<spine_search_config_struct_set>> <<spine_search_cgi_val>> cv.db_selected = _cfg.db_sqlite_filename; auto text_fields() { @@ -240,29 +241,13 @@ string search_note; // = ""; uint sql_match_offset_count = 0; #+END_SRC -**** config +**** config struct see: cfte_configuation.org -#+NAME: spine_search_config -#+BEGIN_SRC d -<<spine_search_config_struct>> -auto conf = Config(); -conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type); -conf.http_host = environment.get("SERVER_NAME", _cfg.http_host); -// conf.http_host = environment.get("HTTP_HOST", _cfg.http_host); -conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root); -conf.doc_collection_sub_root = "<<doc_subroot_path>>"; // (output_path - web_doc_root_path) -conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath); -conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename); -conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ "/" ~ conf.cgi_script_name ~ "?"; -conf.query_string = environment.get("QUERY_STRING", ""); -conf.http_url = environment.get("HTTP_REFERER", conf.query_base_url ~ conf.query_string); -conf.request_method = environment.get("REQUEST_METHOD", "POST"); -conf.db_path = _cfg.db_sqlite_path; -#+END_SRC +***** init config struct -#+NAME: spine_search_config_struct +#+NAME: spine_search_config_struct_init #+BEGIN_SRC d struct Config { string http_request_type; @@ -272,6 +257,8 @@ struct Config { string doc_collection_sub_root; string cgi_root; string cgi_script_name; + string cgi_search_form_title; + string cgi_search_form_html_title; string data_path_html; string http_url; string query_base_url; @@ -281,6 +268,32 @@ struct Config { } #+END_SRC +***** SET config struct + +#+NAME: spine_search_config_struct_set +#+BEGIN_SRC d +auto conf = Config(); +conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type); +conf.http_host = environment.get("SERVER_NAME", _cfg.http_host); +// conf.http_host = environment.get("HTTP_HOST", _cfg.http_host); +conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root); +conf.doc_collection_sub_root = "<<doc_subroot_path>>"; // (output_path - web_doc_root_path) +conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath); +conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename); +conf.cgi_search_form_title = _cfg.cgi_search_form_title; // ≅ SiSU spine search form +conf.cgi_search_form_html_title = "<a href=\"" + ~ conf.http_request_type ~ "://" + ~ conf.http_host + ~ "\">" + ~ _cfg.cgi_search_form_title + ~ "</a>"; +conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ "/" ~ conf.cgi_script_name ~ "?"; +conf.query_string = environment.get("QUERY_STRING", ""); +conf.http_url = environment.get("HTTP_REFERER", conf.query_base_url ~ conf.query_string); +conf.request_method = environment.get("REQUEST_METHOD", "POST"); +conf.db_path = _cfg.db_sqlite_path; +#+END_SRC + **** cgi val #+NAME: spine_search_cgi_val @@ -723,7 +736,7 @@ return _previous_next; <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title> - ≅ SiSU spine search form + %s </title> <meta name="sourcefile" content="SiSU.sst"> <link rel="generator" href="sisudoc.org"> @@ -734,6 +747,7 @@ return _previous_next; </head> <body lang="en" xml:lang="en"> ┃", + conf.cgi_search_form_title, conf.http_request_type, conf.http_host, ); @@ -748,14 +762,16 @@ return _previous_next; <tr><td width="20%%"> <table summary="home button / home information" border="0" cellpadding="2" cellspacing="0"> <tr><td align="left"> - ≅ SiSU spine search form + %s </td></tr> </table> </td> <td> </td></tr> </table> - ┃"); + ┃", + conf.cgi_search_form_html_title, + ); #+END_SRC **** post_value(string field_name, string type="box", string set="on") {} diff --git a/org/config_d_cfte.org b/org/config_d_cfte.org index 35f458e..9efa9ea 100644 --- a/org/config_d_cfte.org +++ b/org/config_d_cfte.org @@ -18,36 +18,32 @@ * cfte views version.txt configuration.txt (set version & configuration) SET -** program version -*** set program version tangle SET :version: +** program version: version.txt -#+HEADER: :tangle "../views/version.txt" -#+BEGIN_SRC txt -<<spine_version_struct>> -<<spine_version_current_set>> -<<spine_compiler_restrictions>> -#+END_SRC +*** set program version SET VERSION :version:set:project: -*** program version struct +- comma separated numbers: major, minor, patch -#+NAME: spine_version_struct +#+NAME: spine_version_set #+BEGIN_SRC d +0, 11, 3 +#+END_SRC + +*** set program version tangle :version: + +#+HEADER: :tangle "../views/version.txt" +#+BEGIN_SRC txt /+ obt - org-mode generated file +/ struct Version { int major; int minor; int patch; } +enum _ver = Version(<<spine_version_set>>); +<<spine_compiler_restrictions>> #+END_SRC -*** set program version VERSION :version:set:project: - -#+NAME: spine_version_current_set -#+BEGIN_SRC d -enum _ver = Version(0, 11, 3); -#+END_SRC - -** compilation restrictions (supported compilers) +*** compilation restrictions (supported compilers) - set compilation restrictions https://dlang.org/spec/version.html#predefined-versions @@ -66,28 +62,80 @@ version (Posix) { } #+END_SRC -** set configuration :configuration: -*** spine configuration.txt SET +** set configuration SET :configuration: +*** shared settings SET + +#+NAME: www_http +#+BEGIN_SRC sh +http +#+END_SRC + +#+NAME: www_host +#+BEGIN_SRC sh +localhost +#+END_SRC + +#+NAME: www_url_doc_root +#+BEGIN_SRC sh +http://localhost +#+END_SRC + +#+NAME: www_doc_root +#+BEGIN_SRC sh +/srv/www/spine/static +#+END_SRC + +#+NAME: cgi_bin_root +#+BEGIN_SRC sh +/var/www/cgi/cgi-bin +#+END_SRC + +#+NAME: db_sqlite_path +#+BEGIN_SRC sh +/var/www/sqlite +#+END_SRC + +#+NAME: cgi_filename +#+BEGIN_SRC sh +spine_search +#+END_SRC + +#+NAME: cgi_bin_subpath +#+BEGIN_SRC sh +/cgi-bin +#+END_SRC + +#+NAME: cgi_search_form_title +#+BEGIN_SRC sh +≅ SiSU Spine search +#+END_SRC + +#+NAME: db_sqlite_filename +#+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 = "http"; - string www_doc_root = "/srv/www/spine/static"; // "/var/www/html" - string www_domain = "localhost"; - string www_domain_doc_root = "localhost"; - string www_url_doc_root = "http://localhost"; - string cgi_bin_root = "/var/www/cgi/cgi-bin/"; // "/usr/lib/cgi-bin" - string cgi_bin_part = "cgi-bin"; - string cgi_filename = "spine_search"; // "spine-search" - string cgi_url_root = "http://localhost/cgi-bin"; + string www_http = "<<www_http>>"; + string www_host = "<<www_host>>"; + string www_url_doc_root = "<<www_url_doc_root>>"; + string www_doc_root = "<<www_doc_root>>"; + string www_host_doc_root = "localhost"; + string cgi_bin_root = "<<cgi_bin_root>>"; + string cgi_bin_subpath = "<<cgi_bin_subpath>>"; + string cgi_filename = "<<cgi_filename>>"; + string cgi_url_root = "<<www_http>>://<<www_host>><<cgi_bin_subpath>>"; string cgi_port = ""; string cgi_user = ""; - string cgi_url_action = "http://localhost/cgi-bin/spine_search"; - string cgi_title = "≅ SiSU Spine search"; - string db_sqlite_path = "/var/www/sqlite/"; - string db_sqlite_filename = "spine.search.db"; + string cgi_url_action = "<<www_http>>://<<www_host>><<cgi_bin_subpath>>/<<cgi_filename>>"; + string cgi_search_form_title = "<<cgi_search_form_title>>"; + string db_sqlite_path = "<<db_sqlite_path>>"; + string db_sqlite_filename = "<<db_sqlite_filename>>"; string default_language = "en"; string default_papersize = "a4"; string default_text_wrap = "80"; @@ -96,21 +144,21 @@ struct Cfg { enum _cfg = Cfg(); #+END_SRC -*** spine_search configuration.txt SET +*** 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 = "http"; - string http_host = "localhost"; - string www_url_doc_root = "http://localhost"; - string www_doc_root = "/srv/www/spine/static"; // "/var/www/html" - string cgi_bin_root = "/var/www/cgi/cgi-bin/"; // "/usr/lib/cgi-bin" - string cgi_bin_subpath = "/cgi-bin"; - string cgi_filename = "spine_search"; // "spine-search" - string db_sqlite_path = "/var/www/sqlite"; - string db_sqlite_filename = "spine.search.db"; + string http_request_type = "<<www_http>>"; + string http_host = "<<www_host>>"; + string www_url_doc_root = "<<www_url_doc_root>>"; + string www_doc_root = "<<www_doc_root>>"; + string cgi_bin_subpath = "<<cgi_bin_subpath>>"; + string cgi_filename = "<<cgi_filename>>"; // "spine-search" + string cgi_search_form_title = "<<cgi_search_form_title>>"; + string db_sqlite_path = "<<db_sqlite_path>>"; + string db_sqlite_filename = "<<db_sqlite_filename>>"; } enum _cfg = Cfg(); #+END_SRC diff --git a/org/config_dub.org b/org/config_dub.org index faa0a43..406fa51 100644 --- a/org/config_dub.org +++ b/org/config_dub.org @@ -16,9 +16,9 @@ #+PROPERTY: header-args+ :padline no #+PROPERTY: header-args+ :mkdirp yes -** spine version VERSION :version:set:project: +** spine version SET VERSION :version:set:project: -#+NAME: version_spine +#+NAME: spine_version_set #+BEGIN_SRC sh 0.11.3 #+END_SRC @@ -51,7 +51,7 @@ ], "copyright": "Copyright © 2015 - 2021 Ralph Amissah", "name": "spine", - "version": "<<version_spine>>", + "version": "<<spine_version_set>>", "description": "a sisu like document parser", "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", @@ -158,7 +158,7 @@ ], "copyright": "Copyright © 2015 - 2021 Ralph Amissah", "name": "spine", - "version": "<<version_spine>>", + "version": "<<spine_version_set>>", "description": "a sisu like document parser", "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", @@ -273,7 +273,7 @@ ], "copyright": "Copyright © 2015 - 2021 Ralph Amissah", "name": "spine", - "version": "<<version_spine>>", + "version": "<<spine_version_set>>", "description": "a sisu like document parser", "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", @@ -544,7 +544,7 @@ configuration "build" { ], "copyright": "Copyright © 2015 - 2021 Ralph Amissah", "name": "spine_search", - "version": "0.11.3", + "version": "<<spine_version_set>>", "description": "cgi search for spine, a sisu like document parser", "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", @@ -574,9 +574,9 @@ configuration "build" { { "name": "arsd.cgi", "description": "cgi", - "homepage": "https://github.com/dlang-community/d2sqlite3", - "authors": [ "Aadam Ruppee" ], - "copyright": "Copyright 2011-18 Aadam Ruppee", + "homepage": "https://code.dlang.org/packages/arsd-official", + "authors": [ "Adam Ruppee" ], + "copyright": "Copyright 2011-18 Adam Ruppee", "license": "BSL-1.0", "sourcePaths": [ "./src/ext_depends_cgi/arsd" ], "configurations": [ @@ -713,9 +713,9 @@ toc ** dub REFERENCE *** SET version -#+NAME: version_dub +#+NAME: dub_version_set #+BEGIN_SRC nix -<<version_dub_next>> +<<dub_version_next>> #+END_SRC #+NAME: nix_sha_dub @@ -726,7 +726,7 @@ toc *** SELECT version **** dub 1.24.0 -#+NAME: version_dub_next +#+NAME: dub_version_next #+BEGIN_SRC nix 1.24.0 #+END_SRC @@ -738,7 +738,7 @@ toc **** dub 1.23.0 -#+NAME: version_dub_current +#+NAME: dub_version_current #+BEGIN_SRC nix 1.23.0 #+END_SRC @@ -758,7 +758,7 @@ assert dcompiler != null; stdenv.mkDerivation rec { pname = "dub"; - version = "<<version_dub>>"; + version = "<<dub_version_set>>"; enableParallelBuilding = true; diff --git a/org/config_make.org b/org/config_make.org index 2a2b0e5..e7aaeab 100644 --- a/org/config_make.org +++ b/org/config_make.org @@ -20,10 +20,10 @@ [[./spine_info.org][spine_info.org]] [[../org/][org/]] * spine -** version info VERSION :version:set:project: -*** project +** version info SET VERSION :version:set:project: +*** project SET VERSION -#+NAME: version_spine +#+NAME: spine_version_set #+BEGIN_SRC sh 0.11.3 #+END_SRC @@ -32,14 +32,14 @@ - meson -#+NAME: version_meson +#+NAME: meson_version_set #+BEGIN_SRC sh 0.46 #+END_SRC - soversion -#+NAME: version_soversion +#+NAME: soversion_version_set #+BEGIN_SRC sh 0 #+END_SRC @@ -279,8 +279,8 @@ gitArchive: #+NAME: make_version_tag #+BEGIN_SRC makefile version_tag: - echo "DRV=<<version_spine>>; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \ - echo "git tag -f doc-reform_v<<version_spine>> -m\"doc-reform spine-<<version_spine>>\" HEAD" + echo "DRV=<<spine_version_set>>; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \ + echo "git tag -f doc-reform_v<<spine_version_set>> -m\"doc-reform spine-<<spine_version_set>>\" HEAD" #+END_SRC **** changelog diff --git a/org/config_meson.org b/org/config_meson.org index 52cfa51..1366f8b 100644 --- a/org/config_meson.org +++ b/org/config_meson.org @@ -17,10 +17,10 @@ #+PROPERTY: header-args+ :mkdirp yes * spine -** version info VERSION :version:set:project: -*** project +** version info SET VERSION :version:set:project: +*** project SET VERSION -#+NAME: version_spine +#+NAME: spine_version_set #+BEGIN_SRC sh 0.11.3 #+END_SRC @@ -30,7 +30,7 @@ - d2sqlite3 https://code.dlang.org/packages/d2sqlite3 -#+NAME: version_d2sqlite3 +#+NAME: d2sqlite3_version_set #+BEGIN_SRC sh 0.19.1 #+END_SRC @@ -38,7 +38,7 @@ - imageformats https://code.dlang.org/packages/imageformats -#+NAME: version_imageformats +#+NAME: imageformats_version_set #+BEGIN_SRC sh 7.0.2 #+END_SRC @@ -46,7 +46,7 @@ - dyaml https://code.dlang.org/packages/dyaml -#+NAME: version_dyaml +#+NAME: dyaml_version_set #+BEGIN_SRC sh 0.8.3 #+END_SRC @@ -54,7 +54,7 @@ - tinyendian https://code.dlang.org/packages/tinyendian -#+NAME: version_tinyendian +#+NAME: tinyendian_version_set #+BEGIN_SRC sh 0.2.0 #+END_SRC @@ -63,14 +63,14 @@ - meson -#+NAME: version_meson +#+NAME: meson_version_set #+BEGIN_SRC sh 0.46 #+END_SRC - soversion -#+NAME: version_soversion +#+NAME: soversion_version_set #+BEGIN_SRC sh 0 #+END_SRC @@ -115,8 +115,8 @@ cat spine_sources.txt #+BEGIN_SRC sh project('spine', 'd', license: 'AGPL-3', - version: '<<version_spine>>', - meson_version: '>=<<version_meson>>' + version: '<<spine_version_set>>', + meson_version: '>=<<meson_version_set>>' ) #if meson.get_compiler('d').get_id() == 'gcc' # error('spine cannot be compiled with GDC at time. Sorry.') @@ -165,10 +165,10 @@ spine_src = [ source_root = meson.source_root() src_dir = include_directories('src/') # Dependencies -dep_tinyendian = dependency('tinyendian', version: '>= <<version_tinyendian>>', fallback: ['tinyendian', 'tinyendian_dep'], method: 'dub') -dep_dyaml = dependency('dyaml', version: '>= <<version_dyaml>>', fallback: ['dyaml', 'dyaml_dep'], method: 'dub') -dep_d2sqlite3 = dependency('d2sqlite3', version: '>= <<version_d2sqlite3>>', fallback: ['d2sqlite3', 'd2sqlite3_dep'], method: 'dub') -dep_imageformats = dependency('imageformats', version: '>= <<version_imageformats>>', fallback: ['imageformats', 'imageformats_dep'], method: 'dub') +dep_tinyendian = dependency('tinyendian', version: '>= <<tinyendian_version_set>>', fallback: ['tinyendian', 'tinyendian_dep'], method: 'dub') +dep_dyaml = dependency('dyaml', version: '>= <<dyaml_version_set>>', fallback: ['dyaml', 'dyaml_dep'], method: 'dub') +dep_d2sqlite3 = dependency('d2sqlite3', version: '>= <<d2sqlite3_version_set>>', fallback: ['d2sqlite3', 'd2sqlite3_dep'], method: 'dub') +dep_imageformats = dependency('imageformats', version: '>= <<imageformats_version_set>>', fallback: ['imageformats', 'imageformats_dep'], method: 'dub') # Executable spine_exe = executable('spine', [spine_src], @@ -229,12 +229,12 @@ revision = head #+HEADER: :NO-tangle ../subprojects/d2sqlite3.meson.build #+BEGIN_SRC sh project('d2sqlite3', 'd', - meson_version: '>=<<version_meson>>', + meson_version: '>=<<meson_version_set>>', license: 'BSL-1.0', - version: '<<version_d2sqlite3>>' + version: '<<d2sqlite3_version_set>>' ) -project_soversion = '<<version_soversion>>' +project_soversion = '<<soversion_version_set>>' src_dir = include_directories('source/') pkgc = import('pkgconfig') @@ -296,12 +296,12 @@ Upstream provides meson.build #+HEADER: :NO-tangle ../subprojects/D-YAML/meson.build #+BEGIN_SRC sh project('D-YAML', 'd', - meson_version: '>=<<version_meson>>', + meson_version: '>=<<meson_version_set>>', subproject_dir: 'contrib', - version: '<<version_dyaml>>' + version: '<<dyaml_version_set>>' ) -project_soversion = '<<version_soversion>>' +project_soversion = '<<soversion_version_set>>' src_dir = include_directories('source/') pkgc = import('pkgconfig') @@ -342,7 +342,7 @@ dyaml_src = [ ] install_subdir('source/dyaml', install_dir: 'include/d/yaml/') -tinyendian_dep = dependency('tinyendian', version: '>=<<version_tinyendian>>', fallback: ['tinyendian', 'tinyendian_dep']) +tinyendian_dep = dependency('tinyendian', version: '>=<<tinyendian_version_set>>', fallback: ['tinyendian', 'tinyendian_dep']) dyaml_lib = library('dyaml', [dyaml_src], @@ -383,12 +383,12 @@ revision = head #+HEADER: :NO-tangle ../subprojects/imageformats.meson.build #+BEGIN_SRC sh project('imageformats', 'd', - meson_version: '>=<<version_meson>>', + meson_version: '>=<<meson_version_set>>', license: 'BSL-1.0', - version: '<<version_imageformats>>' + version: '<<imageformats_version_set>>' ) -project_soversion = '<<version_soversion>>' +project_soversion = '<<soversion_version_set>>' src_dir = include_directories('.') pkgc = import('pkgconfig') @@ -446,8 +446,8 @@ Upstream provides meson.build project( 'tinyendian', 'd', - meson_version: '>=<<version_meson>>', - version: '<<version_tinyendian>>', + meson_version: '>=<<meson_version_set>>', + version: '<<tinyendian_version_set>>', default_options: ['buildtype=release'], ) diff --git a/org/config_nix.org b/org/config_nix.org index 7fec0f4..ff3d540 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -245,8 +245,7 @@ $SpineBIN/spine --verbose --dark --pod --epub --html --html-link-harvest --harve ,#+END_SRC ,** sequential tasks - -,*** sqlite db (shared) - create db +,*** sqlite db (shared) - create db ,#+BEGIN_SRC sh $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned" @@ -641,7 +640,7 @@ with ( ); mkDubDerivation rec { name = "spine-${version}"; - version = "<<version_spine>>"; + version = "<<spine_version_set>>"; src = ./.; buildInputs = [ pkgs.sqlite ( @@ -906,7 +905,7 @@ with ( ); mkDubDerivation rec { name = "spine-search-${version}"; - version = "0.11.3"; + version = "<<spine_version_set>>"; src = ./.; buildInputs = [ pkgs.sqlite ( @@ -1076,9 +1075,9 @@ echo "cat nix_note_.org" #+END_SRC ** variables -*** spine version VERSION :version:set:project: +*** spine version SET VERSION :version:set:project: -#+NAME: version_spine +#+NAME: spine_version_set #+BEGIN_SRC sh 0.11.3 #+END_SRC diff --git a/org/in_source_files.org b/org/in_source_files.org index d460566..db0f65e 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -69,55 +69,56 @@ template readConfigSite() { string config_file_str; string default_config_file_str = format(q"┃ flag: - act0: "--html" - act1: "--html --epub" + act0: "--html" + act1: "--html --epub" output: - path: "%s" + path: "%s" default: - language: "en" - papersize: "a4" - text_wrap: "80" - digest: "sha256" + language: "en" + papersize: "a4" + text_wrap: "80" + digest: "sha256" webserv: - http: "%s" - domain: "%s" - data_http: "%s" - data_domain: "%s" - data_root_url: "%s" - data_root_path: "%s" - data_root_part: "" - images_root_part: "image" - cgi_title: "%s" - cgi_http: "%s" - cgi_domain: "%s" - cgi_bin_url: "%s" - cgi_bin_part: "cgi-bin" - cgi_bin_path: "%s" - cgi_search_script: "%s" - cgi_port: "" - cgi_user: "" - cgi_action: "%s" - db_sqlite_path: "%s" - db_sqlite_filename: "%s" - db_pg_table: "" - db_pg_user: "" + http: "%s" + host: "%s" + data_http: "%s" + data_host: "%s" + data_root_url: "%s" + data_root_path: "%s" + data_root_part: "" + images_root_part: "image" + cgi_search_form_title: "%s" + cgi_http: "%s" + cgi_host: "%s" + cgi_bin_url: "%s" + cgi_bin_subpath: "%s" + cgi_bin_path: "%s" + cgi_search_script: "%s" + cgi_port: "" + cgi_user: "" + cgi_action: "%s" + db_sqlite_path: "%s" + db_sqlite_filename: "%s" + db_pg_table: "" + db_pg_user: "" ┃", - _cfg.www_doc_root, // doc root - _cfg.www_http, // http - _cfg.www_domain, // domain - _cfg.www_http, // data http - _cfg.www_domain, // data domain - _cfg.www_url_doc_root, // data root url - _cfg.www_doc_root, // data root path - _cfg.cgi_title, // cgi title - _cfg.www_http, // cgi http - _cfg.www_domain, // cgi domain - _cfg.cgi_url_root, // cgi bin url - _cfg.cgi_bin_root, // cgi bin path - _cfg.cgi_filename, // cgi filename - _cfg.cgi_url_action, // cgi action - _cfg.db_sqlite_path, // sqlite db path - _cfg.db_sqlite_filename, // sqlite db filename + _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_doc_root, // data root path + _cfg.cgi_search_form_title, // cgi title + _cfg.www_http, // cgi http + _cfg.www_host, // cgi host + _cfg.cgi_url_root, // cgi bin url + _cfg.cgi_bin_subpath, // cgi bin path + _cfg.cgi_bin_root, // cgi bin path + _cfg.cgi_filename, // cgi filename + _cfg.cgi_url_action, // cgi action + _cfg.db_sqlite_path, // sqlite db path + _cfg.db_sqlite_filename, // sqlite db filename ); foreach(conf_fn; [_conf_file_details.config_filename_site]) { foreach(pth; _conf_file_details.possible_config_path_locations.config_local_site) { diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index e162bcc..e9f770c 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -33,20 +33,19 @@ default: digest: "sha256" webserv: http: "http" - domain: "localhost" + host: "localhost" data_http: "http" - data_domain: "localhost" + data_host: "localhost" data_root_url: "http://localhost" data_root_path: "/var/www/html" data_root_part: "" images_root_part: "image" - cgi_title: "≅ SiSU Spine search" cgi_http: "http" - cgi_domain: "localhost" + cgi_host: "localhost" cgi_bin_url: "http://localhost/cgi-bin" - cgi_bin_part: "cgi-bin" + cgi_bin_subpath: "cgi-bin" cgi_bin_path: "/usr/lib/cgi-bin" - cgi_search_title: "≅ SiSU spine search form" + cgi_search_form_title: "≅ SiSU Spine search" cgi_search_script: "spine_search" cgi_search_script_raw_fn_d: "spine_search.d" cgi_port: "" @@ -263,19 +262,19 @@ struct ConfCompositeMakeInit { #+BEGIN_SRC d struct ConfCompositeSiteLocal { string w_srv_http; - string w_srv_domain; + string w_srv_host; string w_srv_data_http; // if not set same as webserv_http - string w_srv_data_domain; // if not set same as webserv_domain + string w_srv_data_host; // if not set same as webserv_host string w_srv_data_root_part; string w_srv_data_root_url; string w_srv_data_root_url_html; string w_srv_data_root_path; string w_srv_images_root_part; // string w_srv_url_doc_path; - string w_srv_cgi_title; + string w_srv_cgi_search_form_title; string w_srv_cgi_http; // if not set same as webserv_http - string w_srv_cgi_domain; // if not set same as webserv_domain - string w_srv_cgi_bin_part; + string w_srv_cgi_host; // if not set same as webserv_host + string w_srv_cgi_bin_subpath; string w_srv_cgi_bin_path; string w_srv_cgi_search_title; string w_srv_cgi_search_script; @@ -629,11 +628,11 @@ if ("webserv" in _yaml ) { _struct_composite.conf.w_srv_cgi_http = _yaml["webserv"]["cgi_http"].get!string; } - if ("domain" in _yaml["webserv"] - && _yaml["webserv"]["domain"].type.string - && _yaml["webserv"]["domain"].tag.match(rgx.yaml_tag_is_str) + if ("host" in _yaml["webserv"] + && _yaml["webserv"]["host"].type.string + && _yaml["webserv"]["host"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_domain = _yaml["webserv"]["domain"].get!string; + _struct_composite.conf.w_srv_host = _yaml["webserv"]["host"].get!string; } // if ("data_root_url" in _yaml["webserv"] // && _yaml["webserv"]["data_root_url"].type.string @@ -641,7 +640,7 @@ if ("webserv" in _yaml // ) { // _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string; // if (auto m = _struct_composite.conf.w_srv_data_root_url.match(rgx.webserv_url_doc_root)) { - // _struct_composite.conf.w_srv_url_domain = m.captures[2].to!string; + // _struct_composite.conf.w_srv_url_host = m.captures[2].to!string; // _struct_composite.conf.w_srv_url_doc_path = m.captures[3].to!string; // } // } @@ -679,25 +678,25 @@ if ("webserv" in _yaml ~ _manifested.src.language ~ "/" ~ "html"; } - if ("cgi_domain" in _yaml["webserv"] - && _yaml["webserv"]["cgi_domain"].type.string - && _yaml["webserv"]["cgi_domain"].tag.match(rgx.yaml_tag_is_str) + if ("cgi_host" in _yaml["webserv"] + && _yaml["webserv"]["cgi_host"].type.string + && _yaml["webserv"]["cgi_host"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_cgi_domain = _yaml["webserv"]["cgi_domain"].get!string; + _struct_composite.conf.w_srv_cgi_host = _yaml["webserv"]["cgi_host"].get!string; } else { // composite construct - _struct_composite.conf.w_srv_cgi_domain = _struct_composite.conf.w_srv_domain; + _struct_composite.conf.w_srv_cgi_host = _struct_composite.conf.w_srv_host; } - if ("cgi_title" in _yaml["webserv"] - && _yaml["webserv"]["cgi_title"].type.string - && _yaml["webserv"]["cgi_title"].tag.match(rgx.yaml_tag_is_str) + if ("cgi_search_form_title" in _yaml["webserv"] + && _yaml["webserv"]["cgi_search_form_title"].type.string + && _yaml["webserv"]["cgi_search_form_title"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_cgi_title = _yaml["webserv"]["cgi_title"].get!string; + _struct_composite.conf.w_srv_cgi_search_form_title = _yaml["webserv"]["cgi_search_form_title"].get!string; } - if ("cgi_bin_part" in _yaml["webserv"] - && _yaml["webserv"]["cgi_bin_part"].type.string - && _yaml["webserv"]["cgi_bin_part"].tag.match(rgx.yaml_tag_is_str) + if ("cgi_bin_subpath" in _yaml["webserv"] + && _yaml["webserv"]["cgi_bin_subpath"].type.string + && _yaml["webserv"]["cgi_bin_subpath"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_cgi_bin_part = _yaml["webserv"]["cgi_bin_part"].get!string; + _struct_composite.conf.w_srv_cgi_bin_subpath = _yaml["webserv"]["cgi_bin_subpath"].get!string; } if ("cgi_bin_path" in _yaml["webserv"] && _yaml["webserv"]["cgi_bin_path"].type.string @@ -763,11 +762,10 @@ if ("webserv" in _yaml ? _struct_composite.conf.w_srv_http :_struct_composite.conf.w_srv_cgi_http ~ "://" - ~ (_struct_composite.conf.w_srv_cgi_domain.empty) - ? _struct_composite.conf.w_srv_cgi_domain - : _struct_composite.conf.w_srv_domain - ~ "/" - ~ _struct_composite.conf.w_srv_cgi_bin_part; + ~ (_struct_composite.conf.w_srv_cgi_host.empty) + ? _struct_composite.conf.w_srv_cgi_host + : _struct_composite.conf.w_srv_host + ~ _struct_composite.conf.w_srv_cgi_bin_subpath; } if (_opt_action.cgi_sqlite_search_filename.length > 0) { _struct_composite.conf.w_srv_cgi_action = _struct_composite.conf.w_srv_cgi_bin_url ~ "/" ~ _opt_action.cgi_sqlite_search_filename; @@ -1659,7 +1657,7 @@ if ("webserv" in _json.object) { ) { _struct_composite.conf.w_srv_data_root_url = _json.object["webserv"]["data_root_url"].str; if (auto m = _struct_composite.conf.w_srv_data_root_url.match(rgx.webserv_data_root_url)) { - _struct_composite.conf.w_srv_url_domain = m.captures[2].to!string; + _struct_composite.conf.w_srv_url_host = m.captures[2].to!string; _struct_composite.conf.w_srv_url_doc_path = m.captures[3].to!string; } } diff --git a/org/output_show.org b/org/output_show.org index 4b93134..1b3443b 100644 --- a/org/output_show.org +++ b/org/output_show.org @@ -175,8 +175,8 @@ template spineShowSiteConfig() { writefln( "\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n", markup.repeat_character_by_number_provided("-", char_repeat_number), - "- webserv domain name:", - config.conf.w_srv_domain, + "- webserv host name:", + config.conf.w_srv_host, "- webserv doc root (part):", config.conf.w_srv_data_root_part, "- webserv doc path:", @@ -185,12 +185,12 @@ writefln( config.conf.w_srv_images_root_part, "- webserv doc root url:", config.conf.w_srv_data_root_url, - "- webserv cgi domain (host):", - config.conf.w_srv_cgi_domain, + "- webserv cgi host (host):", + config.conf.w_srv_cgi_host, "- webserv cgi host path:", config.conf.w_srv_cgi_bin_path, "- webserv cgi host (part):", - config.conf.w_srv_cgi_bin_part, + config.conf.w_srv_cgi_bin_subpath, "- webserv cgi search script:", config.conf.w_srv_cgi_search_script, "- webserv cgi search script in d:", @@ -204,7 +204,7 @@ writefln( "- webserv cgi action:", config.conf.w_srv_cgi_action, "- webserv cgi title:", - config.conf.w_srv_cgi_title, + config.conf.w_srv_cgi_search_form_title, // "- webserv cgi file links:", // config.conf.w_srv_cgi_file_links, "- webserv sqlite db:", @@ -271,8 +271,8 @@ writefln( doc_matters.conf_make_meta.meta.creator_author, doc_matters.src.filename, markup.repeat_character_by_number_provided("-", char_repeat_number), - "- webserv domain name:", - doc_matters.conf_make_meta.conf.w_srv_domain, + "- webserv host name:", + doc_matters.conf_make_meta.conf.w_srv_host, "- webserv doc root (part):", doc_matters.conf_make_meta.conf.w_srv_data_root_part, "- webserv doc path:", @@ -281,12 +281,12 @@ writefln( doc_matters.conf_make_meta.conf.w_srv_images_root_part, "- webserv doc root url:", doc_matters.conf_make_meta.conf.w_srv_data_root_url, - "- webserv cgi domain (host):", - doc_matters.conf_make_meta.conf.w_srv_cgi_domain, + "- webserv cgi host (host):", + doc_matters.conf_make_meta.conf.w_srv_cgi_host, "- webserv cgi host path:", doc_matters.conf_make_meta.conf.w_srv_cgi_bin_path, "- webserv cgi host (part):", - doc_matters.conf_make_meta.conf.w_srv_cgi_bin_part, + doc_matters.conf_make_meta.conf.w_srv_cgi_bin_subpath, "- webserv cgi search script:", doc_matters.conf_make_meta.conf.w_srv_cgi_search_script, "- webserv cgi search script in d:", diff --git a/org/spine.org b/org/spine.org index 6621fac..14d5297 100644 --- a/org/spine.org +++ b/org/spine.org @@ -58,7 +58,8 @@ string program_name = "spine"; <<spine_init_0>> <<spine_init_1>> <<spine_init_2>> - <<spine_args_0_args_init>> + <<spine_args_0_args_init_opts>> + <<spine_args_0_args_init_settings>> <<spine_args_1_args_get_options_aa>> <<spine_args_2_args_get_options_aa2str>> <<spine_args_3_program_info>> @@ -331,9 +332,10 @@ scope(failure) { *** getopt args for loop :args:getopt: **** set getopt options - set getopt options -***** initialize -#+NAME: spine_args_0_args_init +***** initialize opts + +#+NAME: spine_args_0_args_init_opts #+BEGIN_SRC d bool[string] opts = [ "abstraction" : false, @@ -397,17 +399,25 @@ bool[string] opts = [ "theme-light" : false, "workon" : false, ]; +#+END_SRC + +***** initialize settings + +see also: config_d_cfte.org + +#+NAME: spine_args_0_args_init_settings +#+BEGIN_SRC d string[string] settings = [ "output" : "", //_cfg.www_doc_root, // "/srv/www/spine/static" or "/var/www/html" "www-http" : "", //_cfg.www_http, // "http" or "https" - "www-domain" : "", //_cfg.www_domain, // start with "localhost" ? - "www-domain-doc-root" : "", //_cfg.www_domain_doc_root, // start with "localhost" ? + "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-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" ? "cgi-url-action" : "", //_cfg.cgi_url_action, // start with "http://localhost/cgi-bin/spine-search" - "cgi-search-title" : "", //_cfg.cgi_title, // e.g. "≅ SiSU Spine search" + "cgi-search-title" : "", //_cfg.cgi_search_form_title, // e.g. "≅ SiSU Spine search" "config" : "", "lang" : "all", //_cfg.default_language, // suggest "all" or "en" (default which language to process) "set-papersize" : "", //_cfg.default_papersize, // suggest: a4 @@ -486,8 +496,8 @@ auto helpInfo = getopt(args, "sqlite-insert", "sqlite output", &opts["sqlite-insert"], "sqlite-update", "sqlite output", &opts["sqlite-update"], "www-http", "http or https", &settings["www-http"], - "www-domain", "web server domain name", &settings["www-domain"], - "www-domain-doc-root", "web host domain name with path to doc root", &settings["www-domain-doc-root"], + "www-host", "web server host (domain) name", &settings["www-host"], + "www-host-doc-root", "web host host (domain) name with path to doc root", &settings["www-host-doc-root"], "www-url-doc-root", "e.g. http://localhost", &settings["www-url-doc-root"], "text", "text output", &opts["text"], "theme-dark", "alternative dark theme", &opts["theme-dark"], @@ -735,11 +745,11 @@ struct OptActions { @trusted string latex_papersize() { return settings["set-papersize"]; } - @trusted string webserver_domain_name() { - return settings["www-domain"]; + @trusted string webserver_host_name() { + return settings["www-host"]; } - @trusted string webserver_domain_doc_root() { - return settings["www-domain-doc-root"]; + @trusted string webserver_host_doc_root() { + return settings["www-host-doc-root"]; } @trusted string webserver_url_doc_root() { return settings["www-url-root"]; diff --git a/org/spine_info.org b/org/spine_info.org index 5e7ff86..5c0b098 100644 --- a/org/spine_info.org +++ b/org/spine_info.org @@ -150,18 +150,18 @@ default: digest: "sha256" webserv: http: "http" - domain: "localhost" + host: "localhost" data_http: "http" - data_domain: "localhost" + data_host: "localhost" data_root_url: "http://localhost" data_root_path: "/var/www/html" data_root_part: "" images_root_part: "image" - cgi_title: "≅ SiSU Spine search" + cgi_search_form_title: "≅ SiSU Spine search" cgi_http: "http" - cgi_domain: "localhost" + cgi_host: "localhost" cgi_bin_url: "http://localhost/cgi-bin" - cgi_bin_part: "cgi-bin" + cgi_bin_subpath: "/cgi-bin" cgi_bin_path: "/usr/lib/cgi-bin" cgi_search_script: "spine-search" cgi_search_script_raw_fn_d: "spine_search.d" @@ -963,18 +963,18 @@ default: digest: "sha256" webserv: http: "http" - domain: "localhost" + host: "localhost" data_http: "http" - data_domain: "localhost" + data_host: "localhost" data_root_url: "http://localhost" data_root_path: "/var/www/html" data_root_part: "" images_root_part: "image" - cgi_title: "≅ SiSU Spine search" + cgi_search_form_title: "≅ SiSU Spine search" cgi_http: "http" - cgi_domain: "localhost" + cgi_host: "localhost" cgi_bin_url: "http://localhost/cgi-bin" - cgi_bin_part: "cgi-bin" + cgi_bin_subpath: "/cgi-bin" cgi_bin_path: "/usr/lib/cgi-bin" cgi_search_script: "spine-search" cgi_search_script_raw_fn_d: "spine_search.d" @@ -4771,7 +4771,7 @@ matches are found. - Copyright: (C) 2008 - 2021 Adam D. Ruppe - - code: cgi.d (copy in ./sundry/ext_lib/src/arsd/) + - code: cgi.d (copy in ./sundry/spine_search_cgi/src/ext_depends_cgi/arsd) aria2c https://raw.githubusercontent.com/adamdruppe/arsd/master/cgi.d - License: BSL-1.0 diff --git a/src/COPYRIGHT b/src/COPYRIGHT index f4fe0b2..6995436 100644 --- a/src/COPYRIGHT +++ b/src/COPYRIGHT @@ -129,7 +129,7 @@ - Copyright: (C) 2008 - 2021 Adam D. Ruppe - - code: cgi.d (copy in ./misc/ext_lib/src/arsd/) + - code: cgi.d (copy in ./sundry/spine_search_cgi/src/ext_depends_cgi/arsd) aria2c https://raw.githubusercontent.com/adamdruppe/arsd/master/cgi.d - License: BSL-1.0 diff --git a/src/doc_reform/COPYRIGHT b/src/doc_reform/COPYRIGHT index f4fe0b2..6995436 100644 --- a/src/doc_reform/COPYRIGHT +++ b/src/doc_reform/COPYRIGHT @@ -129,7 +129,7 @@ - Copyright: (C) 2008 - 2021 Adam D. Ruppe - - code: cgi.d (copy in ./misc/ext_lib/src/arsd/) + - code: cgi.d (copy in ./sundry/spine_search_cgi/src/ext_depends_cgi/arsd) aria2c https://raw.githubusercontent.com/adamdruppe/arsd/master/cgi.d - License: BSL-1.0 diff --git a/src/doc_reform/io_in/read_config_files.d b/src/doc_reform/io_in/read_config_files.d index 037fa22..a3a5dd8 100644 --- a/src/doc_reform/io_in/read_config_files.d +++ b/src/doc_reform/io_in/read_config_files.d @@ -69,55 +69,56 @@ template readConfigSite() { string config_file_str; string default_config_file_str = format(q"┃ flag: - act0: "--html" - act1: "--html --epub" + act0: "--html" + act1: "--html --epub" output: - path: "%s" + path: "%s" default: - language: "en" - papersize: "a4" - text_wrap: "80" - digest: "sha256" + language: "en" + papersize: "a4" + text_wrap: "80" + digest: "sha256" webserv: - http: "%s" - domain: "%s" - data_http: "%s" - data_domain: "%s" - data_root_url: "%s" - data_root_path: "%s" - data_root_part: "" - images_root_part: "image" - cgi_title: "%s" - cgi_http: "%s" - cgi_domain: "%s" - cgi_bin_url: "%s" - cgi_bin_part: "cgi-bin" - cgi_bin_path: "%s" - cgi_search_script: "%s" - cgi_port: "" - cgi_user: "" - cgi_action: "%s" - db_sqlite_path: "%s" - db_sqlite_filename: "%s" - db_pg_table: "" - db_pg_user: "" + http: "%s" + host: "%s" + data_http: "%s" + data_host: "%s" + data_root_url: "%s" + data_root_path: "%s" + data_root_part: "" + images_root_part: "image" + cgi_search_form_title: "%s" + cgi_http: "%s" + cgi_host: "%s" + cgi_bin_url: "%s" + cgi_bin_subpath: "%s" + cgi_bin_path: "%s" + cgi_search_script: "%s" + cgi_port: "" + cgi_user: "" + cgi_action: "%s" + db_sqlite_path: "%s" + db_sqlite_filename: "%s" + db_pg_table: "" + db_pg_user: "" ┃", - _cfg.www_doc_root, // doc root - _cfg.www_http, // http - _cfg.www_domain, // domain - _cfg.www_http, // data http - _cfg.www_domain, // data domain - _cfg.www_url_doc_root, // data root url - _cfg.www_doc_root, // data root path - _cfg.cgi_title, // cgi title - _cfg.www_http, // cgi http - _cfg.www_domain, // cgi domain - _cfg.cgi_url_root, // cgi bin url - _cfg.cgi_bin_root, // cgi bin path - _cfg.cgi_filename, // cgi filename - _cfg.cgi_url_action, // cgi action - _cfg.db_sqlite_path, // sqlite db path - _cfg.db_sqlite_filename, // sqlite db filename + _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_doc_root, // data root path + _cfg.cgi_search_form_title, // cgi title + _cfg.www_http, // cgi http + _cfg.www_host, // cgi host + _cfg.cgi_url_root, // cgi bin url + _cfg.cgi_bin_subpath, // cgi bin path + _cfg.cgi_bin_root, // cgi bin path + _cfg.cgi_filename, // cgi filename + _cfg.cgi_url_action, // cgi action + _cfg.db_sqlite_path, // sqlite db path + _cfg.db_sqlite_filename, // sqlite db filename ); foreach(conf_fn; [_conf_file_details.config_filename_site]) { foreach(pth; _conf_file_details.possible_config_path_locations.config_local_site) { diff --git a/src/doc_reform/meta/conf_make_meta_json.d b/src/doc_reform/meta/conf_make_meta_json.d index 7c77f65..cc46754 100644 --- a/src/doc_reform/meta/conf_make_meta_json.d +++ b/src/doc_reform/meta/conf_make_meta_json.d @@ -254,7 +254,7 @@ static template contentJSONtoSpineStruct() { ) { _struct_composite.conf.w_srv_data_root_url = _json.object["webserv"]["data_root_url"].str; if (auto m = _struct_composite.conf.w_srv_data_root_url.match(rgx.webserv_data_root_url)) { - _struct_composite.conf.w_srv_url_domain = m.captures[2].to!string; + _struct_composite.conf.w_srv_url_host = m.captures[2].to!string; _struct_composite.conf.w_srv_url_doc_path = m.captures[3].to!string; } } diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d index 2863f0d..aff2465 100644 --- a/src/doc_reform/meta/conf_make_meta_structs.d +++ b/src/doc_reform/meta/conf_make_meta_structs.d @@ -192,19 +192,19 @@ struct ConfCompositeMakeInit { } struct ConfCompositeSiteLocal { string w_srv_http; - string w_srv_domain; + string w_srv_host; string w_srv_data_http; // if not set same as webserv_http - string w_srv_data_domain; // if not set same as webserv_domain + string w_srv_data_host; // if not set same as webserv_host string w_srv_data_root_part; string w_srv_data_root_url; string w_srv_data_root_url_html; string w_srv_data_root_path; string w_srv_images_root_part; // string w_srv_url_doc_path; - string w_srv_cgi_title; + string w_srv_cgi_search_form_title; string w_srv_cgi_http; // if not set same as webserv_http - string w_srv_cgi_domain; // if not set same as webserv_domain - string w_srv_cgi_bin_part; + string w_srv_cgi_host; // if not set same as webserv_host + string w_srv_cgi_bin_subpath; string w_srv_cgi_bin_path; string w_srv_cgi_search_title; string w_srv_cgi_search_script; diff --git a/src/doc_reform/meta/conf_make_meta_yaml.d b/src/doc_reform/meta/conf_make_meta_yaml.d index 3780553..eac55b7 100644 --- a/src/doc_reform/meta/conf_make_meta_yaml.d +++ b/src/doc_reform/meta/conf_make_meta_yaml.d @@ -256,11 +256,11 @@ template contentYAMLtoSpineStruct() { ) { _struct_composite.conf.w_srv_cgi_http = _yaml["webserv"]["cgi_http"].get!string; } - if ("domain" in _yaml["webserv"] - && _yaml["webserv"]["domain"].type.string - && _yaml["webserv"]["domain"].tag.match(rgx.yaml_tag_is_str) + if ("host" in _yaml["webserv"] + && _yaml["webserv"]["host"].type.string + && _yaml["webserv"]["host"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_domain = _yaml["webserv"]["domain"].get!string; + _struct_composite.conf.w_srv_host = _yaml["webserv"]["host"].get!string; } // if ("data_root_url" in _yaml["webserv"] // && _yaml["webserv"]["data_root_url"].type.string @@ -268,7 +268,7 @@ template contentYAMLtoSpineStruct() { // ) { // _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string; // if (auto m = _struct_composite.conf.w_srv_data_root_url.match(rgx.webserv_url_doc_root)) { - // _struct_composite.conf.w_srv_url_domain = m.captures[2].to!string; + // _struct_composite.conf.w_srv_url_host = m.captures[2].to!string; // _struct_composite.conf.w_srv_url_doc_path = m.captures[3].to!string; // } // } @@ -306,25 +306,25 @@ template contentYAMLtoSpineStruct() { ~ _manifested.src.language ~ "/" ~ "html"; } - if ("cgi_domain" in _yaml["webserv"] - && _yaml["webserv"]["cgi_domain"].type.string - && _yaml["webserv"]["cgi_domain"].tag.match(rgx.yaml_tag_is_str) + if ("cgi_host" in _yaml["webserv"] + && _yaml["webserv"]["cgi_host"].type.string + && _yaml["webserv"]["cgi_host"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_cgi_domain = _yaml["webserv"]["cgi_domain"].get!string; + _struct_composite.conf.w_srv_cgi_host = _yaml["webserv"]["cgi_host"].get!string; } else { // composite construct - _struct_composite.conf.w_srv_cgi_domain = _struct_composite.conf.w_srv_domain; + _struct_composite.conf.w_srv_cgi_host = _struct_composite.conf.w_srv_host; } - if ("cgi_title" in _yaml["webserv"] - && _yaml["webserv"]["cgi_title"].type.string - && _yaml["webserv"]["cgi_title"].tag.match(rgx.yaml_tag_is_str) + if ("cgi_search_form_title" in _yaml["webserv"] + && _yaml["webserv"]["cgi_search_form_title"].type.string + && _yaml["webserv"]["cgi_search_form_title"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_cgi_title = _yaml["webserv"]["cgi_title"].get!string; + _struct_composite.conf.w_srv_cgi_search_form_title = _yaml["webserv"]["cgi_search_form_title"].get!string; } - if ("cgi_bin_part" in _yaml["webserv"] - && _yaml["webserv"]["cgi_bin_part"].type.string - && _yaml["webserv"]["cgi_bin_part"].tag.match(rgx.yaml_tag_is_str) + if ("cgi_bin_subpath" in _yaml["webserv"] + && _yaml["webserv"]["cgi_bin_subpath"].type.string + && _yaml["webserv"]["cgi_bin_subpath"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_cgi_bin_part = _yaml["webserv"]["cgi_bin_part"].get!string; + _struct_composite.conf.w_srv_cgi_bin_subpath = _yaml["webserv"]["cgi_bin_subpath"].get!string; } if ("cgi_bin_path" in _yaml["webserv"] && _yaml["webserv"]["cgi_bin_path"].type.string @@ -390,11 +390,10 @@ template contentYAMLtoSpineStruct() { ? _struct_composite.conf.w_srv_http :_struct_composite.conf.w_srv_cgi_http ~ "://" - ~ (_struct_composite.conf.w_srv_cgi_domain.empty) - ? _struct_composite.conf.w_srv_cgi_domain - : _struct_composite.conf.w_srv_domain - ~ "/" - ~ _struct_composite.conf.w_srv_cgi_bin_part; + ~ (_struct_composite.conf.w_srv_cgi_host.empty) + ? _struct_composite.conf.w_srv_cgi_host + : _struct_composite.conf.w_srv_host + ~ _struct_composite.conf.w_srv_cgi_bin_subpath; } if (_opt_action.cgi_sqlite_search_filename.length > 0) { _struct_composite.conf.w_srv_cgi_action = _struct_composite.conf.w_srv_cgi_bin_url ~ "/" ~ _opt_action.cgi_sqlite_search_filename; diff --git a/src/doc_reform/meta/metadoc_show_config.d b/src/doc_reform/meta/metadoc_show_config.d index 20e796f..2b07c77 100644 --- a/src/doc_reform/meta/metadoc_show_config.d +++ b/src/doc_reform/meta/metadoc_show_config.d @@ -74,8 +74,8 @@ template spineShowSiteConfig() { writefln( "\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n", markup.repeat_character_by_number_provided("-", char_repeat_number), - "- webserv domain name:", - config.conf.w_srv_domain, + "- webserv host name:", + config.conf.w_srv_host, "- webserv doc root (part):", config.conf.w_srv_data_root_part, "- webserv doc path:", @@ -84,12 +84,12 @@ template spineShowSiteConfig() { config.conf.w_srv_images_root_part, "- webserv doc root url:", config.conf.w_srv_data_root_url, - "- webserv cgi domain (host):", - config.conf.w_srv_cgi_domain, + "- webserv cgi host (host):", + config.conf.w_srv_cgi_host, "- webserv cgi host path:", config.conf.w_srv_cgi_bin_path, "- webserv cgi host (part):", - config.conf.w_srv_cgi_bin_part, + config.conf.w_srv_cgi_bin_subpath, "- webserv cgi search script:", config.conf.w_srv_cgi_search_script, "- webserv cgi search script in d:", @@ -103,7 +103,7 @@ template spineShowSiteConfig() { "- webserv cgi action:", config.conf.w_srv_cgi_action, "- webserv cgi title:", - config.conf.w_srv_cgi_title, + config.conf.w_srv_cgi_search_form_title, // "- webserv cgi file links:", // config.conf.w_srv_cgi_file_links, "- webserv sqlite db:", @@ -174,8 +174,8 @@ template spineShowConfig() { doc_matters.conf_make_meta.meta.creator_author, doc_matters.src.filename, markup.repeat_character_by_number_provided("-", char_repeat_number), - "- webserv domain name:", - doc_matters.conf_make_meta.conf.w_srv_domain, + "- webserv host name:", + doc_matters.conf_make_meta.conf.w_srv_host, "- webserv doc root (part):", doc_matters.conf_make_meta.conf.w_srv_data_root_part, "- webserv doc path:", @@ -184,12 +184,12 @@ template spineShowConfig() { doc_matters.conf_make_meta.conf.w_srv_images_root_part, "- webserv doc root url:", doc_matters.conf_make_meta.conf.w_srv_data_root_url, - "- webserv cgi domain (host):", - doc_matters.conf_make_meta.conf.w_srv_cgi_domain, + "- webserv cgi host (host):", + doc_matters.conf_make_meta.conf.w_srv_cgi_host, "- webserv cgi host path:", doc_matters.conf_make_meta.conf.w_srv_cgi_bin_path, "- webserv cgi host (part):", - doc_matters.conf_make_meta.conf.w_srv_cgi_bin_part, + doc_matters.conf_make_meta.conf.w_srv_cgi_bin_subpath, "- webserv cgi search script:", doc_matters.conf_make_meta.conf.w_srv_cgi_search_script, "- webserv cgi search script in d:", diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d index d7d175e..752d3ee 100755 --- a/src/doc_reform/spine.d +++ b/src/doc_reform/spine.d @@ -174,14 +174,14 @@ string program_name = "spine"; string[string] settings = [ "output" : "", //_cfg.www_doc_root, // "/srv/www/spine/static" or "/var/www/html" "www-http" : "", //_cfg.www_http, // "http" or "https" - "www-domain" : "", //_cfg.www_domain, // start with "localhost" ? - "www-domain-doc-root" : "", //_cfg.www_domain_doc_root, // start with "localhost" ? + "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-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" ? "cgi-url-action" : "", //_cfg.cgi_url_action, // start with "http://localhost/cgi-bin/spine-search" - "cgi-search-title" : "", //_cfg.cgi_title, // e.g. "≅ SiSU Spine search" + "cgi-search-title" : "", //_cfg.cgi_search_form_title, // e.g. "≅ SiSU Spine search" "config" : "", "lang" : "all", //_cfg.default_language, // suggest "all" or "en" (default which language to process) "set-papersize" : "", //_cfg.default_papersize, // suggest: a4 @@ -254,8 +254,8 @@ string program_name = "spine"; "sqlite-insert", "sqlite output", &opts["sqlite-insert"], "sqlite-update", "sqlite output", &opts["sqlite-update"], "www-http", "http or https", &settings["www-http"], - "www-domain", "web server domain name", &settings["www-domain"], - "www-domain-doc-root", "web host domain name with path to doc root", &settings["www-domain-doc-root"], + "www-host", "web server host (domain) name", &settings["www-host"], + "www-host-doc-root", "web host host (domain) name with path to doc root", &settings["www-host-doc-root"], "www-url-doc-root", "e.g. http://localhost", &settings["www-url-doc-root"], "text", "text output", &opts["text"], "theme-dark", "alternative dark theme", &opts["theme-dark"], @@ -496,11 +496,11 @@ string program_name = "spine"; @trusted string latex_papersize() { return settings["set-papersize"]; } - @trusted string webserver_domain_name() { - return settings["www-domain"]; + @trusted string webserver_host_name() { + return settings["www-host"]; } - @trusted string webserver_domain_doc_root() { - return settings["www-domain-doc-root"]; + @trusted string webserver_host_doc_root() { + return settings["www-host-doc-root"]; } @trusted string webserver_url_doc_root() { return settings["www-url-root"]; diff --git a/sundry/spine_search_cgi/dub.json b/sundry/spine_search_cgi/dub.json index a07db56..1668969 100644 --- a/sundry/spine_search_cgi/dub.json +++ b/sundry/spine_search_cgi/dub.json @@ -34,9 +34,9 @@ { "name": "arsd.cgi", "description": "cgi", - "homepage": "https://github.com/dlang-community/d2sqlite3", - "authors": [ "Aadam Ruppee" ], - "copyright": "Copyright 2011-18 Aadam Ruppee", + "homepage": "https://code.dlang.org/packages/arsd-official", + "authors": [ "Adam Ruppee" ], + "copyright": "Copyright 2011-18 Adam Ruppee", "license": "BSL-1.0", "sourcePaths": [ "./src/ext_depends_cgi/arsd" ], "configurations": [ diff --git a/sundry/spine_search_cgi/src/spine_search.d b/sundry/spine_search_cgi/src/spine_search.d index a2d290a..2f9de26 100644 --- a/sundry/spine_search_cgi/src/spine_search.d +++ b/sundry/spine_search_cgi/src/spine_search.d @@ -72,6 +72,8 @@ void cgi_function_intro(Cgi cgi) { string doc_collection_sub_root; string cgi_root; string cgi_script_name; + string cgi_search_form_title; + string cgi_search_form_html_title; string data_path_html; string http_url; string query_base_url; @@ -80,12 +82,19 @@ void cgi_function_intro(Cgi cgi) { string db_path; } auto conf = Config(); - conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type); - conf.http_host = environment.get("SERVER_NAME", _cfg.http_host); - conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root); - conf.doc_collection_sub_root = "/spine/static"; // (output_path - web_doc_root_path) - conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath); - conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename); + conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type); + conf.http_host = environment.get("SERVER_NAME", _cfg.http_host); + conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root); + conf.doc_collection_sub_root = "/spine/static"; // (output_path - web_doc_root_path) + conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath); + conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename); + conf.cgi_search_form_title = _cfg.cgi_search_form_title; // ≅ SiSU spine search form + conf.cgi_search_form_html_title = "<a href=\"" + ~ conf.http_request_type ~ "://" + ~ conf.http_host + ~ "\">" + ~ _cfg.cgi_search_form_title + ~ "</a>"; conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ "/" ~ conf.cgi_script_name ~ "?"; conf.query_string = environment.get("QUERY_STRING", ""); conf.http_url = environment.get("HTTP_REFERER", conf.query_base_url ~ conf.query_string); @@ -547,7 +556,7 @@ void cgi_function_intro(Cgi cgi) { <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title> - ≅ SiSU spine search form + %s </title> <meta name="sourcefile" content="SiSU.sst"> <link rel="generator" href="sisudoc.org"> @@ -1351,6 +1360,7 @@ void cgi_function_intro(Cgi cgi) { </head> <body lang="en" xml:lang="en"> ┃", + conf.cgi_search_form_title, conf.http_request_type, conf.http_host, ); @@ -1361,14 +1371,16 @@ void cgi_function_intro(Cgi cgi) { <tr><td width="20%%"> <table summary="home button / home information" border="0" cellpadding="2" cellspacing="0"> <tr><td align="left"> - ≅ SiSU spine search form + %s </td></tr> </table> </td> <td> </td></tr> </table> - ┃"); + ┃", + conf.cgi_search_form_html_title, + ); } { string post_value(string field_name, string type="box", string set="on") { diff --git a/sundry/spine_search_cgi/src/spine_search.d_ b/sundry/spine_search_cgi/src/spine_search.d_ index fca2b2b..b22c959 100755 --- a/sundry/spine_search_cgi/src/spine_search.d_ +++ b/sundry/spine_search_cgi/src/spine_search.d_ @@ -73,6 +73,8 @@ void cgi_function_intro(Cgi cgi) { string doc_collection_sub_root; string cgi_root; string cgi_script_name; + string cgi_search_form_title; + string cgi_search_form_html_title; string data_path_html; string http_url; string query_base_url; @@ -81,13 +83,20 @@ void cgi_function_intro(Cgi cgi) { string db_path; } auto conf = Config(); - conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type); - conf.http_host = environment.get("SERVER_NAME", _cfg.http_host); - // conf.http_host = environment.get("HTTP_HOST", _cfg.http_host); - conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root); - conf.doc_collection_sub_root = "/spine/static"; // (output_path - web_doc_root_path) - conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath); - conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename); + conf.http_request_type = environment.get("REQUEST_SCHEME", _cfg.http_request_type); + conf.http_host = environment.get("SERVER_NAME", _cfg.http_host); + // conf.http_host = environment.get("HTTP_HOST", _cfg.http_host); + conf.web_doc_root_path = environment.get("DOCUMENT_ROOT", _cfg.www_doc_root); + conf.doc_collection_sub_root = "/spine/static"; // (output_path - web_doc_root_path) + conf.cgi_root = environment.get("CONTEXT_DOCUMENT_ROOT", _cfg.cgi_bin_subpath); + conf.cgi_script_name = environment.get("SCRIPT_NAME", _cfg.cgi_filename); + conf.cgi_search_form_title = _cfg.cgi_search_form_title; // ≅ SiSU spine search form + conf.cgi_search_form_html_title = "<a href=\"" + ~ conf.http_request_type ~ "://" + ~ conf.http_host + ~ "\">" + ~ _cfg.cgi_search_form_title + ~ "</a>"; conf.query_base_url = conf.http_request_type ~ "://" ~ conf.http_host ~ "/" ~ conf.cgi_script_name ~ "?"; conf.query_string = environment.get("QUERY_STRING", ""); conf.http_url = environment.get("HTTP_REFERER", conf.query_base_url ~ conf.query_string); @@ -549,7 +558,7 @@ void cgi_function_intro(Cgi cgi) { <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title> - ≅ SiSU spine search form + %s </title> <meta name="sourcefile" content="SiSU.sst"> <link rel="generator" href="sisudoc.org"> @@ -1353,6 +1362,7 @@ void cgi_function_intro(Cgi cgi) { </head> <body lang="en" xml:lang="en"> ┃", + conf.cgi_search_form_title, conf.http_request_type, conf.http_host, ); @@ -1363,14 +1373,16 @@ void cgi_function_intro(Cgi cgi) { <tr><td width="20%%"> <table summary="home button / home information" border="0" cellpadding="2" cellspacing="0"> <tr><td align="left"> - ≅ SiSU spine search form + %s </td></tr> </table> </td> <td> </td></tr> </table> - ┃"); + ┃", + conf.cgi_search_form_html_title, + ); } { string post_value(string field_name, string type="box", string set="on") { diff --git a/sundry/spine_search_cgi/views/configuration.txt b/sundry/spine_search_cgi/views/configuration.txt index 0138149..1486315 100644 --- a/sundry/spine_search_cgi/views/configuration.txt +++ b/sundry/spine_search_cgi/views/configuration.txt @@ -2,10 +2,10 @@ struct Cfg { string http_request_type = "http"; string http_host = "localhost"; string www_url_doc_root = "http://localhost"; - string www_doc_root = "/srv/www/spine/static"; // "/var/www/html" - string cgi_bin_root = "/var/www/cgi/cgi-bin/"; // "/usr/lib/cgi-bin" + string www_doc_root = "/srv/www/spine/static"; string cgi_bin_subpath = "/cgi-bin"; string cgi_filename = "spine_search"; // "spine-search" + string cgi_search_form_title = "≅ SiSU Spine search"; string db_sqlite_path = "/var/www/sqlite"; string db_sqlite_filename = "spine.search.db"; } diff --git a/sundry/spine_search_cgi/views/configuration_suggested.txt b/sundry/spine_search_cgi/views/configuration_suggested.txt index c66da03..5ba5175 100644 --- a/sundry/spine_search_cgi/views/configuration_suggested.txt +++ b/sundry/spine_search_cgi/views/configuration_suggested.txt @@ -3,10 +3,10 @@ struct Cfg { string http_request_type = "http"; string http_host = "localhost"; string www_url_doc_root = "http://localhost"; - string www_doc_root = "/srv/www/spine/static"; // "/var/www/html" - string cgi_bin_root = "/var/www/cgi/cgi-bin/"; // "/usr/lib/cgi-bin" + string www_doc_root = "/srv/www/spine/static"; string cgi_bin_subpath = "/cgi-bin"; string cgi_filename = "spine_search"; // "spine-search" + string cgi_search_form_title = "≅ SiSU Spine search"; string db_sqlite_path = "/var/www/sqlite"; string db_sqlite_filename = "spine.search.db"; } diff --git a/views/configuration.txt b/views/configuration.txt index cc949fc..f7e2f5f 100644 --- a/views/configuration.txt +++ b/views/configuration.txt @@ -1,18 +1,18 @@ struct Cfg { string www_http = "http"; - string www_doc_root = "/srv/www/spine/static"; // "/var/www/html" - string www_domain = "localhost"; - string www_domain_doc_root = "localhost"; + string www_host = "localhost"; string www_url_doc_root = "http://localhost"; - string cgi_bin_root = "/var/www/cgi/cgi-bin/"; // "/usr/lib/cgi-bin" - string cgi_bin_part = "cgi-bin"; - string cgi_filename = "spine_search"; // "spine-search" + string www_doc_root = "/srv/www/spine/static"; + string www_host_doc_root = "localhost"; + string cgi_bin_root = "/var/www/cgi/cgi-bin"; + string cgi_bin_subpath = "/cgi-bin"; + string cgi_filename = "spine_search"; string cgi_url_root = "http://localhost/cgi-bin"; string cgi_port = ""; string cgi_user = ""; string cgi_url_action = "http://localhost/cgi-bin/spine_search"; - string cgi_title = "≅ SiSU Spine search"; - string db_sqlite_path = "/var/www/sqlite/"; + string cgi_search_form_title = "≅ SiSU Spine search"; + string db_sqlite_path = "/var/www/sqlite"; string db_sqlite_filename = "spine.search.db"; string default_language = "en"; string default_papersize = "a4"; diff --git a/views/configuration_suggested.txt b/views/configuration_suggested.txt index 1b38620..4b109e7 100644 --- a/views/configuration_suggested.txt +++ b/views/configuration_suggested.txt @@ -1,19 +1,19 @@ /+ obt - org-mode generated file +/ struct Cfg { string www_http = "http"; - string www_doc_root = "/srv/www/spine/static"; // "/var/www/html" - string www_domain = "localhost"; - string www_domain_doc_root = "localhost"; + string www_host = "localhost"; string www_url_doc_root = "http://localhost"; - string cgi_bin_root = "/var/www/cgi/cgi-bin/"; // "/usr/lib/cgi-bin" - string cgi_bin_part = "cgi-bin"; - string cgi_filename = "spine_search"; // "spine-search" + string www_doc_root = "/srv/www/spine/static"; + string www_host_doc_root = "localhost"; + string cgi_bin_root = "/var/www/cgi/cgi-bin"; + string cgi_bin_subpath = "/cgi-bin"; + string cgi_filename = "spine_search"; string cgi_url_root = "http://localhost/cgi-bin"; string cgi_port = ""; string cgi_user = ""; string cgi_url_action = "http://localhost/cgi-bin/spine_search"; - string cgi_title = "≅ SiSU Spine search"; - string db_sqlite_path = "/var/www/sqlite/"; + string cgi_search_form_title = "≅ SiSU Spine search"; + string db_sqlite_path = "/var/www/sqlite"; string db_sqlite_filename = "spine.search.db"; string default_language = "en"; string default_papersize = "a4"; |