blob: 35f458e0a421f439d8cdb302a46d7b937aacb61e (
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
|
-*- 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
*** set program version tangle SET :version:
#+HEADER: :tangle "../views/version.txt"
#+BEGIN_SRC txt
<<spine_version_struct>>
<<spine_version_current_set>>
<<spine_compiler_restrictions>>
#+END_SRC
*** program version struct
#+NAME: spine_version_struct
#+BEGIN_SRC d
/+ obt - org-mode generated file +/
struct Version {
int major;
int minor;
int patch;
}
#+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)
- 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 :configuration:
*** 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 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 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 = "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";
}
enum _cfg = Cfg();
#+END_SRC
|