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
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
|
-*- 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>>
,* Compilation, Installation
,** D compiler (dmd, ldc2) & D build manager (dub)
<<sisudoc_spine_README_install_summary>>
,** Clone project
<<sisudoc_spine_README_install_clone>>
,** build sisudoc-spine
<<sisudoc_spine_README_install_build>>
,* Commands - document processing examples
,** basic output
<<sisudoc_spine_README_command_examples_basic>>
,** curate
<<sisudoc_spine_README_command_examples_curate_text>>
,** sqlite
<<sisudoc_spine_README_command_examples_sqlite_text>>
,*** create db
<<sisudoc_spine_README_command_examples_create_db_text>>
,*** populate db
<<sisudoc_spine_README_command_examples_populate_db_text>>
,*** generate a cgi search form in d
<<sisudoc_spine_README_command_examples_search_db_cgi_text>>
,**** compile the cgi search form
<<sisudoc_spine_README_command_examples_compile_search_db_cgi_text>>
,*** create db & search form
<<sisudoc_spine_README_command_examples_create_db_and_search_form_text>>
,*** html with links to search form
<<sisudoc_spine_README_command_examples_html_with_links_to_search_form_text>>
,** commands help
<<sisudoc_spine_README_commands_help>>
,* Configure
,* command line instruction
<<sisudoc_spine_README_configure_command_line>>
,* configure environment
<<sisudoc_spine_README_configure_env>>
,* configuration files
<<sisudoc_spine_README_configure_files>>
#+END_SRC
**** org header
#+NAME: sisudoc_spine_README_header_org
#+BEGIN_SRC org
-*- mode: org -*-
,#+TITLE: spine (sisudoc) (project) README
,#+DESCRIPTION: README for spine
,#+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>>
# Compilation, Installation
## D compiler (dmd, ldc2) & D build manager (dub)
<<sisudoc_spine_README_install_summary>>
## Clone project
<<sisudoc_spine_README_install_clone>>
## build sisudoc-spine
<<sisudoc_spine_README_install_build>>
# Commands - document processing examples
## basic output
<<sisudoc_spine_README_command_examples_basic>>
## curate
<<sisudoc_spine_README_command_examples_curate_text>>
## sqlite
<<sisudoc_spine_README_command_examples_sqlite_text>>
### create db
<<sisudoc_spine_README_command_examples_create_db_text>>
### populate db
<<sisudoc_spine_README_command_examples_populate_db_text>>
### generate a cgi search form in d
<<sisudoc_spine_README_command_examples_search_db_cgi_text>>
#### compile the cgi search form
<<sisudoc_spine_README_command_examples_compile_search_db_cgi_text>>
### create db & search form
<<sisudoc_spine_README_command_examples_create_db_and_search_form_text>>
### html with links to search form
<<sisudoc_spine_README_command_examples_html_with_links_to_search_form_text>>
## commands help
<<sisudoc_spine_README_commands_help>>
# Configure
## command line instruction
<<sisudoc_spine_README_configure_command_line>>
## configure environment
<<sisudoc_spine_README_configure_env>>
## configuration files
<<sisudoc_spine_README_configure_files>>
#+END_SRC
** project yaml header
#+NAME: sisudoc_spine_README_project_header_info
#+BEGIN_SRC yaml
project_name: "sisudoc spine (doc reform)"
description:
- "documents, structuring, processing, publishing"
- "search"
- "object numbering"
- "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
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
mkdir ~/git.sisudoc
cd ~/git.sisudoc
git clone git://git.sisudoc.org/software/sisudoc-spine && \
git clone git://git.sisudoc.org/software/sisudoc-spine-search-cgi && \
git clone 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 and use of sisudoc-spine will take place in the
directory: sisudoc-spine
#+END_SRC
*** install build project
#+NAME: sisudoc_spine_README_install_build
#+BEGIN_SRC text
NOTE all actions to build sisudoc-spine are taken within the directory
sisudoc-spine
cd sisudoc-spine
to build directly with dub, either:
for 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
dub --compiler=ldmd2 --config=ldmd2
dub run --compiler=ldc2 --config=ldc2 --combined --skip-registry=all
dub --compiler=ldc2 --config=ldc2
for 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
dub --compiler=dmd --config=dmd
to build with make using the provided makefile, (assuming you have the named
compiler and dub installed on your system) either:
for ldc2:
make ldc
for dmd:
make dmd
to build using nix flakes on linux / nixos
for ldc2:
nix build ".#spine-nixpkgs-ldc" --print-build-logs
for dmd:
nix build ".#spine-nixpkgs-dmd" --print-build-logs
The Meson build system was used briefly to build spine, but the spine build
tooling for Meson has not been updated, maintained or tested in recent years.
meson
ninja -C build
meson setup --wipe build && ninja -v -C build
make meson
- https://mesonbuild.com/
dub --force --compiler=ldc2 && sudo cp -v cgi-bin/spine-search /usr/lib/cgi-bin/.
#+END_SRC
** commands
*** commands basic
#+NAME: sisudoc_spine_README_command_examples_basic
#+BEGIN_SRC text
For the most basic output you will need to specify:
- the spine binary (executable)
- the (recognized) path to a prepared (spine marked up) document or document
collection
- the (path to) where the output is to be placed
- the output types you seek
export SpineBIN=./result/bin/spine
export SpinePOD=../sisudoc-spine-samples/markup/pod
export SpineOUT=./OUTPUT_TEST_sisudocSpine
${SpineBIN} -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/*
${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/*
which would execute the following command:
./result/bin/spine -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisudoc-spine-samples/markup/pod/*
./result/bin/spine -v --source --pod --latex --latex-init --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisudoc-spine-samples/markup/pod/*
#+END_SRC
*** commands help
#+NAME: sisudoc_spine_README_commands_help
#+BEGIN_SRC text
for a list of commands from the program type:
spine -h
#+END_SRC
#+BEGIN_SRC text
for a list of commands from the program type:
spine -h
at the time of writing this provides the following output:
--abstraction document abstraction
--allow-downloads allow downloads (includes cgi.d from github)
--assert set optional assertions on
--cgi-bin-root path to cgi-bin directory
--cgi-url-root url to cgi-bin (to find cgi-bin)
--cgi-url-action url to post to cgi-bin search form
--cgi-search-title if generating a cgi search form the title to use for it
--cgi-sqlite-search-filename =[filename] default is spine-search
--concordance file for document
--curate extract info on authors & topics from document header metadata
--curate-authors extract info on authors from document header metadata
--curate-topics extract info on topics from document header metadata
--dark alternative dark theme
--digest hash digest for each object
--epub process epub output
--generated-by generated by headers (software version & time)
--hide-ocn object cite numbers
--html process html output
--html-link-curate place links back to curate in segmented html
--html-link-markup provide html link to markup source, shared optionally
--html-link-pdf provide html link to pdf a4 & letter output
--html-link-pdf-a4 provide html link to pdf a4 output
--html-link-pdf-letter provide html link to pdf letter size output
--html-link-search html embedded search submission
--html-seg process html output
--html-scroll process html output
--lang =[lang code e.g. =en or =en,es]
--latex latex output (for pdfs)
--latex-color-links mono or color links for pdfs
--latex-init initialise latex shared files (see latex-header-sty)
--latex-header-sty latex document header sty files
--light default light theme
--manifest process manifest output
--ocn-off object cite numbers
--odf open document format text (--odt)
--odt open document format text
--output =/path/to/output/dir specify where to place output
--parallel parallelisation
--parallel-subprocesses nested parallelisation
--pdf latex output for pdfs
--pdf-color-links mono or color links for pdfs
--pdf-init initialise latex shared files (see latex-header-sty)
--pod spine (doc reform) pod source content bundled
-q --quiet output to terminal
--section-backmatter document backmatter (default)
--section-biblio document biblio (default)
--section-blurb document blurb (default)
--section-body document body (default)
--section-bookindex document bookindex (default)
--section-endnotes document endnotes (default)
--section-glossary document glossary (default)
--section-toc table of contents (default)
--serial serial processing
--skip-output skip output
--show-config show config
--show-curate show curate
--show-curate-authors show curate authors
--show-curate-topics show curate topics
--show-epub show epub
--show-html show html
--show-latex show latex
--show-make show make
--show-manifest show manifest
--show-metadata show metadata
--show-pod show pod
--show-sqlite show sqlite
--show-summary show summary
--source document markup source
--set-digest default hash digest type (e.g. sha256)
--set-papersize default papersize (latex pdf eg. a4 or a5 or b4 or letter)
--set-textwrap default textwrap (e.g. 80 (characters)
--sqlite-discrete process discrete sqlite output
--sqlite-db-create create db, create tables
--sqlite-db-drop drop tables & db
--sqlite-db-filename sqlite db to create, populate & make available for search
--sqlite-db-path sqlite db path
--sqlite-db-recreate create db, create tables
--sqlite-delete sqlite output
--sqlite-insert sqlite output
--sqlite-update sqlite output
--www-http http or https
--www-host web server host (domain) name
--www-host-doc-root web host host (domain) name with path to doc root
--www-url-doc-root e.g. http://localhost
--text text output
--theme-dark alternative dark theme
--theme-light default light theme
--txt text output
-v --verbose output to terminal
--very-verbose output to terminal
--workon (reserved for some matters under development & testing)
--xhtml xhtml output
--config =/path/to/config/file/including/filename
--debug debug
--debug-curate debug curate
--debug-curate-authors debug curate authors
--debug-curate-topics debug curate topics
--debug-epub debug epub
--debug-harvest debug harvest
--debug-html debug html
--debug-latex debug latex
--debug-manifest debug manifest
--debug-metadata debug metadata
--debug-pod debug pod
--debug-sqlite debug sqlite
--debug-stages debug stages
-h --help This help information.
#+END_SRC
*** other command instruction examples
#+NAME: sisudoc_spine_README_command_examples_curate_text
#+BEGIN_SRC text
if you have a document collection with documents that have metadata headers a
summary of the collection can be made using the curate command:
${SpineBIN} -v --curate --output=${SpineOUT} ${SpinePOD}/*
spine -v --curate --output=./OUTPUT_TEST_sisudocSpine ../sisudoc-spine-samples/markup/pod/*
${SpineBIN} -v --html --html-link-curate --curate --output=${SpineOUT} ${SpinePOD}/*
spine -v --html --html-link-curate --curate --output=./OUTPUT_TEST_sisudocSpine ../sisudoc-spine-samples/markup/pod/*
#+END_SRC
#+NAME: sisudoc_spine_README_command_examples_sqlite_text
#+BEGIN_SRC text
Configuration and setup are required to use sqlite search with sisudoc-spine for
the first.
- sqlite3 will need to be installed and recognized as such by the program
- you will need to have a web server configured to run cgi
- sisudoc-spine-search-cgi will need to be compiled and the binary placed in the
appropriate cgi path
- you will need to use sisudoc-spine to initialize the database (create tables
and indexes)
- sisudoc-spine can be used to populate the database, and produce html with
entry submission fields that link to the cgi search
if configuartion has been set specify just
- the desired output and
- the markup document/pod(s) to process
spine -v --html --html-link-search ${SpinePOD}/*
if configuration has not been set or to overide the set configuration specify
- the output path as well as
- the desired output and
- the markup document/pod(s) to process
note: ~webDocRoot should be the path to web doc root, provide a suitable output path.
spine -v --html --html-link-search --html-link-curate --output=`echo ~webDocRoot` ~spineMarkupSamples/pod/*
spine -v --html --html-link-search --html-link-curate --epub --output=`echo ~webDocRoot` ~spineMarkupSamples/pod/*
spine -v --html --epub --latex --odt --curate --output=`echo ~webDocRoot` ~spineMarkupSamples/pod/*
#+END_SRC
#+NAME: sisudoc_spine_README_command_examples_create_db_text
#+BEGIN_SRC text
If there is no sqlite db, you first need to create one (an empty db - tables &
indexes), to do so you must specify:
- the spine binary (executable)
- the name of the db and
- the path for where the db is to be built
(& you must of course have write permission):
spine -v --sqlite-db-create --sqlite-db-filename="spineishearch.db" --sqlite-db-path="/var/www/sqlite"
If you have a configration file providing this information that is to be used
for a document collection you can point to the document collection (where the
configuraton file "config_local_site" will be looked for in the .dr
sub-directory):
spine -v --sqlite-db-create ${SpinePOD}
To drop (destroy) and re-create a db, you instead would use: --sqlite-db-recreate
#+END_SRC
#+NAME: sisudoc_spine_README_command_examples_populate_db_text
#+BEGIN_SRC text
To populate a db with documents prepared for sisudoc-spine, you must specify:
- the spine binary (executable)
- the name of the db
- the path to the db
- the (recognized) path to a prepared (spine marked up) document or document
- and the root path for document output
spine -v --sqlite-update \
--sqlite-db-filename="spine.search.db" \
--output=/var/www/html \
~spineMarkupSamples/pod/*
spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=`echo ~webDocRoot` ~spineMarkupSamples/pod/*
if you have a configration file providing this information that is to be used
for a document collection you can point to the document collection:
spine -v --sqlite-update ~spineMarkupSamples/pod/*
${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-search --html-link-pdf --html-link-curate --html-link-markup --cgi-sqlite-search-filename="${SpineCGIform}" --cgi-url-action="${SpineSearchActionRemote}" --curate --sqlite-update --sqlite-kb-filename="${SpineSQLdb}" --output=${SpineOUT} ${SpinePOD}/*
#+END_SRC
#+NAME: sisudoc_spine_README_command_examples_search_db_cgi_text
#+BEGIN_SRC text
spine -v --cgi-search-form-codegen \
--output=/var/www/html \
~spineMarkupSamples/pod
spine -v --cgi-search-form-codegen --config=~spineMarkupSamples/pod
spine -v --cgi-search-form-codegen --config=~spineMarkupSamples/pod/.dr/config_local_site
spine --cgi-search-form-codegen --output=`echo ~webDocRoot` ~spineMarkupSamples/pod
spine --cgi-search-form-codegen --cgi-sqlite-search-filename="spine_search" --output=`echo ~webDocRoot`
spine -v --cgi-search-form-codegen \
--sqlite-db-filename="spine.search.db" \
--cgi-sqlite-search-filename="spine-search" \
--output=/var/www/html \
~spineMarkupSamples/pod
#+END_SRC
#+NAME: sisudoc_spine_README_command_examples_compile_search_db_cgi_text
#+BEGIN_SRC text
cd /var/www/html/cgi # /var/www/html (default document root)
cd ~webDocRoot/cgi
the directory ~webDocRoot/cgi/src should contain two files
- spine_search.d (or whatever you named it)
- cgi.d (by Adam Rupee)
dub --force --compiler=ldc2 && sudo cp -v cgi-bin/spine-search /usr/lib/cgi-bin/.
should compile spine-search in ~webDocRoot/cgi/cgi-bin and copy it to the
cgi-bin directory
spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=`echo ~webDocRoot`
spine -v --sqlite-db-create ~spineMarkupSamples/pod
spine -v --html --html-link-search --cgi-sqlite-search-filename="spine-search" --output=`echo ~webDocRoot` ~spineMarkupSamples/pod/*
spine -v --html --html-link-search --output=`echo ~webDocRoot` ~spineMarkupSamples/pod/*
spine -v --html --html-link-search --cgi-sqlite-search-filename="spine-search" --html-link-curate --curate --output=`echo ~webDocRoot` ~spineMarkupSamples/pod/*
${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-search --html-link-pdf --html-link-curate --html-link-markup --cgi-sqlite-search-filename="${SpineCGIform}" --cgi-url-action="${SpineSearchActionLocal}" --curate --sqlite-update --sqlite-db-filename="${SpineSQLdb}" --output=${SpineOUT} ${SpinePOD}/*
#+END_SRC
#+NAME: sisudoc_spine_README_command_examples_create_db_and_search_form_text
#+BEGIN_SRC text
spine -v \
--sqlite-db-create --sqlite-db-filename="spine.search.db" \
--cgi-search-form-codegen --cgi-sqlite-search-filename="spine-search" \
--output=/var/www/html \
~spineMarkupSamples/pod/*
#+END_SRC
#+NAME: sisudoc_spine_README_command_examples_html_with_links_to_search_form_text
#+BEGIN_SRC text
${SpineBIN} -v --epub --html --html-link-curate --curate --output=${SpineOUT} ${SpinePOD}/*
${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/*
${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-search --html-link-pdf --html-link-curate --html-link-markup --cgi-sqlite-search-filename="${SpineCGIform}" --cgi-url-action="${SpineSearchActionLocal}" --curate --sqlite-update --sqlite-db-filename="${SpineSQLdb}" --output=${SpineOUT} ${SpinePOD}/*
spine -v --html \
--html-link-search \
--output=`echo ~webDocRoot` \
${SpinePOD}/*
#+END_SRC
** configuration
*** configure, command line flag settings
#+NAME: sisudoc_spine_README_configure_command_line
#+BEGIN_SRC text
Many configuration options can be passed directly from the command line using
command line flags. Evident from the examples given of basic commands.
#+END_SRC
*** configure, environment, exports
#+NAME: sisudoc_spine_README_configure_env
#+BEGIN_SRC text
These examples assume the file layout suggested in cloning the git.sisudoc.org
repository, i.e. that the directories sisudoc-spine and sisudoc-spine-samples
are next to each other on a directory tree. Assuming this to be the case, you
may wish to set the following exports with adjustments accoring to your specific
needs for these examples.
# ❯❯ set spine binary location:
export SpineBIN=./result/bin/spine
# ❯❯❯ nix builds spine binary:
#export SpineBIN=./result/bin/spine
# ❯❯❯ dub builds spine binary (name depends on build, check):
#export SpineBIN=./bin/spine
#export SpineBIN=./bin/spine-ldc
#export SpineBIN=./bin/spine-dmd
# ❯❯ location of source files:
export SpineDOC=../sisudoc-spine-samples
# ❯❯ location of source files pod:
export SpinePOD=${SpineDOC}/markup/pod
# ❯❯ sisudoc-spine output processing path:
export SpineOUT=./OUTPUT_TEST_sisudocSpine
# ❯❯ sisudoc-spine output processing path (web server e.g.):
#export SpineOUT=/srv/www/spine
# ❯❯ url to activate search (as configured on web server)
export SpineSearchActionLocal='http://localhost/spine_search'
export SpineSearchActionRemote='https://sisudoc.org/spine_search'
# ❯❯ path configured for cgi search form:
export SpineCGIform='spine_search'
# ❯❯ search form db name:
export SpineSQLdb='spine.search.db'
# ❯❯ configuration cgi search form path:
#export SpineCGIbin=/var/www/cgi/cgi-bin
# ❯❯ configuration db path:
#export SpineDBpath=/var/www/sqlite
#+END_SRC
*** configure, configuration files
#+NAME: sisudoc_spine_README_configure_files
#+BEGIN_SRC text
Configuration files are yaml files
The following paths are searched:
~/.dr/config_local_site
~/path_to_pod_root/.dr/config_local_site
e.g. processing
~spineMarkupSamples/pod/*
will search:
~spineMarkupSamples/pod/.dr/config_local_site
~/.dr/config_local_site
to specify an alternative configuration file to use on the command line (in this
example named "my_config"):
spine -v --html --config=~spineMarkup/pod/.dr/my_config
here are two sample configuration files
sample 1. a localhost (check your paths):
<<sisudoc_spine_configuration_sample1>>
sample 2. sisudoc:
<<sisudoc_spine_configuration_sample2>>
#+END_SRC
**** configuration sample 1: assumes localhost web server
#+NAME: sisudoc_spine_configuration_sample1
#+BEGIN_SRC yaml
flag:
act0: "--html"
act1: "--html --epub"
output:
path: "/var/www/html"
default:
language: "en"
papersize: "a4"
text_wrap: "80"
digest: "sha256"
webserv:
http: "http"
host: "localhost"
data_http: "http"
data_host: "localhost"
data_root_url: "http://localhost"
data_root_path: "/var/www/html"
data_root_part: ""
images_root_part: "image"
cgi_search_form_title: "≅ SiSU Spine search ፨"
cgi_http: "http"
cgi_host: "localhost"
cgi_bin_url: "http://localhost/cgi-bin"
cgi_bin_subpath: "/cgi-bin"
cgi_bin_path: "/usr/lib/cgi-bin"
cgi_search_script: "spine-search"
cgi_search_script_raw_fn_d: "spine_search.d"
cgi_port: ""
cgi_user: ""
cgi_action: "http://localhost/cgi-bin/spine-search"
db_sqlite: "spine.search.db"
db_pg_table: ""
db_pg_user: ""
#+END_SRC
**** configuration sample 2: web server with domain name
#+NAME: sisudoc_spine_configuration_sample2
#+BEGIN_SRC yaml
flag:
act0: "--html"
act1: "--html --epub"
output:
path: "/srv/www/spine"
default:
language: "en"
papersize: "a4,letter.portrait,b4.portrait"
text_wrap: "80"
digest: "sha256"
webserv:
http: "https"
domain: "sisudoc.org"
data_http: "https"
data_domain: "sisudoc.org"
data_root_url: "https://sisudoc.org"
data_root_path: "/srv/www/spine"
data_root_part: "/spine"
images_root_part: "image"
cgi_search_form_title: "≅ SiSU Spine search"
cgi_http: "https"
cgi_domain: "sisudoc.org"
cgi_bin_part: "cgi-bin"
cgi_bin_path: "/var/www/cgi/cgi-bin"
cgi_search_script: "spine_search"
cgi_search_script_raw_fn_d: "spine_search.d"
cgi_port: ""
cgi_user: ""
cgi_action: "https://sisudoc.org/spine_search"
db_sqlite_filename: "spine.search.db"
db_sqlite_path: "/var/www/sqlite"
db_pg_table: ""
db_pg_user: ""
#+END_SRC
* COPYRIGHT & LICENSE
** notices
*** project (project root) ./
#+HEADER: :tangle "../COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC txt
- 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 org ./org
#+HEADER: :tangle "../org/COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC txt
- 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 txt
- 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 txt
- 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 "./COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC txt
- Name: spine - SiSU Spine, Doc Reform
<<sisudoc_spine_copyright>>
<<sisudoc_spine_summary>>
<<sisudoc_spine_markup_samples>>
#+END_SRC
*** doc (markup samples) ./doc
#+HEADER: :NO-tangle "../doc/COPYRIGHT"
#+HEADER: :noweb yes
#+BEGIN_SRC txt
<<data>>
#+END_SRC
** incorporate
*** copyright
#+NAME: sisudoc_spine_copyright
#+BEGIN_SRC txt
- 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 txt
- 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 txt
- 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 txt
- Homepages:
[https://www.sisudoc.org]
[https://www.sisudoc.org]
- Git
[]
#+END_SRC
*** markup_samples
#+NAME: sisudoc_spine_markup_samples
#+BEGIN_SRC txt
- 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 txt
- 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: dyaml
- Description:
D:YAML is an open source YAML parser and emitter library for the D programming language.
- Author:
[Ferdinand Majerech]
- Copyright: (C) 2011-2018, Ferdinand Majerech
- code:
- License: BSL-1.0
Boost Software License 1.0
[https://www.boost.org/LICENSE_1_0.txt]
- Homepages:
[https://github.com/dlang-community/D-YAML]
[https://code.dlang.org/packages/dyaml]
- src/ext_depends/D-YAML
- Name: imageformats
- Description:
- Author:
[Tero Hänninen]
- Copyright: (C) Tero Hänninen
- code:
- License: BSL-1.0
Boost Software License 1.0
[https://www.boost.org/LICENSE_1_0.txt]
- Homepages:
[https://github.com/lgvz/imageformats]
[https://code.dlang.org/packages/imageformats]
- src/ext_depends/imageformats
- Name: tinyendian (dyaml dependency)
- Description:
TinyEndian is a minimal endianness library for the D programming language.
- Author:
[Ferdinand Majerech]
- Copyright: (C) 2014 Ferdinand Majerech
- code:
- License: BSL-1.0
Boost Software License 1.0
[https://www.boost.org/LICENSE_1_0.txt]
- Homepages:
[https://github.com/dlang-community/tinyendian]
[https://code.dlang.org/packages/tinyendian]
- src/ext_depends/tinyendian
- 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
- 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
|