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 /org/config_d_cfte.org | |
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
Diffstat (limited to 'org/config_d_cfte.org')
-rw-r--r-- | org/config_d_cfte.org | 134 |
1 files changed, 91 insertions, 43 deletions
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 |