blob: ae3f9c49be59b2f386364363db4c9c1230891470 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
-*- 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 - 2021 Ralph Amissah
#+LANGUAGE: en
#+STARTUP: content hideblocks hidestars noindent entitiespretty
#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t
#+PROPERTY: header-args :exports code
#+PROPERTY: header-args+ :noweb yes
#+PROPERTY: header-args+ :eval no
#+PROPERTY: header-args+ :results no
#+PROPERTY: header-args+ :cache no
#+PROPERTY: header-args+ :padline no
#+PROPERTY: header-args+ :mkdirp yes
* 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, 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
*** compilation restrictions (supported compilers)
- set compilation restrictions
https://dlang.org/spec/version.html#predefined-versions
#+NAME: spine_compiler_restrictions
#+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
#+HEADER: :tangle "../views/configuration_suggested.txt"
#+BEGIN_SRC d
/+ obt - org-mode generated file +/
struct Cfg {
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 = "<<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";
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 = "<<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
*** shared settings SET defaults
#+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
|