diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2022-12-19 21:27:17 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2022-12-31 21:55:43 -0500 |
commit | da6f5d079e01906fb5dc558390659557a869df8f (patch) | |
tree | 35b99248cf1ba78b52474bea960f92984ff721c7 /org/config_d_cfte.org | |
parent | sort how you want this to be (diff) |
nix flake, things nix
Diffstat (limited to 'org/config_d_cfte.org')
-rw-r--r-- | org/config_d_cfte.org | 300 |
1 files changed, 300 insertions, 0 deletions
diff --git a/org/config_d_cfte.org b/org/config_d_cfte.org new file mode 100644 index 0000000..9bc1bd3 --- /dev/null +++ b/org/config_d_cfte.org @@ -0,0 +1,300 @@ +-*- mode: org -*- +#+TITLE: configuration d cfte +#+DESCRIPTION: documents - structuring, various output representations & search +#+FILETAGS: :spine:hub: +#+AUTHOR: Ralph Amissah +#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] +#+COPYRIGHT: Copyright (C) 2015 - 2022 Ralph Amissah +#+LANGUAGE: en +#+STARTUP: content hideblocks hidestars noindent entitiespretty +#+PROPERTY: header-args :exports code +#+PROPERTY: header-args+ :noweb yes +#+PROPERTY: header-args+ :results no +#+PROPERTY: header-args+ :cache no +#+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes +#+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t + +- [[./doc-reform.org][doc-reform.org]] [[../org/][org/]] + +* cfte views version.txt configuration.txt (set version & configuration) SET + +** program version: version.txt + +*** set program version SET VERSION :version:set:project: + +- comma separated numbers: major, minor, patch + +#+NAME: spine_version_set +#+BEGIN_SRC d +0, 12, 0 +#+END_SRC + +*** set program version tangle :version: + +#+HEADER: :tangle "../views/version.txt" +#+HEADER: :noweb yes +#+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 + +*** compilation restrictions (supported compilers) +- set compilation restrictions + +https://dlang.org/spec/version.html#predefined-versions + +#+NAME: spine_compiler_restrictions +#+HEADER: :noweb yes +#+BEGIN_SRC d +version (Posix) { + version (DigitalMars) { + } else version (LDC) { + } else version (GNU) { + } else { + static assert (0, "Unsupported D compiler"); + } +} else { + static assert (0, "Unsupported D compiler"); +} +#+END_SRC + +** set configuration SET :configuration: + +SEE NOTES on configuration hierarchy in spine.org + +*** spine: configuration.txt SET +**** example + +#+HEADER: :tangle "../views/configuration_example.txt" +#+HEADER: :noweb yes +#+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 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_request_type>>"; + string http_host = "<<http_host>>"; + string www_url_doc_root = "<<www_url_doc_root>>"; + string www_url_doc_subroot = "<<www_url_doc_subroot>>"; + string processing_path_doc_root = "<<processing_path_doc_root>>"; + string cgi_bin_root = "<<cgi_bin_root>>"; + string cgi_bin_subpath = "<<cgi_bin_subpath>>"; + string cgi_filename = "<<cgi_filename>>"; + string cgi_url_root = "<<http_request_type>>://<<http_host>><<cgi_bin_subpath>>"; + string cgi_port = ""; + string cgi_user = ""; + string cgi_url_action = "<<http_request_type>>://<<http_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,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 +<<config_localhost>> +#+END_SRC + +**** configure remote host (sisudoc.org) + +#+NAME: config_remotehost +#+HEADER: :tangle ../views/configuration.txt_remotehost_ +#+BEGIN_SRC d +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(); +#+END_SRC + +#+BEGIN_SRC d +struct Cfg { + string http_request_type = "https"; + string http_host = "sisudoc.org"; + string www_url_doc_root = "https://sisudoc.org"; + string www_url_doc_subroot = "/spine"; + string processing_path_doc_root = "/srv/www/spine"; + string cgi_bin_root = "/var/www/cgi/cgi-bin"; + string cgi_bin_subpath = ""; + string cgi_filename = "spine_search"; + string cgi_url_root = "https://sisudoc.org"; + string cgi_port = ""; + string cgi_user = ""; + string cgi_url_action = "https://sisudoc.org/spine_search"; + 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"; + string default_text_wrap = "80"; + string default_hash_digest = "sha256"; +} +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 +struct Cfg { + string http_request_type = "http"; + string http_host = "localhost"; + string www_url_doc_root = "http://localhost"; + string www_url_doc_subroot = "/spine"; + string processing_path_doc_root = "/srv/www/spine"; + 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_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,letter.portrait"; + string default_text_wrap = "80"; + string default_hash_digest = "sha256"; +} +enum _cfg = Cfg(); +#+END_SRC + +*** spine_search: configuration.txt SET + +#+HEADER: :tangle "../doc-reform-code-software-search-cgi/views/configuration_example.txt" +#+HEADER: :noweb yes +#+BEGIN_SRC d +/+ obt - org-mode generated file +/ +struct Cfg { + string http_request_type = "<<http_request_type>>"; + string http_host = "<<http_host>>"; + string www_url_doc_subroot = "<<www_doc_subroot>>"; + string cgi_filename = "<<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>>"; +} +enum _cfg = Cfg(); +#+END_SRC + +#+BEGIN_SRC d +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(); +#+END_SRC + +*** shared settings SET defaults + +#+NAME: http_request_type +#+BEGIN_SRC sh +http +#+END_SRC + +#+NAME: http_host +#+BEGIN_SRC sh +localhost +#+END_SRC + +#+NAME: www_url_doc_root +#+BEGIN_SRC sh +http://localhost +#+END_SRC + +#+NAME: www_url_doc_subroot +#+BEGIN_SRC sh +/spine +#+END_SRC + +#+NAME: processing_path_doc_root +#+BEGIN_SRC sh +/srv/www/spine +#+END_SRC + +#+NAME: www_doc_subroot +#+BEGIN_SRC sh +/spine +#+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 |