From 93e4d0d095e3376bcd5e1c2b9e1fd83e8ae9bd6e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 21 May 2024 15:24:12 -0400 Subject: track config examples provided in ./views --- .gitignore | 2 ++ org/config_d_cfte.org | 71 +++++++++---------------------------- org/config_git.org | 2 ++ views/configuration.txt_localhost_ | 11 ++++++ views/configuration.txt_remotehost_ | 11 ++++++ views/configuration_example.txt | 2 +- 6 files changed, 43 insertions(+), 56 deletions(-) create mode 100644 views/configuration.txt_localhost_ create mode 100644 views/configuration.txt_remotehost_ diff --git a/.gitignore b/.gitignore index 3d1f56e..9f97571 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,8 @@ tmp/** *.\#* !.envrc-local_ !src/sisudoc/spine_search.d_ +!views/configuration.txt_remotehost_ +!views/configuration.txt_localhost_ #!*/ #\#* #*.\#* diff --git a/org/config_d_cfte.org b/org/config_d_cfte.org index 33aee8b..8a12537 100644 --- a/org/config_d_cfte.org +++ b/org/config_d_cfte.org @@ -71,63 +71,39 @@ version (Posix) { SEE NOTES on configuration hierarchy in spine.org *** spine: configuration.txt SET -**** example +**** configure -#+HEADER: :tangle "../views/configuration_example.txt" +#+HEADER: :tangle ../views/configuration.txt_ #+HEADER: :noweb yes #+BEGIN_SRC d /+ obt - org-mode generated file +/ +<> +#+END_SRC + +**** configure localhost + +#+NAME: config_localhost +#+HEADER: :tangle ../views/configuration.txt_localhost_ +#+BEGIN_SRC d +/+ obt - org-mode generated file +/ struct Cfg { string http_request_type = "http"; string http_host = "localhost"; string www_url_doc_subroot = "/spine"; string cgi_filename = "spine_search"; - string cgi_search_form_title = "≅ SiSU Spine search"; + string cgi_search_form_title = "≅ SiSU Spine search ፨"; string db_sqlite_path = "/var/www/sqlite"; string db_sqlite_filename = "spine.search.db"; } enum _cfg = Cfg(); #+END_SRC -#+BEGIN_SRC d -/+ obt - org-mode generated file +/ -struct Cfg { - string http_request_type = "<>"; - string http_host = "<>"; - string www_url_doc_root = "<>"; - string www_url_doc_subroot = "<>"; - string processing_path_doc_root = "<>"; - 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,letter.portrait"; - string default_text_wrap = "80"; - string default_hash_digest = "sha256"; -} -enum _cfg = Cfg(); -#+END_SRC - -**** configure - -#+HEADER: :tangle ../views/configuration.txt_ -#+HEADER: :noweb yes -#+BEGIN_SRC d -<> -#+END_SRC - **** configure remote host (sisudoc.org) #+NAME: config_remotehost #+HEADER: :tangle ../views/configuration.txt_remotehost_ #+BEGIN_SRC d +/+ obt - org-mode generated file +/ struct Cfg { string http_request_type = "https"; string http_host = "sisudoc.org"; @@ -141,6 +117,7 @@ enum _cfg = Cfg(); #+END_SRC #+BEGIN_SRC d +/+ obt - org-mode generated file +/ struct Cfg { string http_request_type = "https"; string http_host = "sisudoc.org"; @@ -165,24 +142,8 @@ struct Cfg { enum _cfg = Cfg(); #+END_SRC -**** configure localhost - -#+NAME: config_localhost -#+HEADER: :tangle ../views/configuration.txt_localhost_ -#+BEGIN_SRC d -struct Cfg { - string http_request_type = "http"; - string http_host = "localhost"; - string www_url_doc_subroot = "/spine"; - string cgi_filename = "spine_search"; - string cgi_search_form_title = "≅ SiSU Spine search ፨"; - string db_sqlite_path = "/var/www/sqlite"; - string db_sqlite_filename = "spine.search.db"; -} -enum _cfg = Cfg(); -#+END_SRC - #+BEGIN_SRC d +/+ obt - org-mode generated file +/ struct Cfg { string http_request_type = "http"; string http_host = "localhost"; @@ -209,7 +170,7 @@ enum _cfg = Cfg(); *** spine_search: configuration.txt SET -#+HEADER: :tangle "../doc-reform-code-software-search-cgi/views/configuration_example.txt" +#+HEADER: :tangle "../views/configuration_example.txt" #+HEADER: :noweb yes #+BEGIN_SRC d /+ obt - org-mode generated file +/ diff --git a/org/config_git.org b/org/config_git.org index 27b4774..44ade4a 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -80,6 +80,8 @@ tmp/** ,*.\#* !.envrc-local_ !src/sisudoc/spine_search.d_ +!views/configuration.txt_remotehost_ +!views/configuration.txt_localhost_ #!*/ #\#* #*.\#* diff --git a/views/configuration.txt_localhost_ b/views/configuration.txt_localhost_ new file mode 100644 index 0000000..75ec35c --- /dev/null +++ b/views/configuration.txt_localhost_ @@ -0,0 +1,11 @@ +/+ obt - org-mode generated file +/ +struct Cfg { + string http_request_type = "http"; + string http_host = "localhost"; + string www_url_doc_subroot = "/spine"; + string cgi_filename = "spine_search"; + string cgi_search_form_title = "≅ SiSU Spine search ፨"; + string db_sqlite_path = "/var/www/sqlite"; + string db_sqlite_filename = "spine.search.db"; +} +enum _cfg = Cfg(); diff --git a/views/configuration.txt_remotehost_ b/views/configuration.txt_remotehost_ new file mode 100644 index 0000000..2eea12d --- /dev/null +++ b/views/configuration.txt_remotehost_ @@ -0,0 +1,11 @@ +/+ obt - org-mode generated file +/ +struct Cfg { + string http_request_type = "https"; + string http_host = "sisudoc.org"; + string www_url_doc_subroot = "/spine"; + string cgi_filename = "spine_search"; + string cgi_search_form_title = "≅ SiSU Spine search ፨"; + string db_sqlite_path = "/var/www/sqlite"; + string db_sqlite_filename = "spine.search.db"; +} +enum _cfg = Cfg(); diff --git a/views/configuration_example.txt b/views/configuration_example.txt index 0d5be00..75ec35c 100644 --- a/views/configuration_example.txt +++ b/views/configuration_example.txt @@ -4,7 +4,7 @@ struct Cfg { string http_host = "localhost"; string www_url_doc_subroot = "/spine"; string cgi_filename = "spine_search"; - string cgi_search_form_title = "≅ SiSU Spine search"; + string cgi_search_form_title = "≅ SiSU Spine search ፨"; string db_sqlite_path = "/var/www/sqlite"; string db_sqlite_filename = "spine.search.db"; } -- cgit v1.2.3