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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
|
-*- mode: org -*-
#+TITLE: sisudoc spine (doc_reform) information files
#+DESCRIPTION: documents - structuring, various output representations & search
#+FILETAGS: :spine:info:
#+AUTHOR: Ralph Amissah
#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
#+COPYRIGHT: Copyright (C) 2015 - 2024 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/]]
- [[./spine_build_scaffold.org][spine_build_scaffold.org]]
* README :readme:
** tangle
*** org contents
**** org contents tangle
#+HEADER: :tangle "../README"
#+HEADER: :noweb yes
#+BEGIN_SRC org
<<sisudoc_spine_README_header_org>>
<<sisudoc_spine_README_project_header_info>>
,* Summary
<<sisudoc_spine_README_summary>>
,* Build Configuration
<<sisudoc_spine_README_build_configuration>>
,* Compilation, Installation
,** D compiler (dmd, ldc2) & D build manager (dub)
<<sisudoc_spine_README_install_summary>>
,** make a directory & clone the sisudoc-spine project
<<sisudoc_spine_README_install_clone>>
,** build sisudoc-spine
<<sisudoc_spine_README_install_build>>
,*** build using nix flakes on linux (binary in ./result/bin)
<<sisudoc_spine_README_install_build_using_nix_flakes>>
,*** build using dub directly (binary in ./bin)
<<sisudoc_spine_README_install_build_using_dub_directly>>
,* Commands
<<sisudoc_spine_README_commands>>
#+END_SRC
**** org header
#+NAME: sisudoc_spine_README_header_org
#+BEGIN_SRC org
-*- mode: org -*-
,#+TITLE: spine (sisudoc) (project) README
,#+DESCRIPTION: README for spine search
,#+FILETAGS: :spine:build:tools:
,#+AUTHOR: Ralph Amissah
,#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
,#+COPYRIGHT: Copyright (C) 2015 - 2024 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
#+END_SRC
*** md contents tangle
#+HEADER: :tangle "../README.md"
#+HEADER: :noweb yes
#+BEGIN_SRC text
<<sisudoc_spine_README_project_header_info>>
# Summary
<<sisudoc_spine_README_summary>>
# Build Configuration
<<sisudoc_spine_README_build_configuration>>
# Compilation, Installation
## D compiler (dmd, ldc2) & D build manager (dub)
<<sisudoc_spine_README_install_summary>>
## make a directory & clone the sisudoc-spine project
<<sisudoc_spine_README_install_clone>>
## build sisudoc-spine
<<sisudoc_spine_README_install_build>>
### build using nix flakes on linux (binary in ./result/bin)
<<sisudoc_spine_README_install_build_using_nix_flakes>>
### build using dub directly (binary in ./bin)
<<sisudoc_spine_README_install_build_using_dub_directly>>
# Commands
<<sisudoc_spine_README_commands>>
#+END_SRC
** project yaml header
#+NAME: sisudoc_spine_README_project_header_info
#+BEGIN_SRC yaml
project_name: "sisudoc-spine-search"
description:
- "documents, structuring, processing, publishing"
- "search"
- "object numbering"
- "cgi search form for static content generator"
- "sisu markup"
author:
name: "Ralph Amissah"
email: ralph.amissah@gmail.com
copyright: "(C) 2015 - 2024 Ralph Amissah, All Rights Reserved."
license:
- "project code: AGPL 3 or later"
homepage:
- "https://sisudoc.org"
- "https://doc-reform.org"
git:
- "https://git.sisudoc.org"
#+END_SRC
** project summary - short description
#+NAME: sisudoc_spine_README_summary
#+BEGIN_SRC text
This is a sample cgi search form for access to an sqlite3 db built and populated
by sisudoc-spine. As such you probably need the whold of the sisudoc.org spine
project.
SiSU is an object-centric, lightweight markup based, document structuring,
parser, publishing and search tool for document collections. It is command line
oriented and generates static content that is currently made searchable at an
object level through an SQL database. Markup helps define (delineate) objects
(primarily various types of text block) which are tracked in sequence,
substantive objects being numbered sequentially by the program for object
citation.
Development of sisudoc-spine started in 2015 on a Debian linux box as a
replacement for sisu (written in Ruby, starting 2000, and Perl from 1997).
(Using Nix and NixOS since 2020).
#+END_SRC
** installation
*** install summary
#+NAME: sisudoc_spine_README_install_summary
#+BEGIN_SRC text
SiSU spine is written in the programming language D for which there are 3
compilers: dmd, ldc, gdc
- https://wiki.dlang.org/Compilers
D projects tend to use dub as project manager
- https://code.dlang.org/packages/dub
- https://github.com/dlang/dub/blob/master/source/dub/commandline.d
The default build tools used are dub with ldc2 (dub is also tested)
#+END_SRC
*** install clone project
#+NAME: sisudoc_spine_README_install_clone
#+BEGIN_SRC text
Make a directory and clone the sisudoc-spine project (or just sisudoc-spine-
search-cgi as needed)
Make a directory and clone the sisudoc-spine project
mkdir ~/git.sisudoc
cd ~/git.sisudoc
git clone --depth=1 git://git.sisudoc.org/software/sisudoc-spine && \
git clone --depth=1 git://git.sisudoc.org/software/sisudoc-spine-search-cgi && \
git clone --depth=1 git://git.sisudoc.org/markup/sisudoc-spine-samples
such a relative directory layout will be assumed in the examples that provided
all work in this installation of sisudoc-spine-search-cgi will take place in the
directory: sisudoc-spine-search-cgi
#+END_SRC
*** install & build cgi search form
**** install & build cgi search form
#+NAME: sisudoc_spine_README_install_build
#+BEGIN_SRC text
NOTE all actions to build sisudoc-spine are taken within the directory
sisudoc-spine-search-cgi
cd sisudoc-spine-search-cgi
NOTE:
- if dub is used to build, the resulting binary should be located in ./bin:
- if "nix build" is used the resulting binary should be in ./result/bin
cd sisudoc-spine
#+END_SRC
**** install build project using nix flakes
#+NAME: sisudoc_spine_README_install_build_using_nix_flakes
#+BEGIN_SRC text
you need to have nix installed on your system, and to have nix flakes enabled,
on Debian for example, you would do the following:
sudo apt install nix
create the file in the given path & filename: ~/.config/nix/nix.conf
with the following content: experimental-features = flakes nix-command
which can be achieved thusly:
mkdir -p ~/.config/nix && echo "experimental-features = flakes nix-command" >> ~/.config/nix/nix.conf
- to use the D compiler ldc2:
nix build ".#spine-search-nixpkgs-ldc" --print-build-logs
# or
nix build ".#spine-search-overlay-ldc" --print-build-logs
- to use the D compiler dmd:
nix build ".#spine-search-nixpkgs-dmd" --print-build-logs
# or
nix build ".#spine-search-overlay-dmd" --print-build-logs
#+END_SRC
#+END_SRC
**** install build project using dub directly
#+NAME: sisudoc_spine_README_install_build_using_dub_directly
#+BEGIN_SRC text
- to use the D compiler ldc2:
# on nix (get dependencies by setting your development environment):
nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh
# assuming you have ldc2 & dub installed on your system:
dub run --compiler=ldmd2 --config=ldmd2 --combined --skip-registry=all
or
dub run --compiler=ldc2 --config=ldc2 --combined --skip-registry=all
- to use the D compiler dmd:
# on nix (get dependencies by setting your development environment):
nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh
# assuming you have dmd & dub installed on your system:
dub run --compiler=dmd --config=dmd --combined --skip-registry=all
#+END_SRC
** configuration
#+NAME: sisudoc_spine_README_build_configuration
#+BEGIN_SRC text
sisudoc-spine-search-cgi example form is served from a web-server that has been
configured for cgi. To get this example to work, you will need to edit the file
in ./views/configuration.txt to match the configuration of your web-server and
in particular: the the web server url; the name of the cgi script and; the name
and location of the sqlite database. The following is an example
./views/configuration.txt 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
** commands help
#+NAME: sisudoc_spine_README_commands
#+BEGIN_SRC text
For commands to populate the db to be searched by sisudoc-spine-search-cgi see
the README in sisudoc-spine and/or sisudoc-spine-samples
However, a number of command instructions provided will not work unless the
sqlite db has been initialised and like the web content, this the sqlite databse
will not be found by sisudoc-spine-search-cgi unless it is placed where the
web-server is configured to find it.
#+END_SRC
* COPYRIGHT & LICENSE
** notices
*** project (project root) ./
#+HEADER: :tangle "../COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC text
- Name: spine - SiSU Spine, Doc Reform
<<sisudoc_spine_copyright>>
<<sisudoc_spine_license_agpl3>>
<<sisudoc_spine_summary>>
<<sisudoc_spine_markup_samples>>
<<sisudoc_spine_dependencies>>
#+END_SRC
*** code source ./src
#+HEADER: :tangle "../src/COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC text
- Name: spine - SiSU Spine, Doc Reform
<<sisudoc_spine_copyright>>
<<sisudoc_spine_license_agpl3>>
<<sisudoc_spine_summary>>
<<sisudoc_spine_markup_samples>>
<<sisudoc_spine_dependencies>>
#+END_SRC
*** code source ./src/sisudoc
#+HEADER: :tangle "../src/sisudoc/COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC text
- Name: spine - SiSU Spine, Doc Reform
<<sisudoc_spine_copyright>>
<<sisudoc_spine_license_agpl3>>
<<sisudoc_spine_summary>>
<<sisudoc_spine_markup_samples>>
<<sisudoc_spine_dependencies>>
#+END_SRC
*** org files ./org
- .org literate programming:
- copyright asserted
- omitted
- license
- dependency information
#+HEADER: :tangle "../org/COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC text
- Name: spine - SiSU Spine, Doc Reform
<<sisudoc_spine_copyright>>
<<sisudoc_spine_summary>>
<<sisudoc_spine_markup_samples>>
#+END_SRC
*** doc (markup samples) ./doc
#+HEADER: :tangle-NO "../doc/COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC text
<<data>>
#+END_SRC
** incorporate
*** copyright
#+NAME: sisudoc_spine_copyright
#+BEGIN_SRC text
- Description: documents, structuring, processing, publishing, search
- static content generator
- Author: Ralph Amissah
[ralph.amissah@gmail.com]
- Copyright: (C) 2015 - 2024 Ralph Amissah
#+END_SRC
*** license
**** AGPLv3
#+NAME: sisudoc_spine_license_agpl3
#+BEGIN_SRC text
- code under src/* src/sisudoc/*
- License: AGPL 3 or later:
Spine, Doc Reform (SiSU), a framework for document structuring, publishing and
search
Copyright (C) Ralph Amissah
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU AFERO General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see [https://www.gnu.org/licenses/].
If you have Internet connection, the latest version of the AGPL should be
available at these locations:
[https://www.fsf.org/licensing/licenses/agpl.html]
[https://www.gnu.org/licenses/agpl.html]
#+END_SRC
*** spine_summary
#+NAME: sisudoc_spine_summary
#+BEGIN_SRC text
- Spine, Doc Reform (related to SiSU) uses standard:
- docReform markup syntax (based on SiSU markup)
- standard SiSU markup syntax with modified headers and minor
modifications
- docReform object numbering (based on SiSU object citation numbering)
- standard SiSU document object numbering
- Homepages:
[https://www.sisudoc.org]
#+END_SRC
#+BEGIN_SRC text
- Homepages:
[https://www.sisudoc.org]
[https://www.sisudoc.org]
- Git
[]
#+END_SRC
*** markup_samples
#+NAME: sisudoc_spine_markup_samples
#+BEGIN_SRC text
- Spine, Doc Reform (SiSU) markup samples
Individual document content Copyright (Author) [as stated in document header]
Individual document content License (Author) [as stated in document header]
#+END_SRC
*** dependencies
#+NAME: sisudoc_spine_dependencies
#+BEGIN_SRC text
- Dependencies [check dub.json or dub.sdl]
- Name: d2sqlite3
- Description:
This is a small wrapper around SQLite for the D programming language.
- Author:
[Nicolas Sicard]
[https://github.com/dlang-community/d2sqlite3/graphs/contributors]
- Copyright: (C) 2011-2018, Nicolas Sicard
- code:
- License: BSL-1.0
Boost Software License 1.0
[https://www.boost.org/LICENSE_1_0.txt]
- Homepages:
[https://github.com/dlang-community/d2sqlite3]
[https://code.dlang.org/packages/d2sqlite3]
- src/ext_depends/d2sqlite3
- sundry/spine_search_cgi/src/ext_depends_cgi/d2sqlite3
- Name: cgi.d
- Description:
- Author:
[Adam D. Ruppe]
- Copyright: (C) 2008 - 2023 Adam D. Ruppe
- code: cgi.d
aria2c https://raw.githubusercontent.com/adamdruppe/arsd/master/cgi.d
aria2c https://raw.githubusercontent.com/adamdruppe/arsd/master/core.d
- License: BSL-1.0
Boost Software License 1.0
[https://www.boost.org/LICENSE_1_0.txt]
(Check the bottom of the file for details)
- Homepages:
[https://github.com/adamdruppe/arsd]
- sundry/spine_search_cgi/src/ext_depends_cgi/arsd
#+END_SRC
* CHANGELOG :changelog:
#+BEGIN_SRC sh
CHL="CHANGELOG"
git log --pretty=format:'-_-%+s %+as %ae%+h%d%+b' --no-merges \
| sed "/^\\s*$/d" | sed "s/^\([ ]\)*\*/\1-/" | sed "s/ \+$//" | sed "s/^-_-$//" \
> ${CHL}
#+END_SRC
#+BEGIN_SRC sh
git log --pretty=format:"-_-_%+s %+as %ae%+h%d%+b" --no-merges \
> ${CHL} && sed -i '/^$/d; s/^\([ ]\)*\*/\1-/; s/ \+$//; s/^-_-_//' ${CHL}
#+END_SRC
|