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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
echo '-*- mode: org -*-
* nixpkgs path?
# eval "$(nix print-dev-env)"
' > nixNote_.org
echo " <nixpkgs> == `nix-instantiate --find-file nixpkgs`" >> nixNote_.org
echo '
* nix build and show derivation
#+BEGIN_SRC sh
nix-shell --pure
nix-build
nix build -f default.nix
nix shell -f default.nix
nix-instantiate | nix-build
nix build `nix-instantiate`
nix develop
nix-instantiate | nix show-derivation | jq
nix-instantiate | nix show-derivation --recursive | jq
nix search --json 2>/dev/null |jq
#+END_SRC
* version and build info
#+BEGIN_SRC sh' >> nixNote_.org
echo 'spine version (git) == $SpineVER' >> nixNote_.org
echo "spine version (git) == $SpineVER" >> nixNote_.org
echo 'nix-instantiate == `nix-instantiate`' >> nixNote_.org
echo "nix-instantiate == `nix-instantiate`" >> nixNote_.org
echo "#+END_SRC
* initialised shell variables
#+BEGIN_SRC sh
SpineSRC=$SpineSRC
SpineDOC=$SpineDOC
SpinePOD=$SpinePOD
SpineOUTversioned=$SpineOUTversioned
SpineOUT=$SpineOUT
#+END_SRC
" >> nixNote_.org
echo '* spine run instruction examples
** parallelized tasks
*** doc source
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --pod --source --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
*** html & epub output
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --html --epub --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
*** sqlite db for each document - populate each db
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
*** doc source; html, epub; sqlite outputs
#+BEGIN_SRC sh
$SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
*** curate (authors topics)
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --curate --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
*** html, curate
#+BEGIN_SRC sh
$SpineBIN/spine --verbose --dark --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/*
$SpineBIN/spine --very-verbose --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
*** composite command: source pod, html, epub, curate, sqlite
#+BEGIN_SRC sh
$SpineBIN/spine --verbose --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
** sequential tasks
*** sqlite db (shared) - create db
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned"
#+END_SRC
*** sqlite db (shared) - populate db
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUTversioned" $SpineDOC/spine-markup-samples/markup/pod/*
#+END_SRC
*** sqlite db (shared) - drop db
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUTversioned"
#+END_SRC
*** sqlite db (shared) - create & populate db (single step)
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
*** composite command: source pod, html, epub, curate, sqlite
#+BEGIN_SRC sh
$SpineBIN/spine --verbose --no-parallel --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
#+END_SRC
** config [./pod/].dr/config_local_site
#+BEGIN_SRC sh
cat $SpinePOD/.dr/config_local_site
$SpineBIN/spine --show-config $SpinePOD
$SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD
#+END_SRC
** cgi operations (output to $SpineOUT /var/www)
#+BEGIN_SRC sh
$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/*
$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/*
$SpineBIN/spine -v --show-config --config=$SpinePOD/.dr
$SpineBIN/spine --html $SpinePOD/*
$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site
#+END_SRC
*** generate html linked to search form
#+BEGIN_SRC sh
$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --output=$SpineOUT $SpinePOD/*
#+END_SRC
*** create or re-create sql db (--sqlite-db-create or --sqlite-db-recreate)
#+BEGIN_SRC sh
$SpineBIN/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath"
$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath"
#+END_SRC
*** populate sqlite db
#+BEGIN_SRC sh
$SpineBIN/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=$SpineOUT $SpinePOD/*
#+END_SRC
*** generate html (linked to search form), sql output, curate COMPOSITE
#+BEGIN_SRC sh
$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --sqlite-db-path="$SpineDBpath" --output="$SpineOUT" $SpinePOD/*
$SpineBIN/spine --epub --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --cgi-url-action="https://sisudoc.org/spine_search" --ouput="$SpineOUT" $SpinePOD/*
#+END_SRC
*** generate html (linked to search form), sql output, curate COMPOSITE with resource configuration
if names and paths are configured in resource configuration file, e.g. $SpinePOD/.rc/config_local_site
#+BEGIN_SRC sh
$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update $SpinePOD/*
#+END_SRC
#+BEGIN_SRC yaml
# sample resource configuration file ( $SpinePOD/.rc/config_local_site )
output:
path: "/srv/www/spine"
default:
language: "en"
papersize: "a4"
text_wrap: "80"
digest: "sha256"
webserv:
http: "http"
domain: "localhost"
data_http: "http"
data_domain: "localhost"
data_root_url: "https://sisudoc.org"
data_root_path: "/srv/www/spine"
images_root_part: "image"
cgi_search_form_title: "≅ SiSU Spine search"
cgi_http: "https"
cgi_domain: "sisudoc.org"
cgi_bin_url: "http://sisudoc.org/cgi-bin"
cgi_bin_part: "cgi-bin"
cgi_bin_path: "/var/www/cgi/cgi-bin"
cgi_search_script: "spine_search"
cgi_action: "https://sisudoc.org/spine_search"
db_sqlite_filename: "spine.search.db"
db_sqlite_path: "/var/www/sqlite"
#+END_SRC
*** make search form
#+BEGIN_SRC sh
$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site
#+END_SRC
*** latex
#+BEGIN_SRC sh
$SpineBIN/spine --latex --serial --output="$SpineOUT" $SpinePOD/*
ls $SpineOutstatic/latex/*.tex
#+END_SRC
' >> nixNote_.org
#cat nixNote_.org
#echo "emacs nixNote_.org"
#echo "cat nixNote_.org"
|