diff options
Diffstat (limited to 'org/spine_info.org')
-rw-r--r-- | org/spine_info.org | 521 |
1 files changed, 521 insertions, 0 deletions
diff --git a/org/spine_info.org b/org/spine_info.org new file mode 100644 index 0000000..c0642ea --- /dev/null +++ b/org/spine_info.org @@ -0,0 +1,521 @@ +-*- 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>> + +,** Clone project + +<<sisudoc_spine_README_install_clone>> + +,** build sisudoc-spine + +<<sisudoc_spine_README_install_build>> + +,* 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 and clone the sisudoc-spine project + +<<sisudoc_spine_README_install_clone>> + +## build sisudoc-spine + +<<sisudoc_spine_README_install_build>> + +# 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 + + 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 sisudoc-spine-search-cgi will take place in the +directory: sisudoc-spine-search-cgi +#+END_SRC + +#+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 + +## directly with dub +### ldc2 + # on nix (get dependencies by setting your development environment): + nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh + + 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 + +### dmd + # on nix (get dependencies by setting your development environment): + nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh + + dub run --compiler=dmd --config=dmd --combined --skip-registry=all + dub --compiler=dmd --config=dmd + +## with make + +### ldc2 + + make ldc + +### dmd + + make dmd + +## with nix on linux / nixos + +### ldc2 + + nix build ".#spine-search-nixpkgs-ldc" --print-build-logs + # or + nix build ".#spine-search-overlay-ldc" --print-build-logs + +### dmd + + nix build ".#spine-search-nixpkgs-dmd" --print-build-logs + # or + nix build ".#spine-search-overlay-dmd" --print-build-logs + +## the Meson build system was used briefly + +On recommendation at debconf-18 meson was used briefly. It has neither been +tested nor used since the move to nix. + +- https://mesonbuild.com/ + + meson + ninja -C build + meson setup --wipe build && ninja -v -C build + make meson + +dub --force --compiler=ldc2 && sudo cp -v cgi-bin/spine-search /usr/lib/cgi-bin/. +#+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 "./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: :NO-tangle "../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 + + - 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 |