diff options
Diffstat (limited to 'org')
42 files changed, 3440 insertions, 2282 deletions
diff --git a/org/COPYRIGHT b/org/COPYRIGHT index e076311..b1cdad5 100644 --- a/org/COPYRIGHT +++ b/org/COPYRIGHT @@ -5,7 +5,7 @@ - Author: Ralph Amissah [ralph.amissah@gmail.com] - - Copyright: (C) 2015 - 2024 Ralph Amissah + - Copyright: (C) 2015 - 2025 Ralph Amissah - Spine, Doc Reform (related to SiSU) uses standard: - docReform markup syntax (based on SiSU markup) diff --git a/org/compile_time_info.org b/org/compile_time_info.org index 20a6cc8..1332c2c 100644 --- a/org/compile_time_info.org +++ b/org/compile_time_info.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:compile: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/config_d_cfte.org b/org/config_d_cfte.org index 5b63bdd..2797609 100644 --- a/org/config_d_cfte.org +++ b/org/config_d_cfte.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -173,97 +173,97 @@ enum _cfg = Cfg(); **** default set #+NAME: http_request_type -#+BEGIN_SRC sh +#+BEGIN_SRC shell <<http_request_type_localhost>> #+END_SRC #+NAME: http_host -#+BEGIN_SRC sh +#+BEGIN_SRC shell <<http_host_localhost>> #+END_SRC #+NAME: www_url_doc_root -#+BEGIN_SRC sh +#+BEGIN_SRC shell <<www_url_doc_root_localhost>> #+END_SRC **** localhost #+NAME: http_request_type_localhost -#+BEGIN_SRC sh +#+BEGIN_SRC shell http #+END_SRC #+NAME: http_host_localhost -#+BEGIN_SRC sh +#+BEGIN_SRC shell localhost #+END_SRC #+NAME: www_url_doc_root_localhost -#+BEGIN_SRC sh +#+BEGIN_SRC shell http://localhost #+END_SRC **** remotehost #+NAME: http_request_type_remotehost -#+BEGIN_SRC sh +#+BEGIN_SRC shell https #+END_SRC #+NAME: http_host_remotehost -#+BEGIN_SRC sh +#+BEGIN_SRC shell sisudoc.org #+END_SRC #+NAME: www_url_doc_root_remotehost -#+BEGIN_SRC sh +#+BEGIN_SRC shell https://sisudoc.org #+END_SRC **** directory paths #+NAME: www_url_doc_subroot -#+BEGIN_SRC sh +#+BEGIN_SRC shell /spine #+END_SRC #+NAME: processing_path_doc_root -#+BEGIN_SRC sh +#+BEGIN_SRC shell /srv/www/spine #+END_SRC #+NAME: www_doc_subroot -#+BEGIN_SRC sh +#+BEGIN_SRC shell /spine #+END_SRC #+NAME: cgi_bin_root -#+BEGIN_SRC sh +#+BEGIN_SRC shell /var/www/cgi/cgi-bin #+END_SRC #+NAME: db_sqlite_path -#+BEGIN_SRC sh +#+BEGIN_SRC shell /var/www/sqlite #+END_SRC #+NAME: cgi_filename -#+BEGIN_SRC sh +#+BEGIN_SRC shell spine_search #+END_SRC #+NAME: cgi_bin_subpath -#+BEGIN_SRC sh +#+BEGIN_SRC shell /cgi-bin #+END_SRC #+NAME: cgi_search_form_title -#+BEGIN_SRC sh +#+BEGIN_SRC shell ≅ SiSU Spine search ፨ #+END_SRC #+NAME: db_sqlite_filename -#+BEGIN_SRC sh +#+BEGIN_SRC shell spine.search.db #+END_SRC diff --git a/org/config_dub.org b/org/config_dub.org index a6e715a..043e62c 100644 --- a/org/config_dub.org +++ b/org/config_dub.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -47,7 +47,7 @@ "authors": [ "Ralph Amissah" ], - "copyright": "Copyright © 2015 - 2024 Ralph Amissah", + "copyright": "Copyright © 2015 - 2025 Ralph Amissah", "name": "spine", "version": "<<spine_version>>", "description": "an object-centric sisu-like document parser", diff --git a/org/config_env.org b/org/config_env.org index 7b0d67d..db6af9d 100644 --- a/org/config_env.org +++ b/org/config_env.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:build:tools: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -23,7 +23,7 @@ ** nixDevEnv envrc :envrc: #+HEADER: :tangle ../nixDevEnv.sh -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [ -f .envrc ]; then source_env_if_exists .envrc || source .envrc fi @@ -33,7 +33,7 @@ fi #+NAME: envrc #+HEADER: :tangle ../.envrc -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [ -f .envrc-git-init ]; then source_env_if_exists .envrc-git-init || source .envrc-git-init fi @@ -49,15 +49,15 @@ fi - https://github.com/nix-community/nix-direnv - source_url - - direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/<<direnv-version>>/direnvrc" "<<direnv-sha>>" + - direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/<<direnv-version>>/direnvrc" "<<direnv_hash>>" - ${NixDirEnvVersion} #+HEADER: :tangle ../.envrc-nix -#+BEGIN_SRC sh +#+BEGIN_SRC shell NIX_ENFORCE_PURITY=1 # - https://github.com/nix-community/nix-direnv -NixDirEnvVersion="<<direnv-version>>" -NixDirEnvSHA="<<direnv-sha>>" +NixDirEnvVersion="<<direnv_version>>" +NixDirEnvSHA="<<direnv_hash>>" if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}" fi @@ -77,13 +77,14 @@ echo ' ❯❯ nix flake update && nix flake check && nix flake show • for a dev shell (development environment): - - ❯❯ nix develop - ❯❯ nix develop ".#" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh + • nix develop + ❯❯ nix develop ".#" --print-build-logs -c zsh + • nix develop using nixpkgs + ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh + • nix develop using package overlays: (dmd-<<dmd_version>>, ldc-<<ldc_version>>, dub-<<dub_version>>, dtools-<<dtools_version>>) + ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh ❯❯ nix flake show • to build project: @@ -92,10 +93,12 @@ echo ' ❯❯ nix build ".#" --print-build-logs • to build project: - ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs - ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs - ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs - ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs + • nix build using nixpkgs + ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs + ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs + • nix build using package overlays: (dmd-<<dmd_version>>, ldc-<<ldc_version>>, dub-<<dub_version>>, dtools-<<dtools_version>>) + ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs + ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs • to build using dub on nix (get dependencies by setting your development environment): @@ -123,72 +126,11 @@ echo "• " #+END_SRC -*** 3.0.6 - -#+NAME: direnv-version -#+BEGIN_SRC sh -3.0.6 -#+END_SRC - -#+NAME: direnv-sha -#+BEGIN_SRC sh -sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= -#+END_SRC - -*** 3.0.4 - -#+BEGIN_SRC sh -3.0.4 -#+END_SRC - -#+BEGIN_SRC sh -sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= -#+END_SRC - -*** 3.0.0 - -#+BEGIN_SRC sh -3.0.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= -#+END_SRC - -*** 2.4.0 - -#+BEGIN_SRC sh -2.4.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= -#+END_SRC - -#+BEGIN_SRC sh -2.3.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8= -#+END_SRC - -#+NAME: direnv-sha_ -#+BEGIN_SRC sh -sha256-0000000000000000000000000000000000000000000= -#+END_SRC - -#+BEGIN_SRC sh -- https://github.com/nix-community/nix-direnv -NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000=" -direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc -#+END_SRC - ** .envrc-git-init #+HEADER: :tangle ../.envrc-git-init #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [[ ! -d ./.git ]]; then git init git add . @@ -201,7 +143,7 @@ fi #+HEADER: :tangle ../.envrc-local_ #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') export SpineBIN=./result/bin/spine # ❯❯ nix builds spine binary: @@ -232,3 +174,61 @@ export SpineCGIbin=/var/www/cgi/cgi-bin export SpineDBpath=/var/www/sqlite #export SpineDBpath=/srv/www/spine/sqlite #+END_SRC + +* SHARED versions +** direnv + +#+NAME: direnv_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-version()>> +#+END_SRC + +#+NAME: direnv_hash +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-hash()>> +#+END_SRC + +** spine project VERSION :version:set:project: + +#+NAME: spine_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> +#+END_SRC + +** dlang overlays +*** ldc + +#+NAME: ldc_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version()>> +#+END_SRC + +*** dmd + +#+NAME: dmd_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dmd-version()>> +#+END_SRC + +*** dub + +#+NAME: dub_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dub-version()>> +#+END_SRC + +*** dtools + +#+NAME: dtools_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-version()>> +#+END_SRC + +* __END__ diff --git a/org/config_git.org b/org/config_git.org index fbafd2a..b997923 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -21,7 +21,7 @@ ** .gitignore :gitignore: #+HEADER: :tangle "../.gitignore" -#+BEGIN_SRC sh +#+BEGIN_SRC gitignore # git ls-files --others --exclude-from=.git/info/exclude # git check-ignore -v flake.lock # git clean -ix @@ -87,6 +87,20 @@ !sisudoc !views !docs/*.html +!sundry +!sundry/editor-syntax-etc +!sundry/editor-syntax-etc/vim +!sundry/editor-syntax-etc/vim/*.vim +!sundry/editor-syntax-etc/vim/*.yaml +!sundry/editor-syntax-etc/vim/colors +!sundry/editor-syntax-etc/vim/colors/*.vim +!sundry/editor-syntax-etc/vim/ftplugin +!sundry/editor-syntax-etc/vim/ftplugin/*.vim +!sundry/editor-syntax-etc/vim/syntax +!sundry/editor-syntax-etc/vim/syntax/*.vim +!sundry/editor-syntax-etc/emacs +!sundry/editor-syntax-etc/emacs/*.el +!sundry/editor-syntax-etc/emacs/README !notes notes/** !notes/sisu-description.sst @@ -115,7 +129,7 @@ tmp/** ** .gitattributes :gitattributes: #+HEADER: :tangle "../.gitattributes" -#+BEGIN_SRC sh +#+BEGIN_SRC gitattributes /org export-ignore /subprojects export-ignore /build export-ignore diff --git a/org/config_make.org b/org/config_make.org index 3806db0..286842b 100644 --- a/org/config_make.org +++ b/org/config_make.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:build:tools: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: show4levels hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -31,14 +31,14 @@ - meson #+NAME: meson_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.46 #+END_SRC - soversion #+NAME: soversion_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0 #+END_SRC diff --git a/org/config_meson.org b/org/config_meson.org index 9f2f27b..60690cc 100644 --- a/org/config_meson.org +++ b/org/config_meson.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -33,7 +33,7 @@ https://code.dlang.org/packages/d2sqlite3 #+NAME: d2sqlite3_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.19.1 #+END_SRC @@ -41,7 +41,7 @@ https://code.dlang.org/packages/imageformats #+NAME: imageformats_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 7.0.2 #+END_SRC @@ -49,7 +49,7 @@ https://code.dlang.org/packages/dyaml #+NAME: dyaml_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.8.3 #+END_SRC @@ -57,7 +57,7 @@ https://code.dlang.org/packages/tinyendian #+NAME: tinyendian_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.2.0 #+END_SRC @@ -66,14 +66,14 @@ - meson #+NAME: meson_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.46 #+END_SRC - soversion #+NAME: soversion_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0 #+END_SRC @@ -115,7 +115,7 @@ cat spine_sources.txt #+HEADER: :tangle ../meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell project('spine', 'd', license: 'AGPL-3', version: '<<spine_version>>', @@ -220,7 +220,7 @@ spine_exe = executable('spine', ***** wrap #+HEADER: :tangle ../subprojects/d2sqlite3.wrap -#+BEGIN_SRC sh +#+BEGIN_SRC shell [wrap-git] directory = d2sqlite3 url = https://github.com/dlang-community/d2sqlite3.git @@ -231,7 +231,7 @@ revision = head #+HEADER: :NO-tangle ../subprojects/d2sqlite3.meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell project('d2sqlite3', 'd', meson_version: '>=<<meson_version_set>>', license: 'BSL-1.0', @@ -286,7 +286,7 @@ d2sqlite3_dep = declare_dependency( ***** wrap #+HEADER: :tangle ../subprojects/dyaml.wrap -#+BEGIN_SRC sh +#+BEGIN_SRC shell [wrap-git] directory = dyaml url = https://github.com/dlang-community/D-YAML.git @@ -299,7 +299,7 @@ Upstream provides meson.build #+HEADER: :NO-tangle ../subprojects/D-YAML/meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell project('D-YAML', 'd', meson_version: '>=<<meson_version_set>>', subproject_dir: 'contrib', @@ -376,7 +376,7 @@ dyaml_dep = declare_dependency( ***** wrap #+HEADER: :tangle ../subprojects/imageformats.wrap -#+BEGIN_SRC sh +#+BEGIN_SRC shell [wrap-git] directory = imageformats url = https://github.com/lgvz/imageformats.git @@ -387,7 +387,7 @@ revision = head #+HEADER: :NO-tangle ../subprojects/imageformats.meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell project('imageformats', 'd', meson_version: '>=<<meson_version_set>>', license: 'BSL-1.0', @@ -434,7 +434,7 @@ imageformats_dep = declare_dependency( ***** wrap #+HEADER: :tangle ../subprojects/tinyendian.wrap -#+BEGIN_SRC sh +#+BEGIN_SRC shell [wrap-git] directory = tinyendian url = https://github.com/dlang-community/tinyendian.git @@ -447,7 +447,7 @@ Upstream provides meson.build #+HEADER: :NO-tangle ../subprojects/tinyendian/meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell # -*- mode: python; -*- project( diff --git a/org/config_misc.org b/org/config_misc.org index 8d0de84..cf79a58 100644 --- a/org/config_misc.org +++ b/org/config_misc.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -26,7 +26,7 @@ babel tangle) org files in ./org/ to create .d source files in ./src/sisudoc/ #+HEADER: :tangle ../tangle #+HEADER: :tangle-mode (identity #o755) #+HEADER: :shebang "#!/bin/sh" -#+BEGIN_SRC sh +#+BEGIN_SRC shell # -*- mode: shell-script -*- # tangle files with org-mode DIR=`pwd` @@ -56,11 +56,11 @@ emacs --batch -Q -q \ ** build *** dub -#+BEGIN_SRC sh +#+BEGIN_SRC shell dub build -h #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell time dub --compiler=ldc2 -v --force time (dub --compiler=ldc2 --config=spine-ldc --debug=steps) time (dub --compiler=ldc2 --config=spine-ldc --debug=checkdoc --debug=summary --debug=dumpdoc) @@ -79,7 +79,7 @@ time (dub --compiler=gdc --config=spine-gdc-debug --debug=io) *** make -#+BEGIN_SRC sh +#+BEGIN_SRC shell time make dmd time make gdc time make ldc @@ -98,13 +98,13 @@ time make ldc_testrun_find_pod_epub ** git *** project version -#+BEGIN_SRC sh +#+BEGIN_SRC shell echo $(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') #+END_SRC *** what files changed -#+BEGIN_SRC sh +#+BEGIN_SRC shell git whatchanged --since="1 day ago" --oneline --name-only --pretty=format: | sort -u git log --since="1 day ago" --name-only --pretty=format: | sort -u #+END_SRC @@ -112,7 +112,7 @@ git log --since="1 day ago" --name-only --pretty=format: | sort -u ** test run *** e.g. -#+BEGIN_SRC sh +#+BEGIN_SRC shell time (./result/bin/spine --source --html -v --output-dir=tmp/program-output data/pod/sisu-manual/media/text/en/sisu_markup.sst ) time (./bin/spine-ldc --source --html -v --output-dir=tmp/program-output data/pod/sisu-manual/media/text/en/sisu_markup.sst ) @@ -144,7 +144,7 @@ find data/sisudir/media/text -name *.ss[tm] | sort | xargs *** sort -#+BEGIN_SRC sh +#+BEGIN_SRC shell ~dr/bin/spine-ldc -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=/var/www/html \ ~grotto/repo/git.repo/code/project-spine/doc-reform-markup/markup_samples/markup/pod/* @@ -170,7 +170,7 @@ find data/sisudir/media/text -name *.ss[tm] | sort | xargs - search script in D @: /var/www/html/cgi/src/spine_search.d - html output * /var/www/html/en/html/[filename] -#+BEGIN_SRC sh +#+BEGIN_SRC shell cd /var/www/html/cgi cp arsd/cgi.d /var/www/html/cgi/. *-[needs to be implemented as part of code] diff --git a/org/config_nix.org b/org/config_nix.org index e394822..3ec97d0 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:build:tools: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: show4levels hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -44,9 +44,10 @@ runHook postCheck ''; localOverlay = (final: prev: { - ldc = prev.callPackage ./nix-overlays/ldc { }; - dmd = prev.callPackage ./nix-overlays/dmd { }; - dub = prev.callPackage ./nix-overlays/dub { }; + ldc = prev.callPackage ./nix-overlays/ldc { }; # -> ok <<ldc_version>> + dmd = prev.callPackage ./nix-overlays/dmd { }; # -> ok <<dmd_version>> + dub = prev.callPackage ./nix-overlays/dub { }; # -> ? <<dub_version>> + dtools = prev.callPackage ./nix-overlays/dtools { }; # -> ok <<dtools_version>> #gdc = prev.callPackage ./nix-overlays/gdc { }; }); pkgsForSystem = system: import nixpkgs { @@ -153,6 +154,7 @@ spine-overlay-dmd = stdenv.mkDerivation { inherit pname; inherit version; + #name = "spine-<<spine_version>> dmd-<<dmd_version>> dub-<<dub_version>>"; meta.mainProgram = "spine-dmd"; executable = true; src = self; @@ -176,6 +178,7 @@ spine-overlay-ldc = stdenv.mkDerivation { inherit pname; inherit version; + #name = "spine-<<spine_version>> ldc-<<ldc_version>> dub-<<dub_version>>"; meta.mainProgram = "spine-ldc"; executable = true; src = self; @@ -235,74 +238,80 @@ in with pkgs-nix; { dsh-overlay = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell, ldc-<<ldc_version>>, dub-<<dub_version>> - dtools-<<dtools_version>>"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ ldc #dmd dub + dtools gnumake sqlite ]; inherit shellHook; }; dsh-nixpkgs-dmd-dub = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell"; inherit shell; inherit devEnv; packages = [ dmd dub + dtools gnumake sqlite ]; inherit shellHook; }; dsh-nixpkgs-ldc-dub = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell"; inherit shell; inherit devEnv; packages = [ ldc dub + dtools gnumake sqlite ]; inherit shellHook; }; dsh-overlay-dmd-dub = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell, dmd-<<dmd_version>>, dub-<<dub_version>> - dtools-<<dtools_version>>"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ dmd dub + dtools gnumake sqlite ]; inherit shellHook; }; dsh-overlay-ldc-dub = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell, ldc-<<ldc_version>>, dub-<<dub_version>> - dtools-<<dtools_version>>"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ ldc dub + dtools gnumake sqlite ]; inherit shellHook; }; dsh-epub = mkShell { - name = "spine dev shell for epub output"; + name = "spine-<<spine_version>> dev shell for epub output"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake sqlite libxml2 @@ -324,13 +333,14 @@ inherit shellHook; }; dsh-html = mkShell { - name = "spine dev shell for html output"; + name = "spine-<<spine_version>> dev shell for html output"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake sqlite # ❯❯ text-mode web browsers @@ -344,13 +354,14 @@ inherit shellHook; }; dsh-latex-pdf = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-<<spine_version>> dev shell for latex & pdf output"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake source-sans-pro source-serif-pro @@ -360,26 +371,28 @@ inherit shellHook; }; dsh-sqlite = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-<<spine_version>> dev shell for sqlite3 output"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake sqlite ]; inherit shellHook; }; dsh-i18n = mkShell { - name = "spine dev shell internationalization, po4a"; + name = "spine-<<spine_version>> dev shell for internationalization, po4a"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake sqlite perl538Packages.Po4a @@ -497,6 +510,7 @@ with pkgs; # ❯❯❯ dev gnumake ps + dtools # ❯❯❯ d_build_related # ❯❯ package manager dub @@ -645,15 +659,6 @@ installPhase = '' ''; #+END_SRC -** variables used SET -*** spine project VERSION :version:set:project: - -#+NAME: spine_version -#+HEADER: :noweb yes -#+BEGIN_SRC emacs-lisp -<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> -#+END_SRC - *** nixpkgs path / url - nixpkgs_url_github @@ -662,14 +667,14 @@ installPhase = '' **** github (official) #+NAME: nixpkgs_url_github -#+BEGIN_SRC sh +#+BEGIN_SRC shell github:NixOS/nixpkgs/nixpkgs-unstable #+END_SRC **** localhost #+NAME: nixpkgs_url_local -#+BEGIN_SRC sh +#+BEGIN_SRC shell /srv/nix/nixpkgs #+END_SRC @@ -738,7 +743,7 @@ nix-shell '<nixpkgs>' -A nix --pure *** echo-nixNote #+HEADER: :tangle ../.env/echo-nixNote -#+BEGIN_SRC sh +#+BEGIN_SRC shell echo '-*- mode: org -*- ,* nixpkgs path? @@ -751,7 +756,7 @@ echo " <nixpkgs> == `nix-instantiate --find-file nixpkgs`" >> nixNote_.org echo ' ,* nix build and show derivation -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell nix-shell --pure nix-build @@ -789,7 +794,7 @@ echo "#+END_SRC ,* initialised shell variables -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell SpineSRC=$SpineSRC SpineDOC=$SpineDOC SpinePOD=$SpinePOD @@ -802,81 +807,81 @@ echo '* spine run instruction examples ,** parallelized tasks ,*** doc source -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --pod --source --output="$SpineOUTversioned" $SpinePOD/* ,#+END_SRC ,*** html & epub output -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --html --epub --output="$SpineOUTversioned" $SpinePOD/* ,#+END_SRC ,*** sqlite db for each document - populate each db -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* ,#+END_SRC ,*** doc source; html, epub; sqlite outputs -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* ,#+END_SRC ,*** curate (authors topics) -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --curate --output="$SpineOUTversioned" $SpinePOD/* ,#+END_SRC ,*** html, curate -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $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 +,#+BEGIN_SRC shell $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 +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned" ,#+END_SRC ,*** sqlite db (shared) - populate db -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUTversioned" $SpineDOC/sisudoc-spine-markup-samples/markup/pod/* ,#+END_SRC ,*** sqlite db (shared) - drop db -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUTversioned" ,#+END_SRC ,*** sqlite db (shared) - create & populate db (single step) -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $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 +,#+BEGIN_SRC shell $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 +,#+BEGIN_SRC shell cat $SpinePOD/.dr/config_local_site $SpineBIN/spine --show-config $SpinePOD $SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD @@ -884,7 +889,7 @@ $SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD ,** cgi operations (output to $SpineOUT /var/www) -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/* $SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/* @@ -893,32 +898,31 @@ $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 +,#+BEGIN_SRC shell $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 +,#+BEGIN_SRC shell $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 +,#+BEGIN_SRC shell $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 +,#+BEGIN_SRC shell $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_cgi>>" --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 @@ -927,7 +931,7 @@ $SpineBIN/spine --epub --html --html-link-search --html-link-curate --curate --s if names and paths are configured in resource configuration file, e.g. $SpinePOD/.rc/config_local_site -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update $SpinePOD/* ,#+END_SRC @@ -962,13 +966,13 @@ webserv: ,*** make search form -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site ,#+END_SRC ,*** latex -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --latex --serial --output="$SpineOUT" $SpinePOD/* ls $SpineOutstatic/latex/*.tex ,#+END_SRC @@ -983,12 +987,12 @@ ls $SpineOutstatic/latex/*.tex *** db search related variables #+NAME: spine_search_db -#+BEGIN_SRC sh +#+BEGIN_SRC shell spine.search.db #+END_SRC #+NAME: spine_search_cgi -#+BEGIN_SRC sh +#+BEGIN_SRC shell spine_search #+END_SRC @@ -1028,7 +1032,50 @@ postInstall: echo `ls -la $${out}/bin/spine` #+END_SRC -** empty sha56 hash +* SHARED +** versions +*** spine project VERSION :version:set:project: + +#+NAME: spine_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> +#+END_SRC + +*** dlang overlays +**** ldc + +#+NAME: ldc_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version()>> +#+END_SRC + +**** dmd + +#+NAME: dmd_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dmd-version()>> +#+END_SRC + +**** dub + +#+NAME: dub_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dub-version()>> +#+END_SRC + +**** dtools + +#+NAME: dtools_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-version()>> +#+END_SRC + +*** empty sha56 hash #+NAME: blank_hash #+BEGIN_SRC nix @@ -1040,11 +1087,3 @@ sha256-0000000000000000000000000000000000000000000= sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= #+END_SRC -** version info SET VERSION :version:set:project: -*** spine project VERSION :version:set:project: - -#+NAME: spine_version -#+HEADER: :noweb yes -#+BEGIN_SRC emacs-lisp -<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> -#+END_SRC diff --git a/org/default_imports.org b/org/default_imports.org index 5945d39..d708124 100644 --- a/org/default_imports.org +++ b/org/default_imports.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:imports: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/default_misc.org b/org/default_misc.org index 3b0b23f..baa7a81 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:default:misc: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/default_paths.org b/org/default_paths.org index 6a41ae6..3cdb909 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:paths: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/default_regex.org b/org/default_regex.org index ffd03f1..cea0146 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:regex: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -53,6 +53,7 @@ static template spineRgxIn() { <<meta_rgx_paragraph_marks>> <<meta_rgx_blocks>> <<meta_rgx_block_tic>> + <<meta_rgx_block_quotemarks>> <<meta_rgx_block_curly>> <<meta_rgx_sub_match_code>> <<meta_rgx_table>> @@ -220,12 +221,14 @@ static grouped_para_indent_hang = ctRegex!(`^_(?P<hang>[0-9])_(? #+NAME: meta_rgx_blocks #+BEGIN_SRC d /+ blocked markup +/ -static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^`{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); -static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|`{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); +static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^[`']{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); +static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|[`']{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); #+END_SRC *** blocked markup tic :block:tic: +- consider quotemarks as alternative to, or to replace tics as using tics in text markup is a bit cumbersome + #+NAME: meta_rgx_block_tic #+BEGIN_SRC d /+ blocked markup tics +/ @@ -238,6 +241,22 @@ static block_tic_table_open = ctRegex!("^`{3} table(?:[(](?P static block_tic_close = ctRegex!("^(`{3})$","m"); #+END_SRC +*** blocked markup quotemarks :block:quotemarks: + +- consider quotemarks as alternative to, or to replace tics as using tics in text markup is a bit cumbersome + +#+NAME: meta_rgx_block_quotemarks +#+BEGIN_SRC d +/+ blocked markup tics +/ +static block_quotemarks_code_open = ctRegex!(`^'{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_poem_open = ctRegex!(`^'{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_group_open = ctRegex!(`^'{3} group(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_block_open = ctRegex!(`^'{3} block(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_quote_open = ctRegex!(`^'{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_table_open = ctRegex!(`^'{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); // ctRegex!("^'{3} table(?:\(.*?\))?"); +static block_quotemarks_close = ctRegex!(`^('{3})$`,"m"); +#+END_SRC + *** blocked markup curly :block:curly: #+NAME: meta_rgx_block_curly @@ -692,7 +711,7 @@ static src_formalised_file_path_parts = ctRegex!(`(?P<pth>(?:[/a-zA-Z0 ** _module template yaml tags -#+HEADER: :tangle "../src/sisudoc/meta/rgx_yaml_tags.d" +#+HEADER: :tangle "../src/sisudoc/meta/rgx_yaml.d" #+HEADER: :noweb yes #+BEGIN_SRC d <<doc_header_including_copyright_and_license>> diff --git a/org/default_shared_snippets.org b/org/default_shared_snippets.org index b5fa945..3cdcb7d 100644 --- a/org/default_shared_snippets.org +++ b/org/default_shared_snippets.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:default:shared: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/doc-reform.org b/org/doc-reform.org index 6236ab2..ee39909 100644 --- a/org/doc-reform.org +++ b/org/doc-reform.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -25,7 +25,7 @@ #+NAME: listdir #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 *\.org #+END_SRC @@ -78,7 +78,7 @@ util_spine_syntax_highlighting_vim.org #+NAME: listdir_spine #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 spine\.org #+END_SRC @@ -98,7 +98,7 @@ misc and shared look at #+NAME: listdir_default #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 default_*\.org #+END_SRC @@ -118,7 +118,7 @@ default_shared.org #+NAME: listdir_in #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 in_*\.org #+END_SRC @@ -134,7 +134,7 @@ in_source_files.org #+NAME: listdir_meta #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 ocda\.org meta_*\.org #+END_SRC @@ -150,7 +150,7 @@ ocda.org #+NAME: listdir_out #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 output_*\.org out_*\.org #+END_SRC @@ -175,7 +175,7 @@ out_zip.org #+NAME: listdir_spine_misc #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 spine_*\.org #+END_SRC @@ -192,7 +192,7 @@ spine_markup_sample.org #+NAME: listdir_config #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 config_*\.org #+END_SRC @@ -212,7 +212,7 @@ config_nix.org #+NAME: listdir_util #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 util_*\.org #+END_SRC diff --git a/org/in_source_files.org b/org/in_source_files.org index 674709a..cdd220f 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:sourcefile:read: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -581,7 +581,7 @@ final char[][] getInsertMarkupSourceContentRawLineArray( #+BEGIN_SRC d char[][] contents_insert; int code_block_status = 0; -enum codeBlock { off, curly, tic, } +enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; #+END_SRC @@ -598,11 +598,19 @@ if (code_block_status == codeBlock.curly) { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents_insert ~= line; +} else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents_insert ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents_insert ~= line; +} else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents_insert ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents_insert ~= line; @@ -666,7 +674,7 @@ return ret; #+BEGIN_SRC d char[][] contents; int code_block_status = 0; -enum codeBlock { off, curly, tic, } +enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; char[][] contents_insert; @@ -686,11 +694,19 @@ if (code_block_status == codeBlock.curly) { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents ~= line; +} else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents ~= line; +} else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents ~= line; diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index 9c62322..00bc3d3 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:config: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -15,18 +15,6 @@ #+PROPERTY: header-args+ :mkdirp yes #+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t -#+NAME: meta_check_input_markup -#+BEGIN_SRC d -string check_input_markup()( - string _txt, -) { - _txt = _txt - .replaceAll(regex(r"\\"), mkup.br_line_inline) - .strip; - return _txt; -} -#+END_SRC - - [[./doc-reform.org][doc-reform.org]] [[./][org/]] * generic @@ -553,6 +541,73 @@ JSONValue config_jsonstr = `{ #+END_SRC * YAML to spineStruct :module:conf_make_meta:yaml: + +** check markup + +#+NAME: meta_check_input_markup +#+BEGIN_SRC d +string check_input_markup()( + string _txt, +) { + _txt = _txt + .replaceAll(regex(r"\\"), mkup.br_line_inline) + .strip; + return _txt; +} +#+END_SRC + +** extract yaml + +#+NAME: meta_extract_yaml +#+BEGIN_SRC d +@system string _get_yaml_node_string(Y)( + Y _yaml, + string _return, + string _title, + string _subtitle, + bool _munge=false +) { + if ((_title in _yaml && _yaml[_title].type.sequence) + && (_yaml[_title].type.mapping + && _yaml[_title].tag.match(rgx_y.yaml_tag_is_map)) + ) { + if (_subtitle in _yaml[_title] + && _yaml[_title][_subtitle].type.string + && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_str) + ) { + _return = (!(_munge)) + ? _yaml[_title][_subtitle].get!string + : check_input_markup(_yaml[_title][_subtitle].get!string); + } + } + return _return; +} +@system int _get_yaml_node_int(Y)( + Y _yaml, + int _return, + string _title, + string _subtitle +) { + if ((_title in _yaml && _yaml[_title].type.sequence) + && (_yaml[_title].type.mapping + && _yaml[_title].tag.match(rgx_y.yaml_tag_is_map)) + ) { + if (_subtitle in _yaml[_title] + && _yaml[_title][_subtitle].type.string + && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_int) + ) { + _return = _yaml[_title][_subtitle].get!int; + } else if (_subtitle in _yaml[_title] + && _yaml[_title][_subtitle].type.string + && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_str) + ) { + _return = _yaml[_title][_subtitle].get!int; + } + } + return _return; +} +#+END_SRC + ** _module template_ #+HEADER: :tangle "../src/sisudoc/meta/conf_make_meta_yaml.d" @@ -583,7 +638,7 @@ template contentYAMLtoSpineStruct() { sisudoc.meta.rgx_yaml, sisudoc.meta.rgx; ConfComposite _struct_composite; - @system auto contentYAMLtoSpineStruct(C,Y,M,O,Cfg)( + @system ConfComposite contentYAMLtoSpineStruct(C,Y,M,O,Cfg)( C _struct_composite, Y _yaml, M _manifested, @@ -596,10 +651,11 @@ template contentYAMLtoSpineStruct() { mixin spineRgxYamlTags; static auto rgx_y = RgxYaml(); <<meta_check_input_markup>> + <<meta_extract_yaml>> confCompositeMakeBuild _mk; if (_identifier != "header") { // called only once per run anyway <<yaml_objects_conf>> - } else { + } else { // !(_identifier != "header") <<yaml_objects_make>> <<yaml_objects_meta>> } @@ -614,6 +670,7 @@ template contentYAMLtoSpineStruct() { #+NAME: yaml_objects_conf #+BEGIN_SRC d +string _init_string; /+ conf ------------------------------------------------------------------- +/ /+ _cfg. build defaults (else program runtime defaults) @@ -622,145 +679,52 @@ template contentYAMLtoSpineStruct() { +/ { if (_opt_action.webserver_http.length > 0) { - _struct_composite.conf.w_srv_http - = _opt_action.webserver_http; + _struct_composite.conf.w_srv_http = _opt_action.webserver_http; } else { - _struct_composite.conf.w_srv_http - = (_cfg.http_request_type.empty) - ? "http" - : _cfg.http_request_type; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("http" in _yaml["webserv"] - && _yaml["webserv"]["http"].type.string - && _yaml["webserv"]["http"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_http - = _yaml["webserv"]["http"].get!string; - } - } + _init_string = (_cfg.http_request_type.empty) ? "http" : _cfg.http_request_type; + _struct_composite.conf.w_srv_http = _get_yaml_node_string(_yaml, _init_string, "webserv", "http"); } if (_opt_action.cgi_search_title.length > 0) { - _struct_composite.conf.w_srv_cgi_search_form_title - = _opt_action.cgi_search_title; + _struct_composite.conf.w_srv_cgi_search_form_title = _opt_action.cgi_search_title; } else { - _struct_composite.conf.w_srv_cgi_search_form_title - = (_cfg.cgi_search_form_title.empty) - ? "≅ SiSU spine search form" - : _cfg.cgi_search_form_title; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("cgi_search_form_title" in _yaml["webserv"] - && _yaml["webserv"]["cgi_search_form_title"].type.string - && _yaml["webserv"]["cgi_search_form_title"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_search_form_title - = _yaml["webserv"]["cgi_search_form_title"].get!string; - } - } + _init_string = (_cfg.cgi_search_form_title.empty) ? "≅ SiSU spine search form" : _cfg.cgi_search_form_title; + _struct_composite.conf.w_srv_cgi_search_form_title = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_search_form_title"); } if (_opt_action.cgi_sqlite_search_filename.length > 0) { - _struct_composite.conf.w_srv_cgi_search_script - = _opt_action.cgi_sqlite_search_filename; + _struct_composite.conf.w_srv_cgi_search_script = _opt_action.cgi_sqlite_search_filename; } else { - _struct_composite.conf.w_srv_cgi_search_script - = (_cfg.cgi_filename.empty) - ? "spine_search" - : _cfg.cgi_filename; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("cgi_search_script" in _yaml["webserv"] - && _yaml["webserv"]["cgi_search_script"].type.string - && _yaml["webserv"]["cgi_search_script"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_search_script - = _yaml["webserv"]["cgi_search_script"].get!string; - } - } + _init_string = (_cfg.cgi_filename.empty) ? "spine_search" : _cfg.cgi_filename; + _struct_composite.conf.w_srv_cgi_search_script = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_search_script"); } if (_opt_action.sqliteDB_filename.length > 0) { - _struct_composite.conf.w_srv_db_sqlite_filename - = _opt_action.sqliteDB_filename; + _struct_composite.conf.w_srv_db_sqlite_filename = _opt_action.sqliteDB_filename; } else { - _struct_composite.conf.w_srv_db_sqlite_filename - = (_cfg.db_sqlite_filename.empty) - ? "spine.search.db" - : _cfg.db_sqlite_filename; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("db_sqlite_filename" in _yaml["webserv"] - && _yaml["webserv"]["db_sqlite_filename"].type.string - && _yaml["webserv"]["db_sqlite_filename"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_db_sqlite_filename - = _yaml["webserv"]["db_sqlite_filename"].get!string; - } - } + _init_string = (_cfg.db_sqlite_filename.empty) ? "spine.search.db" : _cfg.db_sqlite_filename; + _struct_composite.conf.w_srv_db_sqlite_filename = _get_yaml_node_string(_yaml, _init_string, "webserv", "db_sqlite_filename"); } if (_opt_action.sqliteDB_path.length > 0) { - _struct_composite.conf.w_srv_db_sqlite_path - = _opt_action.sqliteDB_path; + _struct_composite.conf.w_srv_db_sqlite_path = _opt_action.sqliteDB_path; } else { - _struct_composite.conf.w_srv_db_sqlite_path - = (_cfg.db_sqlite_path.empty) - ? "/var/www/sqlite" - : _cfg.db_sqlite_path; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("db_sqlite_path" in _yaml["webserv"] - && _yaml["webserv"]["db_sqlite_path"].type.string - && _yaml["webserv"]["db_sqlite_path"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_db_sqlite_path - = _yaml["webserv"]["db_sqlite_path"].get!string; - } - } + _init_string = (_cfg.db_sqlite_path.empty) ? "/var/www/sqlite" : _cfg.db_sqlite_path; + _struct_composite.conf.w_srv_db_sqlite_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "db_sqlite_path"); } if (_opt_action.cgi_url_action.length > 0) { _struct_composite.conf.w_srv_cgi_action = _opt_action.cgi_url_action; } else { - _struct_composite.conf.w_srv_cgi_action - = (_cfg.www_url_doc_root.empty) - ? "http://locahost" // "https://sisudoc.org" - : _cfg.www_url_doc_root; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("cgi_action" in _yaml["webserv"] - && _yaml["webserv"]["cgi_action"].type.string - && _yaml["webserv"]["cgi_action"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_action - = _yaml["webserv"]["cgi_action"].get!string; - } else if (_opt_action.cgi_sqlite_search_filename.length > 0) { - _struct_composite.conf.w_srv_cgi_action - = _struct_composite.conf.w_srv_cgi_bin_url ~ "/" ~ _opt_action.cgi_sqlite_search_filename; - } + _init_string = (_cfg.www_url_doc_root.empty) ? "http://locahost" : _cfg.www_url_doc_root; // "https://sisudoc.org" + _struct_composite.conf.w_srv_cgi_action = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_action"); + if (_opt_action.cgi_sqlite_search_filename.length > 0) { + _struct_composite.conf.w_srv_cgi_action = _struct_composite.conf.w_srv_cgi_bin_url ~ "/" ~ _opt_action.cgi_sqlite_search_filename; // not yet right } } if (!(_struct_composite.conf.output_path)) { _struct_composite.conf.output_path = ((_manifested.output.path).asNormalizedPath).array; } { if (_opt_action.output_dir_set.length > 0) { - _struct_composite.conf.output_path - = (_opt_action.output_dir_set.asNormalizedPath).array; + _struct_composite.conf.output_path = (_opt_action.output_dir_set.asNormalizedPath).array; } else { - _struct_composite.conf.output_path - = (_cfg.processing_path_doc_root.empty) - ? "/srv/www/spine" - : _cfg.processing_path_doc_root; + _struct_composite.conf.output_path = (_cfg.processing_path_doc_root.empty) ? "/srv/www/spine" : _cfg.processing_path_doc_root; if (("webserv" in _yaml && _yaml["webserv"].type.sequence) && (_yaml["webserv"].type.mapping && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) @@ -782,75 +746,23 @@ template contentYAMLtoSpineStruct() { } } if (_opt_action.webserver_host_doc_root.length > 0) { // same as output_path immediately above, resolve FIX REMOVE - _struct_composite.conf.w_srv_data_root_path - = _opt_action.webserver_host_doc_root; + _struct_composite.conf.w_srv_data_root_path = _opt_action.webserver_host_doc_root; } else { - _struct_composite.conf.w_srv_data_root_path - = (_cfg.processing_path_doc_root.empty) - ? "/var/www/spine" - : _cfg.processing_path_doc_root; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("data_root_path" in _yaml["webserv"] - && _yaml["webserv"]["data_root_path"].type.string - && _yaml["webserv"]["data_root_path"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_data_root_path - = _yaml["webserv"]["data_root_path"].get!string; - } - } + _init_string = (_cfg.processing_path_doc_root.empty) ? "/var/www/spine" : _cfg.processing_path_doc_root; + _struct_composite.conf.w_srv_data_root_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_root_path"); } } if (_opt_action.cgi_bin_root.length > 0) { - _struct_composite.conf.w_srv_cgi_bin_path - = _opt_action.cgi_bin_root; + _struct_composite.conf.w_srv_cgi_bin_path = _opt_action.cgi_bin_root; } else { - _struct_composite.conf.w_srv_cgi_bin_path - = (_cfg.cgi_bin_root.empty) - ? "/var/www/cgi/cgi-bin" - : _cfg.cgi_bin_root; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("cgi_bin_path" in _yaml["webserv"] - && _yaml["webserv"]["cgi_bin_path"].type.string - && _yaml["webserv"]["cgi_bin_path"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_bin_path - = _yaml["webserv"]["cgi_bin_path"].get!string; - } - } - } - { _struct_composite.conf.w_srv_data_root_part - = ""; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("data_root_part" in _yaml["webserv"] - && _yaml["webserv"]["data_root_part"].type.string - && _yaml["webserv"]["data_root_part"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_data_root_part = _yaml["webserv"]["data_root_part"].get!string; - } - } - } - { _struct_composite.conf.w_srv_images_root_part - = "image"; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("images_root_part" in _yaml["webserv"] - && _yaml["webserv"]["images_root_part"].type.string - && _yaml["webserv"]["images_root_part"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_images_root_part = _yaml["webserv"]["images_root_part"].get!string; - } - } + _init_string = (_cfg.cgi_bin_root.empty) ? "/var/www/cgi/cgi-bin" : _cfg.cgi_bin_root; + _struct_composite.conf.w_srv_cgi_bin_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_bin_path"); + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_root_part"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_data_root_part = _init_string; } + } { + _init_string = "image"; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "images_root_part"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_images_root_part = _init_string; } } } if (("webserv" in _yaml @@ -858,106 +770,68 @@ if (("webserv" in _yaml && (_yaml["webserv"].type.mapping && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) ) { // cannot be used as is with opt_action FIX look at remaining, decide what to do later - if ("data_http" in _yaml["webserv"] - && _yaml["webserv"]["data_http"].type.string - && _yaml["webserv"]["data_http"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_data_http = _yaml["webserv"]["data_http"].get!string; - } - // if (_opt_action.*.length > 0) { - if ("cgi_http" in _yaml["webserv"] - && _yaml["webserv"]["cgi_http"].type.string - && _yaml["webserv"]["cgi_http"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_http = _yaml["webserv"]["cgi_http"].get!string; - } - // if (_opt_action.*.length > 0) { - if ("host" in _yaml["webserv"] - && _yaml["webserv"]["host"].type.string - && _yaml["webserv"]["host"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_host = _yaml["webserv"]["host"].get!string; - } - if ("data_root_url" in _yaml["webserv"] - && _yaml["webserv"]["data_root_url"].type.string - && _yaml["webserv"]["data_root_url"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string; - _struct_composite.conf.w_srv_data_root_url_html = - _yaml["webserv"]["data_root_url"].get!string - ~ _struct_composite.conf.w_srv_data_root_part ~ "/" - ~ _manifested.src.language ~ "/" - ~ "html"; - } else { - _struct_composite.conf.w_srv_data_root_url = _struct_composite.conf.w_srv_data_root_part; - _struct_composite.conf.w_srv_data_root_url_html = - _struct_composite.conf.w_srv_data_root_part ~ "/" - ~ _manifested.src.language ~ "/" - ~ "html"; - } - if ("cgi_host" in _yaml["webserv"] - && _yaml["webserv"]["cgi_host"].type.string - && _yaml["webserv"]["cgi_host"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_host = _yaml["webserv"]["cgi_host"].get!string; - } else { // composite construct - _struct_composite.conf.w_srv_cgi_host = _struct_composite.conf.w_srv_host; - } - if ("cgi_bin_subpath" in _yaml["webserv"] - && _yaml["webserv"]["cgi_bin_subpath"].type.string - && _yaml["webserv"]["cgi_bin_subpath"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_bin_subpath = _yaml["webserv"]["cgi_bin_subpath"].get!string; - } - if ("cgi_port" in _yaml["webserv"] - && _yaml["webserv"]["cgi_port"].type.string - && _yaml["webserv"]["cgi_port"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_port = _yaml["webserv"]["cgi_port"].get!string; - } - if ("cgi_user" in _yaml["webserv"] - && _yaml["webserv"]["cgi_user"].type.string - && _yaml["webserv"]["cgi_user"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_user = _yaml["webserv"]["cgi_user"].get!string; - } - if ("cgi_bin_url" in _yaml["webserv"] - && _yaml["webserv"]["cgi_bin_url"].type.string - && _yaml["webserv"]["cgi_bin_url"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_bin_url = _yaml["webserv"]["cgi_bin_url"].get!string; - } else { - _struct_composite.conf.w_srv_cgi_bin_url = - (_struct_composite.conf.w_srv_cgi_http.empty) - ? _struct_composite.conf.w_srv_http - :_struct_composite.conf.w_srv_cgi_http - ~ "://" - ~ (_struct_composite.conf.w_srv_cgi_host.empty) - ? _struct_composite.conf.w_srv_cgi_host - : _struct_composite.conf.w_srv_host - ~ _struct_composite.conf.w_srv_cgi_bin_subpath; - } - // if ("cgi_file_links" in _yaml["webserv"] - // && _yaml["webserv"]["cgi_file_links"].type.string - // && _yaml["webserv"]["cgi_file_links"].tag.match(rgx_y.yaml_tag_is_str) - // ) { - // _struct_composite.conf.w_srv_cgi_file_links = _yaml["webserv"]["cgi_file_links"].get!string; - // } + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_http"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_data_http = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_http"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_http = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "host"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_host = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_bin_subpath"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_bin_subpath = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_port"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_port = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_user"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_user = _init_string; } + } + if ("data_root_url" in _yaml["webserv"] + && _yaml["webserv"]["data_root_url"].type.string + && _yaml["webserv"]["data_root_url"].tag.match(rgx_y.yaml_tag_is_str) + ) { + _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string; + _struct_composite.conf.w_srv_data_root_url_html = + _yaml["webserv"]["data_root_url"].get!string + ~ _struct_composite.conf.w_srv_data_root_part ~ "/" + ~ _manifested.src.language ~ "/" + ~ "html"; + } else { + _struct_composite.conf.w_srv_data_root_url = _struct_composite.conf.w_srv_data_root_part; + _struct_composite.conf.w_srv_data_root_url_html = + _struct_composite.conf.w_srv_data_root_part ~ "/" + ~ _manifested.src.language ~ "/" + ~ "html"; + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_host"); + _struct_composite.conf.w_srv_cgi_host = (!(_init_string.empty)) ? _init_string : _struct_composite.conf.w_srv_host; + } + if ("cgi_bin_url" in _yaml["webserv"] + && _yaml["webserv"]["cgi_bin_url"].type.string + && _yaml["webserv"]["cgi_bin_url"].tag.match(rgx_y.yaml_tag_is_str) + ) { + _struct_composite.conf.w_srv_cgi_bin_url = _yaml["webserv"]["cgi_bin_url"].get!string; + } else { + _struct_composite.conf.w_srv_cgi_bin_url = + (_struct_composite.conf.w_srv_cgi_http.empty) ? _struct_composite.conf.w_srv_http :_struct_composite.conf.w_srv_cgi_http + ~ "://" + ~ (_struct_composite.conf.w_srv_cgi_host.empty) ? _struct_composite.conf.w_srv_cgi_host : _struct_composite.conf.w_srv_host + ~ _struct_composite.conf.w_srv_cgi_bin_subpath; + } + // if ("cgi_file_links" in _yaml["webserv"] + // && _yaml["webserv"]["cgi_file_links"].type.string + // && _yaml["webserv"]["cgi_file_links"].tag.match(rgx_y.yaml_tag_is_str) + // ) { + // _struct_composite.conf.w_srv_cgi_file_links = _yaml["webserv"]["cgi_file_links"].get!string; + // } } // make (in: conf, make, meta)? -if ("processing" in _yaml - && _yaml["processing"].type.sequence -) { - if (_yaml["processing"].type.mapping - && _yaml["processing"].tag.match(rgx_y.yaml_tag_is_map) - ) { - if ("concord_max" in _yaml["processing"] - && _yaml["processing"]["concord_max"].type.string - && _yaml["processing"]["concord_max"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.processing_concord_max = _yaml["processing"]["concord_max"].get!string; - } - } +{ + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "processing", "concord_max"); + if (!(_init_string.empty)) { _struct_composite.conf.processing_concord_max = _init_string; } } if ("flag" in _yaml && _yaml["flag"].type.sequence @@ -965,65 +839,36 @@ if ("flag" in _yaml if (_yaml["flag"].type.mapping && _yaml["flag"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("act0" in _yaml["flag"] - && _yaml["flag"]["act0"].type.string - && _yaml["flag"]["act0"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act0 = _yaml["flag"]["act0"].get!string; - } - if ("act1" in _yaml["flag"] - && _yaml["flag"]["act1"].type.string - && _yaml["flag"]["act1"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act1 = _yaml["flag"]["act1"].get!string; - } - if ("act2" in _yaml["flag"] - && _yaml["flag"]["act2"].type.string - && _yaml["flag"]["act2"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act2 = _yaml["flag"]["act2"].get!string; - } - if ("act3" in _yaml["flag"] - && _yaml["flag"]["act3"].type.string - && _yaml["flag"]["act3"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act3 = _yaml["flag"]["act3"].get!string; - } - if ("act4" in _yaml["flag"] - && _yaml["flag"]["act4"].type.string - && _yaml["flag"]["act4"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act4 = _yaml["flag"]["act4"].get!string; - } - if ("act5" in _yaml["flag"] - && _yaml["flag"]["act5"].type.string - && _yaml["flag"]["act5"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act5 = _yaml["flag"]["act5"].get!string; - } - if ("act6" in _yaml["flag"] - && _yaml["flag"]["act6"].type.string - && _yaml["flag"]["act6"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act6 = _yaml["flag"]["act6"].get!string; - } - if ("act7" in _yaml["flag"] - && _yaml["flag"]["act7"].type.string - && _yaml["flag"]["act7"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act7 = _yaml["flag"]["act7"].get!string; - } - if ("act8" in _yaml["flag"] - && _yaml["flag"]["act8"].type.string - && _yaml["flag"]["act8"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act8 = _yaml["flag"]["act8"].get!string; - } - if ("act9" in _yaml["flag"] - && _yaml["flag"]["act9"].type.string - && _yaml["flag"]["act9"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act9 = _yaml["flag"]["act9"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act0"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act0 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act1"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act1 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act2"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act2 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act3"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act3 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act4"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act4 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act5"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act5 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act6"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act6 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act7"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act7 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act8"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act8 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act9"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act9 = _init_string; } } } } @@ -1089,20 +934,11 @@ string[] selected_papersize(string _sizes_str) { } string _set_papersize; if (_opt_action.latex_papersize.length > 0) { - _set_papersize - = _opt_action.latex_papersize; + _set_papersize = _opt_action.latex_papersize; } else { - _set_papersize - = (_cfg.default_papersize.empty) - ? "a4,letter.portrait" - : _cfg.default_papersize; - if ("papersize" in _yaml["default"] - && _yaml["default"]["papersize"].type.string - && _yaml["default"]["papersize"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _set_papersize - = _yaml["default"]["papersize"].get!string; - } + _set_papersize = (_cfg.default_papersize.empty) ? "a4,letter.portrait" : _cfg.default_papersize; + _init_string = _set_papersize; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "papersize"); + if (!(_init_string.empty)) { _set_papersize = _init_string; } } _struct_composite.conf.set_papersize = selected_papersize(_set_papersize); if ( @@ -1111,29 +947,18 @@ if ( && _yaml["default"].type.mapping && _yaml["default"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("text_wrap" in _yaml["default"] - && _yaml["default"]["text_wrap"].type.string - && _yaml["default"]["text_wrap"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.set_text_wrap = _yaml["default"]["text_wrap"].get!string; - } - if ("emphasis" in _yaml["default"] - && _yaml["default"]["emphasis"].type.string - && _yaml["default"]["emphasis"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.set_emphasis = _yaml["default"]["emphasis"].get!string; - } - if ("language" in _yaml["default"] - && _yaml["default"]["language"].type.string - && _yaml["default"]["language"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.set_language = _yaml["default"]["language"].get!string; - } - if ("digest" in _yaml["default"] - && _yaml["default"]["digest"].type.string - && _yaml["default"]["digest"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.set_digest = _yaml["default"]["digest"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "text_wrap"); + if (!(_init_string.empty)) { _struct_composite.conf.set_text_wrap = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "emphasis"); + if (!(_init_string.empty)) { _struct_composite.conf.set_emphasis = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "language"); + if (!(_init_string.empty)) { _struct_composite.conf.set_language = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "digest"); + if (!(_init_string.empty)) { _struct_composite.conf.set_digest = _init_string; } } } if ("search" in _yaml @@ -1142,29 +967,18 @@ if ("search" in _yaml if (_yaml["search"].type.mapping && _yaml["search"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("flag" in _yaml["search"] - && _yaml["search"]["flag"].type.string - && _yaml["search"]["flag"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.search_flag = _yaml["search"]["flag"].get!string; - } - if ("action" in _yaml["search"] - && _yaml["search"]["action"].type.string - && _yaml["search"]["action"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.search_action = _yaml["search"]["action"].get!string; - } - if ("db" in _yaml["search"] - && _yaml["search"]["db"].type.string - && _yaml["search"]["db"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.search_db = _yaml["search"]["db"].get!string; - } - if ("title" in _yaml["search"] - && _yaml["search"]["title"].type.string - && _yaml["search"]["title"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.search_title = _yaml["search"]["title"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "flag"); + if (!(_init_string.empty)) { _struct_composite.conf.search_flag = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "action"); + if (!(_init_string.empty)) { _struct_composite.conf.search_action = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "db"); + if (!(_init_string.empty)) { _struct_composite.conf.search_db = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "title"); + if (!(_init_string.empty)) { _struct_composite.conf.search_title = _init_string; } } } } @@ -1174,6 +988,8 @@ if ("search" in _yaml #+NAME: yaml_objects_make #+BEGIN_SRC d +string _init_string; +int _init_int; /+ make ------------------------------------------------------------------- +/ if ("make" in _yaml && _yaml["make"].type.sequence @@ -1181,41 +997,24 @@ if ("make" in _yaml if (_yaml["make"].type.mapping && _yaml["make"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("doc_type" in _yaml["make"] - && _yaml["make"]["doc_type"].type.string - && _yaml["make"]["doc_type"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.doc_type = _yaml["make"]["doc_type"].get!string; - } - if ("breaks" in _yaml["make"] - && _yaml["make"]["breaks"].type.string - && _yaml["make"]["breaks"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.breaks = _yaml["make"]["breaks"].get!string; - } - if ("bold" in _yaml["make"] - && _yaml["make"]["bold"].type.string - && _yaml["make"]["bold"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.bold = _yaml["make"]["bold"].get!string; - } - if ("cover_image" in _yaml["make"] - && _yaml["make"]["cover_image"].type.string - && _yaml["make"]["cover_image"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.cover_image = _yaml["make"]["cover_image"].get!string; - } - if ("css" in _yaml["make"] - && _yaml["make"]["css"].type.string - && _yaml["make"]["css"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.css = _yaml["make"]["css"].get!string; - } - if ("emphasis" in _yaml["make"] - && _yaml["make"]["emphasis"].type.string - && _yaml["make"]["emphasis"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.emphasis = _yaml["make"]["emphasis"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "doc_type"); + if (!(_init_string.empty)) { _struct_composite.make_str.doc_type = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "breaks"); + if (!(_init_string.empty)) { _struct_composite.make_str.breaks = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "bold"); + if (!(_init_string.empty)) { _struct_composite.make_str.bold = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "cover_image"); + if (!(_init_string.empty)) { _struct_composite.make_str.cover_image = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "css"); + if (!(_init_string.empty)) { _struct_composite.make_str.css = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "emphasis"); + if (!(_init_string.empty)) { _struct_composite.make_str.emphasis = _init_string; } } if ("footer" in _yaml["make"] && _yaml["make"]["footer"].type.string @@ -1307,16 +1106,9 @@ if ("make" in _yaml break; } } - if ("auto_num_depth" in _yaml["make"] - && _yaml["make"]["auto_num_depth"].type.string - && _yaml["make"]["auto_num_depth"].tag.match(rgx_y.yaml_tag_is_int) - ) { // not sure implemented for documents - _struct_composite.make_str.auto_num_depth = _yaml["make"]["auto_num_depth"].get!int; - } else if ("auto_num_depth" in _yaml["make"] - && _yaml["make"]["auto_num_depth"].type.string - && _yaml["make"]["auto_num_depth"].tag.match(rgx_y.yaml_tag_is_str) - ) { // not sure implemented for documents - _struct_composite.make_str.auto_num_depth = _yaml["make"]["auto_num_depth"].get!int; + { + _init_int = _get_yaml_node_int(_yaml, 99, "make", "auto_num_depth"); + if (!(_init_int == 99)) { _struct_composite.make_str.auto_num_depth = _init_int; } } if ("texpdf_font" in _yaml["make"] && _yaml["make"]["texpdf_font"].type.string @@ -1355,29 +1147,18 @@ if (_struct_composite.meta.creator_author.empty) { if (_yaml["creator"].type.mapping && _yaml["creator"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("author" in _yaml["creator"] - && _yaml["creator"]["author"].type.string - && _yaml["creator"]["author"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.creator_author = _yaml["creator"]["author"].get!string; - } - if ("email" in _yaml["creator"] - && _yaml["creator"]["email"].type.string - && _yaml["creator"]["email"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.creator_author_email = _yaml["creator"]["email"].get!string; - } - if ("illustrator" in _yaml["creator"] - && _yaml["creator"]["illustrator"].type.string - && _yaml["creator"]["illustrator"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.creator_illustrator = _yaml["creator"]["illustrator"].get!string; - } - if ("translator" in _yaml["creator"] - && _yaml["creator"]["translator"].type.string - && _yaml["creator"]["translator"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.creator_translator = _yaml["creator"]["translator"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "author"); + if (!(_init_string.empty)) { _struct_composite.meta.creator_author = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "email"); + if (!(_init_string.empty)) { _struct_composite.meta.creator_author_email = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "illustrator"); + if (!(_init_string.empty)) { _struct_composite.meta.creator_illustrator = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "translator"); + if (!(_init_string.empty)) { _struct_composite.meta.creator_translator = _init_string; } } } else if (_yaml["creator"].type.string && _yaml["creator"].tag.match(rgx_y.yaml_tag_is_str) @@ -1433,43 +1214,27 @@ if (_struct_composite.meta.title_main.empty) { ) { _struct_composite.meta.title_main = _yaml["title"]["title"].get!string; } - if ("edition" in _yaml["title"] - && _yaml["title"]["edition"].type.string - && _yaml["title"]["edition"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_edition = _yaml["title"]["edition"].get!string; - } - if ("full" in _yaml["title"] - && _yaml["title"]["full"].type.string - && _yaml["title"]["full"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_full = _yaml["title"]["full"].get!string; - } - if ("language" in _yaml["title"] - && _yaml["title"]["language"].type.string - && _yaml["title"]["language"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_language = _yaml["title"]["language"].get!string; - } - if ("note" in _yaml["title"] - && _yaml["title"]["note"].type.string - && _yaml["title"]["note"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_note = _yaml["title"]["note"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "edition"); + if (!(_init_string.empty)) { _struct_composite.meta.title_edition = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "full"); + if (!(_init_string.empty)) { _struct_composite.meta.title_full = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "language"); + if (!(_init_string.empty)) { _struct_composite.meta.title_language = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "note"); + if (!(_init_string.empty)) { _struct_composite.meta.title_note = _init_string; } } - if ("subtitle" in _yaml["title"] - && _yaml["title"]["subtitle"].type.string - && _yaml["title"]["subtitle"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_subtitle = _yaml["title"]["subtitle"].get!string; - } else if ("sub" in _yaml["title"] - && _yaml["title"]["sub"].type.string - && _yaml["title"]["sub"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_subtitle = _yaml["title"]["sub"].get!string; + if ("subtitle" in _yaml["title"]) { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "subtitle"); + if (!(_init_string.empty)) { _struct_composite.meta.title_subtitle = _init_string; } + } else if ("sub" in _yaml["title"]) { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "sub"); + if (!(_init_string.empty)) { _struct_composite.meta.title_subtitle = _init_string; } } - } else if ( - _yaml["title"].type.string + } else if (_yaml["title"].type.string && _yaml["title"].tag.match(rgx_y.yaml_tag_is_str) ) { _struct_composite.meta.title_main = _yaml["title"].get!string; @@ -1494,23 +1259,15 @@ if ("classify" in _yaml if (_yaml["classify"].type.mapping && _yaml["classify"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("dewey" in _yaml["classify"] - && _yaml["classify"]["dewey"].type.string - && _yaml["classify"]["dewey"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.classify_dewey = _yaml["classify"]["dewey"].get!string; - } - if ("loc" in _yaml["classify"] - && _yaml["classify"]["loc"].type.string - && _yaml["classify"]["loc"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.classify_loc = _yaml["classify"]["loc"].get!string; - } - if ("keywords" in _yaml["classify"] - && _yaml["classify"]["keywords"].type.string - && _yaml["classify"]["keywords"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.classify_keywords = _yaml["classify"]["keywords"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "dewey"); + if (!(_init_string.empty)) { _struct_composite.meta.classify_dewey = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "loc"); + if (!(_init_string.empty)) { _struct_composite.meta.classify_loc = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "keywords"); + if (!(_init_string.empty)) { _struct_composite.meta.classify_keywords = _init_string; } } if ("topic_register" in _yaml["classify"] && _yaml["classify"]["topic_register"].type.string @@ -1564,47 +1321,27 @@ if ("date" in _yaml if (_yaml["date"].type.mapping && _yaml["date"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("added_to_site" in _yaml["date"] - && _yaml["date"]["added_to_site"].type.string - && _yaml["date"]["added_to_site"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_added_to_site = _yaml["date"]["added_to_site"].get!string; - } - if ("available" in _yaml["date"] - && _yaml["date"]["available"].type.string - && _yaml["date"]["available"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_available = _yaml["date"]["available"].get!string; - } - if ("created" in _yaml["date"] - && _yaml["date"]["created"].type.string - && _yaml["date"]["created"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_created = _yaml["date"]["created"].get!string; - } - if ("issued" in _yaml["date"] - && _yaml["date"]["issued"].type.string - && _yaml["date"]["issued"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_issued = _yaml["date"]["issued"].get!string; - } - if ("modified" in _yaml["date"] - && _yaml["date"]["modified"].type.string - && _yaml["date"]["modified"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_modified = _yaml["date"]["modified"].get!string; - } - if ("published" in _yaml["date"] - && _yaml["date"]["published"].type.string - && _yaml["date"]["published"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_published = _yaml["date"]["published"].get!string; - } - if ("valid" in _yaml["date"] - && _yaml["date"]["valid"].type.string - && _yaml["date"]["valid"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_valid = _yaml["date"]["valid"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "added_to_site"); + if (!(_init_string.empty)) { _struct_composite.meta.date_added_to_site = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "available"); + if (!(_init_string.empty)) { _struct_composite.meta.date_available = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "created"); + if (!(_init_string.empty)) { _struct_composite.meta.date_created = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "issued"); + if (!(_init_string.empty)) { _struct_composite.meta.date_issued = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "modified"); + if (!(_init_string.empty)) { _struct_composite.meta.date_modified = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "published"); + if (!(_init_string.empty)) { _struct_composite.meta.date_published = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "valid"); + if (!(_init_string.empty)) { _struct_composite.meta.date_valid = _init_string; } } } } @@ -1620,23 +1357,15 @@ if ("notes" in _yaml if (_yaml["notes"].type.mapping && _yaml["notes"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("abstract" in _yaml["notes"] - && _yaml["notes"]["abstract"].type.string - && _yaml["notes"]["abstract"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.notes_abstract = _yaml["notes"]["abstract"].get!string; - } - if ("description" in _yaml["notes"] - && _yaml["notes"]["description"].type.string - && _yaml["notes"]["description"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.notes_description = _yaml["notes"]["description"].get!string; - } - if ("summary" in _yaml["notes"] - && _yaml["notes"]["summary"].type.string - && _yaml["notes"]["summary"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.notes_summary = _yaml["notes"]["summary"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "abstract"); + if (!(_init_string.empty)) { _struct_composite.meta.notes_abstract = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "description"); + if (!(_init_string.empty)) { _struct_composite.meta.notes_description = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "summary"); + if (!(_init_string.empty)) { _struct_composite.meta.notes_summary = _init_string; } } } } @@ -1646,29 +1375,18 @@ if ("original" in _yaml if (_yaml["original"].type.mapping && _yaml["original"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("language" in _yaml["original"] - && _yaml["original"]["language"].type.string - && _yaml["original"]["language"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.original_language = _yaml["original"]["language"].get!string; - } - if ("language_char" in _yaml["original"] - && _yaml["original"]["language_char"].type.string - && _yaml["original"]["language_char"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.original_language_char = _yaml["original"]["language_char"].get!string; - } - if ("source" in _yaml["original"] - && _yaml["original"]["source"].type.string - && _yaml["original"]["source"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.original_source = _yaml["original"]["source"].get!string; - } - if ("title" in _yaml["original"] - && _yaml["original"]["title"].type.string - && _yaml["original"]["title"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.original_title = _yaml["original"]["title"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "language"); + if (!(_init_string.empty)) { _struct_composite.meta.original_language = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "language_char"); + if (!(_init_string.empty)) { _struct_composite.meta.original_language_char = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "source"); + if (!(_init_string.empty)) { _struct_composite.meta.original_source = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "title"); + if (!(_init_string.empty)) { _struct_composite.meta.original_title = _init_string; } } } } @@ -1683,59 +1401,34 @@ if ("rights" in _yaml if (_yaml["rights"].type.mapping && _yaml["rights"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("copyright" in _yaml["rights"] - && _yaml["rights"]["copyright"].type.string - && _yaml["rights"]["copyright"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright = check_input_markup(_yaml["rights"]["copyright"].get!string); - } - if ("copyright_text" in _yaml["rights"] - && _yaml["rights"]["copyright_text"].type.string - && _yaml["rights"]["copyright_text"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_text = _yaml["rights"]["copyright_text"].get!string; - } - if ("copyright_audio" in _yaml["rights"] - && _yaml["rights"]["copyright_audio"].type.string - && _yaml["rights"]["copyright_audio"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_audio = _yaml["rights"]["copyright_audio"].get!string; - } - if ("copyright_cover" in _yaml["rights"] - && _yaml["rights"]["copyright_cover"].type.string - && _yaml["rights"]["copyright_cover"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_cover = _yaml["rights"]["copyright_cover"].get!string; - } - if ("copyright_illustrations" in _yaml["rights"] - && _yaml["rights"]["copyright_illustrations"].type.string - && _yaml["rights"]["copyright_illustrations"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_illustrations = _yaml["rights"]["copyright_illustrations"].get!string; - } - if ("copyright_photographs" in _yaml["rights"] - && _yaml["rights"]["copyright_photographs"].type.string - && _yaml["rights"]["copyright_photographs"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_photographs = _yaml["rights"]["copyright_photographs"].get!string; - } - if ("copyright_translation" in _yaml["rights"] - && _yaml["rights"]["copyright_translation"].type.string - && _yaml["rights"]["copyright_translation"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_translation = _yaml["rights"]["copyright_translation"].get!string; - } - if ("copyright_video" in _yaml["rights"] - && _yaml["rights"]["copyright_video"].type.string - && _yaml["rights"]["copyright_video"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_video = _yaml["rights"]["copyright_video"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright", true); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_text"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_text = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_audio"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_audio = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_cover"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_cover = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_illustrations"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_illustrations = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_photographs"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_photographs = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_translation"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_translation = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_video"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_video = _init_string; } } - if ("license" in _yaml["rights"] - && _yaml["rights"]["license"].type.string - && _yaml["rights"]["license"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_license = check_input_markup(_yaml["rights"]["license"].get!string); + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "license", true); + if (!(_init_string.empty)) { _struct_composite.meta.rights_license = _init_string; } } } } @@ -2427,12 +2120,12 @@ template configParseYAMLreturnSpineStruct() { sisudoc.meta.conf_make_meta_structs, sisudoc.meta.conf_make_meta_json; mixin contentYAMLtoSpineStruct; - @system auto configParseYAMLreturnSpineStruct(T,CCm,M,O,Cfg)( - T _document_struct, - CCm _make_and_meta_struct, - M _manifested, - O _opt_action, - Cfg _cfg + @system ConfComposite configParseYAMLreturnSpineStruct(T,M,O,Cfg)( + T _document_struct, + ConfComposite _make_and_meta_struct, + M _manifested, + O _opt_action, + Cfg _cfg ){ Node _yaml; if (_document_struct.content.length > 0) { @@ -2465,7 +2158,7 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() { std.exception, std.regex, std.stdio, - std.traits, + // std.traits, std.typecons, std.utf, std.conv : to; @@ -2481,12 +2174,12 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() { static auto rgx = RgxI(); mixin spineRgxYamlTags; static auto rgx_y = RgxYaml(); - @system auto docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct(CCm,Src,M,O,Cfg)( - Src header_src, - CCm _make_and_meta_struct, - M _manifested, - O _opt_action, - Cfg _cfg, + @system ConfComposite docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct(Src,M,O,Cfg)( + Src header_src, + ConfComposite _make_and_meta_struct, + M _manifested, + O _opt_action, + Cfg _cfg, ) { Node _yaml; try { diff --git a/org/meta_debugs.org b/org/meta_debugs.org index fcf8e3c..b5948eb 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:debugs: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/nix-develop-dlang-shared.org b/org/nix-develop-dlang-shared.org new file mode 100644 index 0000000..f0a7aac --- /dev/null +++ b/org/nix-develop-dlang-shared.org @@ -0,0 +1,628 @@ +-*- mode: org -*- +#+TITLE: dlang related shared versions +#+DESCRIPTION: dlang +#+FILETAGS: :dlang:develop:shared: +#+AUTHOR: Ralph Amissah +#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah +#+LANGUAGE: en +#+STARTUP: content hideblocks hidestars noindent entitiespretty +#+PROPERTY: header-args :noweb yes +#+PROPERTY: header-args+ :exports code +#+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 + +* nix +** direnv +*** version SET + +#+NAME: direnv-version +#+BEGIN_SRC org +<<direnv_version_3_0_6>> +#+END_SRC + +#+NAME: direnv-hash +#+BEGIN_SRC org +<<direnv_hash_3_0_6>> +#+END_SRC + +*** versions + +**** 3.0.6 + +#+NAME: direnv_version_3_0_6 +#+BEGIN_SRC org +3.0.6 +#+END_SRC + +#+NAME: direnv_hash_3_0_6 +#+BEGIN_SRC org +sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= +#+END_SRC + +**** 3.0.4 + +#+NAME: direnv_version_3_0_4 +#+BEGIN_SRC org +3.0.4 +#+END_SRC + +#+NAME: direnv_hash_3_0_4 +#+BEGIN_SRC org +sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= +#+END_SRC + +**** 3.0.0 + +#+NAME: direnv_version_3_0_0 +#+BEGIN_SRC org +3.0.0 +#+END_SRC + +#+NAME: direnv_hash_3_0_0 +#+BEGIN_SRC org +sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= +#+END_SRC + +**** 2.4.0 + +#+NAME: direnv_version_2_4_0 +#+BEGIN_SRC org +2.4.0 +#+END_SRC + +#+NAME: direnv_hash_2_4_0 +#+BEGIN_SRC org +sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= +#+END_SRC + +* dlang +** ldc +*** version SET +**** version & sha256 nix composite + +#+NAME: ldc-version-info +#+BEGIN_SRC org +version = "<<ldc-version>>"; +sha256 = "<<ldc-hash>>"; +#+END_SRC + +**** select version SET OK ✓ + +#+NAME: ldc-version +#+BEGIN_SRC org +<<ldc_version_1_40_1>> +#+END_SRC + +#+NAME: ldc-hash +#+BEGIN_SRC org +<<ldc_hash_1_40_1>> +#+END_SRC + +#+NAME: ldc-llvm-set +#+BEGIN_SRC org +<<ldc_llvm_set_1_40_1>> +#+END_SRC + +*** versions +**** 1.40 OK ✓ +***** 1.40.1 OK ✓ + + - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.40.1.tar.gz + - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz + +#+NAME: ldc_version_1_40_1 +#+BEGIN_SRC nix +1.40.1 +#+END_SRC + +#+NAME: ldc_hash_1_40_1 +#+BEGIN_SRC nix +sha256-WdnwdH25A5oMNNY3uWG2hxnaAT+S1hNuP7LElH3uuuk= +#+END_SRC + +#+NAME: ldc_llvm_set_1_40_1 +#+BEGIN_SRC nix +llvm_19 +#+END_SRC + +***** 1.40.0 OK ✓ + + - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.40.0.tar.gz + - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz + +#+NAME: ldc_version_1_40_0 +#+BEGIN_SRC nix +1.40.0 +#+END_SRC + +#+NAME: ldc_hash_1_40_0 +#+BEGIN_SRC nix +sha256-LT85DlAebecPpBUgZP0ayKTVrTUqN6DMJVEWTatLOxY= +#+END_SRC + +#+NAME: ldc_llvm_set_1_40_0 +#+BEGIN_SRC nix +llvm_19 +#+END_SRC + +**** 1.39 OK ✓ +***** 1.39.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.39.0.tar.gz +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz + +#+NAME: ldc_version_1_39_0 +#+BEGIN_SRC nix +1.39.0 +#+END_SRC + +#+NAME: ldc_hash_1_39_0 +#+BEGIN_SRC nix +sha256-ZiG0ATsY6Asu2nus3Y404fvqIwtKYoHl1JRUDU5A6mo= +#+END_SRC + +#+NAME: ldc_llvm_set_1_39_0 +#+BEGIN_SRC nix +llvm_18 +#+END_SRC + +**** =< 1.32 +***** 1.32.2 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.32.1.tar.gz + +#+NAME: ldc_version_1_32_2 +#+BEGIN_SRC nix +1.32.2 +#+END_SRC + +#+NAME: ldc_hash_1_32_2 +#+BEGIN_SRC nix +sha256-v6Sq7nQyChJohDyI4inzObLfCVOkvLT87VLr4N2hzZU= +#+END_SRC + +***** 1.32.1 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.32.1.tar.gz + +#+NAME: ldc_version_1_32_1 +#+BEGIN_SRC nix +1.32.1 +#+END_SRC + +#+NAME: ldc_hash_1_32_1 +#+BEGIN_SRC nix +sha256-s1U7+qiVJDF+zSHrLGPG6g+acIChYnXkb9p+OrNX6g8= +#+END_SRC + +***** 1.32.0 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.32.0.tar.gz + +#+NAME: ldc_version_1_32_0 +#+BEGIN_SRC nix +1.32.0 +#+END_SRC + +#+NAME: ldc_hash_1_32_0 +#+BEGIN_SRC nix +sha256-xO4L+RtBbdVkE1PZsme2pIYAxJnHgr6xEtLkYOMpvqw= +#+END_SRC + +***** 1.31.0 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.31.0.tar.gz + +#+NAME: ldc_version_1_31_0 +#+BEGIN_SRC nix +1.31.0 +#+END_SRC + +#+NAME: ldc_hash_1_31_0 +#+BEGIN_SRC nix +sha256-8cjs6eHjWAbDRBvyT75mbN3Y7vN1WSwZzY/uRwHNVFg= +#+END_SRC + +***** 1.30.0 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.30.0.tar.gz + +#+NAME: ldc_version_1_30_0 +#+BEGIN_SRC nix +1.30.0 +#+END_SRC + +#+NAME: ldc_hash_1_30_0 +#+BEGIN_SRC nix +sha256-/bs3bwgkLZF5IqaiKnc5gCF/r6MQBG/F1kWUkK8j2s0= +#+END_SRC + +** dmd +*** version SET + +#+NAME: dmd-version +#+BEGIN_SRC org +<<dmd_version_2_110_0>> +#+END_SRC + +#+NAME: dmd-hash +#+BEGIN_SRC org +<<dmd_hash_2_110_0>> +#+END_SRC + +#+NAME: phobos-hash +#+BEGIN_SRC org +<<phobos_hash_2_110_0>> +#+END_SRC + +*** versions +**** 2.111.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.111.0-beta.1.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.111.0-beta.1.tar.gz + +#+NAME: dmd_version_2_111_0 +#+BEGIN_SRC nix +2.111.0-beta.1 +#+END_SRC + +#+NAME: phobos_hash_2_111_0 +#+BEGIN_SRC nix +sha256-yPmstS52J0BboR++9nYaeUq2mAJrFuUjxxi2BGgGCUY= +#+END_SRC + +#+NAME: dmd_hash_2_111_0 +#+BEGIN_SRC nix +sha256-MfGcno6o+GXZTWyWZ0kGYtMcMPuj2VgQd5I+nPKz1I4= +#+END_SRC + +**** 2.110.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.110.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.110.0.tar.gz + +#+NAME: dmd_version_2_110_0 +#+BEGIN_SRC nix +2.110.0 +#+END_SRC + +#+NAME: phobos_hash_2_110_0 +#+BEGIN_SRC nix +sha256-CmJpcHM+sIsaYBlpALCFoQFG+93s8gUyWmM0tYqjXkk= +#+END_SRC + +#+NAME: dmd_hash_2_110_0 +#+BEGIN_SRC nix +sha256-icXp9xWF2AI2gp7z/lQFAChmXfQePe9b5pbpQ9Mn19Y= +#+END_SRC + +**** 2.109.1 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.1.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.109.1.tar.gz + +#+NAME: dmd_version_2_109_1 +#+BEGIN_SRC nix +2.109.1 +#+END_SRC + +#+NAME: phobos_hash_2_109_1 +#+BEGIN_SRC nix +sha256-73I0k7tCBwe5tl4K6uMs3/nT2JTZ2SppFYzmokS4W5Y= +#+END_SRC + +#+NAME: dmd_hash_2_109_1 +#+BEGIN_SRC nix +sha256-3nCDPZnb4eQZmhYYxcH6qOmsP8or0KYuzAa5g/C9xdU= +#+END_SRC + +**** 2.109.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.109.0.tar.gz + +#+NAME: dmd_version_2_109_0 +#+BEGIN_SRC nix +2.109.0 +#+END_SRC + +#+NAME: dmd_hash_2_109_0 +#+BEGIN_SRC nix +sha256-unAZgyZyT6qomlj6pdlOx4h1SKuDjutl1/0FM9AhBWc= +#+END_SRC + +#+NAME: phobos_hash_2_109_0 +#+BEGIN_SRC nix +sha256-b91FeluFqhmjHd1wwkyq98QzIlwjE646xNj2n6hP3aM= +#+END_SRC + +**** 2.108.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.108.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.108.0.tar.gz + +#+NAME: dmd_version_2_108_0 +#+BEGIN_SRC nix +2.108.0 +#+END_SRC + +#+NAME: dmd_hash_2_108_0 +#+BEGIN_SRC nix +sha256-tlWcFgKtXzfqMMkOq4ezhZHdYCXFckjN5+m6jO4VH0U= +#+END_SRC + +#+NAME: phobos_hash_2_108_0 +#+BEGIN_SRC nix +sha256-uU8S4rABOfhpKh+MvSbclkbdf0hrsuKF8SIpWMnPpfU= +#+END_SRC + +**** 2.107.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.107.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.107.0.tar.gz + +#+NAME: dmd_version_2_107_0 +#+BEGIN_SRC nix +2.107.0 +#+END_SRC + +#+NAME: dmd_hash_2_107_0 +#+BEGIN_SRC nix +<<sha256-blank>> +#+END_SRC + +#+NAME: phobos_hash_2_107_0 +#+BEGIN_SRC nix +<<sha256-blank>> +#+END_SRC + +**** 2.106.1 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.106.1.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.106.1.tar.gz + +#+NAME: dmd_version_2_106_1 +#+BEGIN_SRC nix +2.106.1 +#+END_SRC + +#+NAME: dmd_hash_2_106_1 +#+BEGIN_SRC nix +sha256-vjYa/Pxrz7J2htXT+fa+xaeen/Vxne++lELbHTSXBK8= +#+END_SRC + +#+NAME: phobos_hash_2_106_1 +#+BEGIN_SRC nix +sha256-yRL9ub3u4mREG9PVxBvgQ/LDXD57RadPTZ2h08qyh/s= +#+END_SRC + +#+NAME: dmd_version +#+BEGIN_SRC nix +<<dmd_version_2_104_0>> +#+END_SRC + +#+NAME: dmd_hash +#+BEGIN_SRC nix +<<dmd_hash_2_104_0>> +#+END_SRC + +#+NAME: phobos_hash +#+BEGIN_SRC nix +<<phobos_hash_2_104_0>> +#+END_SRC + +** dub +*** version SET + +#+NAME: dub-version +#+HEADER: :noweb yes +#+BEGIN_SRC org +<<dub_version_1_39_0>> +#+END_SRC + +#+NAME: dub-hash +#+BEGIN_SRC org +<<dub_hash_1_39_0>> +#+END_SRC + +*** versions +**** 1.39 OK ✓ +***** 1.39.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.39.0.tar.gz + +#+NAME: dub_version_1_39_0 +#+BEGIN_SRC nix +1.39.0 +#+END_SRC + +#+NAME: dub_hash_1_39_0 +#+BEGIN_SRC nix +sha256-73b15A9+hClD6IbuxTy9QZKpTKjUFYBuqGOclUyhrnM= +#+END_SRC + +**** 1.38 OK ✓ +***** 1.38.1 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.38.1.tar.gz + +#+NAME: dub_version_1_38_1 +#+BEGIN_SRC nix +1.38.1 +#+END_SRC + +#+NAME: dub_hash_1_38_1 +#+BEGIN_SRC nix +sha256-8Lr/0sx4SKwU1aNOxZArta0RXpDM+EWl29ZsPDdPWFo= +#+END_SRC + +**** 1.36 OK ✓ +***** 1.36.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.36.0.tar.gz + +#+NAME: dub_version_1_36_0 +#+BEGIN_SRC nix +1.36.0 +#+END_SRC + +#+NAME: dub_hash_1_36_0 +#+BEGIN_SRC nix +sha256-S8pls9zxbGAQTwqYf4bDT2q7Ow12S8bBsJE5UmsACBs= +#+END_SRC + +**** 1.35 OK ✓ +***** 1.35.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.35.0.tar.gz + +#+NAME: dub_version_1_35_0 +#+BEGIN_SRC nix +1.35.0 +#+END_SRC + +#+NAME: dub_hash_1_35_0 +#+BEGIN_SRC nix +sha256-hC46XKE6lLLMLGMGl4vDnLDBQy6P/Z7o3ayDJj0Sois= +#+END_SRC + +**** 1.34 OK ✓ +***** 1.34.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.34.0.tar.gz + +#+NAME: dub_version_1_34_0 +#+BEGIN_SRC nix +1.34.0 +#+END_SRC + +#+NAME: dub_hash_1_34_0 +#+BEGIN_SRC nix +sha256-hC46XKE6lLLMLGMGl4vDnLDBQy6P/Z7o3ayDJj0Sois= +#+END_SRC + +**** 1.33 OK ✓ +***** 1.33.1 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.1.tar.gz + +#+NAME: dub_version_1_33_1 +#+BEGIN_SRC nix +1.33.1 +#+END_SRC + +#+NAME: dub_hash_1_33_1 +#+BEGIN_SRC nix +sha256-QFgUsO04VRXBDjGI5QQs7u9XrexG7/V34TMgJP1D8yA= +#+END_SRC + +***** 1.33.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.0.tar.gz + +#+NAME: dub_version_1_33_0 +#+BEGIN_SRC nix +1.33.0 +#+END_SRC + +#+NAME: dub_hash_1_33_0 +#+BEGIN_SRC nix +sha256-4Mha7WF6cg3DIccfpvOnheuvgfziv/7wo8iFsPXO4yY= +#+END_SRC + +**** 1.32 OK ✓ +***** 1.32.1 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.32.1.tar.gz + +#+NAME: dub_version_1_32_1 +#+BEGIN_SRC nix +1.32.1 +#+END_SRC + +#+NAME: dub_hash_1_32_1 +#+BEGIN_SRC nix +sha256-5pW3Fu3PQ1ZLJnsuh7fPpEBNbVQgGfFyiuMrAVOJKQA= +#+END_SRC + +** dtools + +- https://github.com/dlang/tools + +*** version SET + +#+NAME: dtools-version +#+BEGIN_SRC org +<<dtools_version_2_110_0>> +#+END_SRC + +#+NAME: dtools-hash +#+BEGIN_SRC org +<<dtools_hash_2_110_0>> +#+END_SRC + +*** versions +**** 2.110.0 OK ✓ + +- https://github.com/dlang/tools/releases/tag/v2.110.0 + +#+NAME: dtools_version_2_110_0 +#+BEGIN_SRC nix +2.110.0 +#+END_SRC + +#+NAME: dtools_hash_2_110_0 +#+BEGIN_SRC nix +sha256-xMEHnrstL5hAkhp8+/z1I2KZWZ7eztWZnUGLTKCfbBI= +#+END_SRC + +**** 2.109.1 OK ✓ + +- https://github.com/dlang/tools/releases/tag/v2.109.1 + +#+NAME: dtools_version_2_109_1 +#+BEGIN_SRC nix +2.109.1 +#+END_SRC + +#+NAME: dtools_hash_2_109_1 +#+BEGIN_SRC nix +sha256-Pfj8Kwf5AlcrHhLs5A/0vIFWLZaNR3ro+esbs7oWN9I= +#+END_SRC + +**** 2.104.1 OK ✓ + +- https://github.com/dlang/tools/releases/tag/v2.104.2 + +#+NAME: dtools_version_2_104_2 +#+BEGIN_SRC nix +2.104.2 +#+END_SRC + +#+NAME: dtools_hash_2_104_2 +#+BEGIN_SRC nix +sha256-Pfj8Kwf5AlcrHhLs5A/0vIFWLZaNR3ro+esbs7oWN9I= +#+END_SRC + +** sha256 blank_hash + +#+NAME: blank_hash +#+BEGIN_SRC nix +<<sha256-blank>> +#+END_SRC + +#+NAME: sha256-blank +#+BEGIN_SRC nix +sha256-0000000000000000000000000000000000000000000= +#+END_SRC + +#+NAME: assumed_hash +#+BEGIN_SRC nix +sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= +#+END_SRC + +* __END__ diff --git a/org/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org index 073e1e2..14d2383 100644 --- a/org/nixpkgs_overlays_d_related.org +++ b/org/nixpkgs_overlays_d_related.org @@ -45,7 +45,7 @@ ,#+FILETAGS: :dlang:build:tools: ,#+AUTHOR: Ralph Amissah ,#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -,#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +,#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah ,#+LANGUAGE: en ,#+STARTUP: content hideblocks hidestars noindent entitiespretty @@ -191,7 +191,7 @@ nix flake update && nix flake check --show-trace && nix flake info && echo "" && ** .gitignore #+HEADER: :tangle-NO "../nix-overlays/.gitignore" -#+BEGIN_SRC sh +#+BEGIN_SRC gitignore # git ls-files --others --exclude-from=.git/info/exclude # git check-ignore -v flake.lock # git clean -ix @@ -234,7 +234,7 @@ tmp/** *** nixDevEnv.sh (.envrc) #+HEADER: :tangle-NO "../nix-overlays/nixDevEnv.sh" -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [ -f .envrc-local ]; then source_env_if_exists .envrc-local || source .envrc-local fi @@ -246,7 +246,7 @@ fi *** .envrc-local #+HEADER: :tangle-NO "../nix-overlays/.envrc-local" -#+BEGIN_SRC sh +#+BEGIN_SRC shell #if [[ !( -f ./nix-flakes.org) && -f ../dlang-nix-flakes.org ]]; then # # for editing purpose link to the .org file that creates ./dlang-nix-flakes/ content # ln -s ../dlang-nix-flakes.org ./nix-flakes.org @@ -267,11 +267,11 @@ fi - ${NixDirEnvVersion} #+HEADER: :tangle-NO "../nix-overlays/.envrc-nix" -#+BEGIN_SRC sh +#+BEGIN_SRC shell NIX_ENFORCE_PURITY=1 # - https://github.com/nix-community/nix-direnv -NixDirEnvVersion="<<direnv-version>>" -NixDirEnvSHA="<<direnv-sha>>" +NixDirEnvVersion="<<direnv_version>>" +NixDirEnvSHA="<<direnv_hash>>" if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}" fi @@ -291,59 +291,6 @@ use flake . #use flake .#default #+END_SRC -*** 3.0.6 - -#+NAME: direnv-version -#+BEGIN_SRC sh -3.0.6 -#+END_SRC - -#+NAME: direnv-sha -#+BEGIN_SRC sh -sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= -#+END_SRC - -*** 3.0.4 - -#+BEGIN_SRC sh -3.0.4 -#+END_SRC - -#+BEGIN_SRC sh -sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= -#+END_SRC - -*** 3.0.0 - -#+BEGIN_SRC sh -3.0.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= -#+END_SRC - -*** 2.4.0 - -#+BEGIN_SRC sh -2.4.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= -#+END_SRC - -#+NAME: direnv-sha_ -#+BEGIN_SRC sh -sha256-0000000000000000000000000000000000000000000= -#+END_SRC - -#+BEGIN_SRC sh -- https://github.com/nix-community/nix-direnv -NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000=" -direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc -#+END_SRC - ** .nix *** flake.nix @@ -403,32 +350,34 @@ direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${Nix inherit shell; inherit devEnv; packages = [ - gnumake ldc dub dtools + gnumake ]; inherit shellHook; }; dsh-overlay-ldc-dub = mkShell { - name = "overlay - ldc-<<ldc_version>> - dub-<<dub_version>>"; + name = "overlay - ldc-<<ldc_version>> - dub-<<dub_version>> - dtools-<<dtools_version>>"; inherit shell; inherit devEnv; packages = [ - gnumake ldc dub + dtools + gnumake ]; inherit shellHook; }; dsh-overlay-dmd-dub = mkShell { - name = "overlay - dmd-<<dmd_version>> - dub-<<dub_version>>"; + name = "overlay - dmd-<<dmd_version>> - dub-<<dub_version>> - dtools-<<dtools_version>>"; inherit shell; inherit devEnv; packages = [ - gnumake dmd dub + dtools + gnumake ]; inherit shellHook; }; @@ -437,11 +386,12 @@ direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${Nix inherit shell; inherit devEnv; packages = [ - gnumake ldc gtkd tilix dub + dtools + gnumake ]; inherit shellHook; }; @@ -450,9 +400,10 @@ direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${Nix # inherit shell; # inherit devEnv; # packages = [ - # gnumake # gdc # dub + # dtools + # gnumake # ]; # inherit shellHook; #}; @@ -463,6 +414,7 @@ direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${Nix packages = with pkgs-nix; [ ldc dub + dtools gnumake ]; inherit shellHook; @@ -474,6 +426,7 @@ direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${Nix packages = with pkgs-nix; [ dmd dub + dtools gnumake ]; inherit shellHook; @@ -554,41 +507,42 @@ pkgs.callPackage ./shell.nix {} - OK ldc 1.32.2 tested -*** overlays -**** default.nix OK ✓ +*** overlays OK ✓ +**** default.nix #+HEADER: :tangle "../nix-overlays/ldc/default.nix" #+BEGIN_SRC nix import ./package.nix #+END_SRC -**** package.nix OK ✓ (unaltered) +**** package.nix OK ✓ #+HEADER: :tangle "../nix-overlays/ldc/package.nix" #+BEGIN_SRC nix -{ lib -, stdenv -, fetchFromGitHub -, cmake -, ninja -, <<ldc_llvm_set>> -, curl -, tzdata -, lit -, gdb -, unzip -, darwin -, callPackage -, makeWrapper -, runCommand -, writeText -, targetPackages - -, ldcBootstrap ? callPackage ./bootstrap.nix { } +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + ninja, + <<ldc_llvm_set>>, + curl, + tzdata, + lit, + gdb, + unzip, + darwin, + callPackage, + makeWrapper, + runCommand, + writeText, + targetPackages, + + ldcBootstrap ? callPackage ./bootstrap.nix { }, }: let - pathConfig = runCommand "ldc-lib-paths" {} '' + pathConfig = runCommand "ldc-lib-paths" { } '' mkdir $out echo ${tzdata}/share/zoneinfo/ > $out/TZDatabaseDirFile echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > $out/LibcurlPathFile @@ -674,8 +628,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746 - additionalExceptions = lib.optionalString stdenv.hostPlatform.isDarwin - "|druntime-test-shared"; + additionalExceptions = lib.optionalString stdenv.hostPlatform.isDarwin "|druntime-test-shared"; checkPhase = '' # Build default lib test runners @@ -715,34 +668,35 @@ stdenv.mkDerivation (finalAttrs: { }; passthru.ldcBootstrap = ldcBootstrap; - passthru.tests = let - ldc = finalAttrs.finalPackage; - helloWorld = stdenv.mkDerivation (finalAttrs: { - name = "ldc-hello-world"; - src = writeText "hello_world.d" '' - module hello_world; - import std.stdio; - void main() { - writeln("Hello, world!"); - } - ''; - dontUnpack = true; - buildInputs = [ ldc ]; - dFlags = []; - buildPhase = '' - ldc2 ${lib.escapeShellArgs finalAttrs.dFlags} -of=test $src - ''; - installPhase = '' - mkdir -p $out/bin - mv test $out/bin - ''; - }); - in { - # Without -shared, built binaries should not contain - # references to the compiler binaries. - no-references-to-compiler = helloWorld.overrideAttrs { - disallowedReferences = [ ldc ]; - dFlags = ["-g"]; + passthru.tests = + let + ldc = finalAttrs.finalPackage; + helloWorld = stdenv.mkDerivation (finalAttrs: { + name = "ldc-hello-world"; + src = writeText "hello_world.d" '' + module hello_world; + import std.stdio; + void main() { + writeln("Hello, world!"); + } + ''; + dontUnpack = true; + buildInputs = [ ldc ]; + dFlags = [ ]; + buildPhase = '' + ldc2 ${lib.escapeShellArgs finalAttrs.dFlags} -of=test $src + ''; + installPhase = '' + mkdir -p $out/bin + mv test $out/bin + ''; + }); + in { + # Without -shared, built binaries should not contain + # references to the compiler binaries. + no-references-to-compiler = helloWorld.overrideAttrs { + disallowedReferences = [ ldc ]; + dFlags = ["-g"]; }; }; }) @@ -754,7 +708,16 @@ stdenv.mkDerivation (finalAttrs: { #+HEADER: :tangle "../nix-overlays/ldc/bootstrap.nix" #+BEGIN_SRC nix -{ lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, libxml2 }: +{ + lib, + stdenv, + fetchurl, + curl, + tzdata, + autoPatchelfHook, + fixDarwinDylibNames, + libxml2, +}: let inherit (stdenv) hostPlatform; @@ -828,75 +791,6 @@ hashes = { }; #+END_SRC -*** versions SET -**** selected version SET OK ✓ -***** version & sha256 nix composite - -#+NAME: ldc_version_info -#+BEGIN_SRC nix -version = "<<ldc_version>>"; -sha256 = "<<ldc_hash>>"; -#+END_SRC - -***** select version SET OK ✓ - -#+NAME: ldc_version -#+BEGIN_SRC nix -<<ldc_version_1_40_0>> -#+END_SRC - -#+NAME: ldc_hash -#+BEGIN_SRC nix -<<ldc_hash_1_40_0>> -#+END_SRC - -#+NAME: ldc_llvm_set -#+BEGIN_SRC nix -<<ldc_llvm_set_1_40_0>> -#+END_SRC - -**** 1.40 OK ✓ -***** 1.40.0 OK ✓ - - - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.40.0-beta6.tar.gz - - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz - -#+NAME: ldc_version_1_40_0 -#+BEGIN_SRC nix -1.40.0 -#+END_SRC - -#+NAME: ldc_hash_1_40_0 -#+BEGIN_SRC nix -sha256-LT85DlAebecPpBUgZP0ayKTVrTUqN6DMJVEWTatLOxY= -#+END_SRC - -#+NAME: ldc_llvm_set_1_40_0 -#+BEGIN_SRC nix -llvm_19 -#+END_SRC - -**** 1.39 OK ✓ -***** 1.39.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.39.0.tar.gz -- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz - -#+NAME: ldc_version_1_39_0 -#+BEGIN_SRC nix -1.39.0 -#+END_SRC - -#+NAME: ldc_hash_1_39_0 -#+BEGIN_SRC nix -sha256-ZiG0ATsY6Asu2nus3Y404fvqIwtKYoHl1JRUDU5A6mo= -#+END_SRC - -#+NAME: ldc_llvm_set_1_39_0 -#+BEGIN_SRC nix -llvm_18 -#+END_SRC - ** dmd OK ✓ *** info **** links @@ -919,10 +813,17 @@ llvm_18 *** overlays **** default.nix -***** default.nix >=2.108.0) #+HEADER: :tangle "../nix-overlays/dmd/default.nix" #+BEGIN_SRC nix +import ./package.nix +#+END_SRC + +**** package.nix OK ✓ +***** package.nix >=2.108.0) + +#+HEADER: :tangle "../nix-overlays/dmd/package.nix" +#+BEGIN_SRC nix import ./generic.nix { version = "<<dmd_version>>"; dmdHash = "<<dmd_hash>>"; @@ -930,10 +831,9 @@ import ./generic.nix { } #+END_SRC -***** default.nix < 2.108.0) - +***** package.nix < 2.108.0) -#+HEADER: :tangle-NO "../nix-overlays/dmd/default.nix" +#+HEADER: :tangle-NO "../nix-overlays/dmd/package.nix" #+BEGIN_SRC nix import ./generic.nix { version = "<<dmd_version>>"; @@ -946,31 +846,33 @@ import ./generic.nix { #+HEADER: :tangle "../nix-overlays/dmd/generic.nix" #+BEGIN_SRC nix -{ version -, dmdHash -, phobosHash +{ + version, + dmdHash, + phobosHash, }: -{ stdenv -, lib -, fetchFromGitHub -, removeReferencesTo -, makeWrapper -, which -, writeTextFile -, curl -, tzdata -, gdb -#, Foundation -, callPackage -, targetPackages -, fetchpatch -, bash -, installShellFiles -, git -, unzip -, dmdBootstrap ? callPackage ./bootstrap.nix { } -, dmdBin ? "${dmdBootstrap}/bin" +{ + stdenv, + lib, + fetchFromGitHub, + removeReferencesTo, + makeWrapper, + which, + writeTextFile, + curl, + tzdata, + gdb, + # Foundation, + callPackage, + targetPackages, + fetchpatch, + bash, + installShellFiles, + git, + unzip, + dmdBootstrap ? callPackage ./bootstrap.nix { }, + dmdBin ? "${dmdBootstrap}/bin", }: let @@ -984,11 +886,8 @@ let }; bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; - osname = - if stdenv.hostPlatform.isDarwin then - "osx" - else - stdenv.hostPlatform.parsed.kernel.name; + osname = if stdenv.hostPlatform.isDarwin then "osx" + else stdenv.hostPlatform.parsed.kernel.name; pathToDmd = "\${NIX_BUILD_TOP}/dmd/generated/${osname}/release/${bits}/dmd"; in @@ -1276,189 +1175,6 @@ stdenv.mkDerivation { } #+END_SRC -*** versions SET -**** selected version SET OK ✓ - -#+NAME: dmd_version -#+BEGIN_SRC nix -<<dmd_version_2_109_1>> -#+END_SRC - -#+NAME: dmd_hash -#+BEGIN_SRC nix -<<dmd_hash_2_109_1>> -#+END_SRC - -#+NAME: phobos_hash -#+BEGIN_SRC nix -<<phobos_hash_2_109_1>> -#+END_SRC - -**** 2.109.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.1.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.109.1.tar.gz - -#+NAME: dmd_version_2_109_1 -#+BEGIN_SRC nix -2.109.1 -#+END_SRC - -#+NAME: phobos_hash_2_109_1 -#+BEGIN_SRC nix -sha256-73I0k7tCBwe5tl4K6uMs3/nT2JTZ2SppFYzmokS4W5Y= -#+END_SRC - -#+NAME: dmd_hash_2_109_1 -#+BEGIN_SRC nix -sha256-3nCDPZnb4eQZmhYYxcH6qOmsP8or0KYuzAa5g/C9xdU= -#+END_SRC - -**** 2.109.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.0.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.109.0.tar.gz - -#+NAME: dmd_version_2_109_0 -#+BEGIN_SRC nix -2.109.0 -#+END_SRC - -#+NAME: dmd_hash_2_109_0 -#+BEGIN_SRC nix -sha256-unAZgyZyT6qomlj6pdlOx4h1SKuDjutl1/0FM9AhBWc= -#+END_SRC - -#+NAME: phobos_hash_2_109_0 -#+BEGIN_SRC nix -sha256-b91FeluFqhmjHd1wwkyq98QzIlwjE646xNj2n6hP3aM= -#+END_SRC - -**** 2.108.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.108.0.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.108.0.tar.gz - -#+NAME: dmd_version_2_108_0 -#+BEGIN_SRC nix -2.108.0 -#+END_SRC - -#+NAME: dmd_hash_2_108_0 -#+BEGIN_SRC nix -sha256-tlWcFgKtXzfqMMkOq4ezhZHdYCXFckjN5+m6jO4VH0U= -#+END_SRC - -#+NAME: phobos_hash_2_108_0 -#+BEGIN_SRC nix -sha256-uU8S4rABOfhpKh+MvSbclkbdf0hrsuKF8SIpWMnPpfU= -#+END_SRC - -**** 2.107.0 - skip (asleep here apparently) - -- asleep apparently - -#+NAME: dmd_version_2_107_0 -#+BEGIN_SRC nix -2.107.0 -#+END_SRC - -#+NAME: dmd_hash_2_107_0 -#+BEGIN_SRC nix -<<sha256-blank>> -#+END_SRC - -#+NAME: phobos_hash_2_107_0 -#+BEGIN_SRC nix -<<sha256-blank>> -#+END_SRC - -**** 2.106.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.106.1.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.106.1.tar.gz - -#+NAME: dmd_version_2_106_1 -#+BEGIN_SRC nix -2.106.1 -#+END_SRC - -#+NAME: dmd_hash_2_106_1 -#+BEGIN_SRC nix -sha256-vjYa/Pxrz7J2htXT+fa+xaeen/Vxne++lELbHTSXBK8= -#+END_SRC - -#+NAME: phobos_hash_2_106_1 -#+BEGIN_SRC nix -sha256-yRL9ub3u4mREG9PVxBvgQ/LDXD57RadPTZ2h08qyh/s= -#+END_SRC - -**** 2.104.0 KO ✗ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.104.0.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.104.0.tar.gz - -#+NAME: dmd_version_2_104_0 -#+BEGIN_SRC nix -2.104.0 -#+END_SRC - -#+NAME: dmd_hash_2_104_0 -#+BEGIN_SRC nix -sha256-yv+uW6cYAId2HK/YSPxsR9Xt0o3LWa97z8KyzjFik6s= -#+END_SRC - -#+NAME: phobos_hash_2_104_0 -#+BEGIN_SRC nix -sha256-cWp36Gd/lh3gy21bf9z0/RqzlJmf6ypmx72aMeakcec= -#+END_SRC - -**** 2.102.2 KO ✗ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.102.2.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.102.2.tar.gz - -#+NAME: dmd_version_2_102_2 -#+BEGIN_SRC nix -2.102.2 -#+END_SRC - -#+NAME: dmd_hash_2_102_2 -#+BEGIN_SRC nix -sha256-der9nb31hJ+K1aJZdzIgs8+eRgVVsH97QnYEnVbKUws= -#+END_SRC - -#+NAME: phobos_hash_2_102_2 -#+BEGIN_SRC nix -sha256-SracmUm2aY/LDCyDqYuVS39pCbwO8UCL3TSB0CVHpHE= -#+END_SRC - -**** 2.100.2 KO ✗ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.100.2.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/druntime/archive/refs/tags/v2.100.2.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.100.2.tar.gz - -#+NAME: dmd_version_2_100_2 -#+BEGIN_SRC nix -2.100.2 -#+END_SRC - -#+NAME: dmd_hash_2_100_2 -#+BEGIN_SRC nix -sha256-o4+G3ARXIGObYHtHooYZKr+Al6kHpiwpMIog3i4BlDM= -#+END_SRC - -#+NAME: druntime_hash_2_100_2 -#+BEGIN_SRC nix -sha256-qXvY1ECN4mPwOGgOE1FWwvxoRvlSww3tGLWgBdhzAKo= -#+END_SRC - -#+NAME: phobos_hash_2_100_2 -#+BEGIN_SRC nix -sha256-kTHRaAKG7cAGb4IE/NGHWaZ8t7ZceKj03l6E8wLzJzs= -#+END_SRC - ** dub OK *** info **** links @@ -1486,23 +1202,26 @@ sha256-kTHRaAKG7cAGb4IE/NGHWaZ8t7ZceKj03l6E8wLzJzs= - OK dub == 1.30.0 OK ✓ *** overlays -**** default.nix OK ✓ +**** default.nix #+HEADER: :tangle "../nix-overlays/dub/default.nix" #+BEGIN_SRC nix import ./package.nix #+END_SRC +**** package.nix OK ✓ + #+HEADER: :tangle "../nix-overlays/dub/package.nix" #+BEGIN_SRC nix -{ lib -, stdenv -, fetchFromGitHub -, curl -, <<dcompiler>> -, dcompiler ? <<dcompiler>> -, libevent -, rsync +{ + lib, + stdenv, + fetchFromGitHub, + curl, + <<dcompiler>>, + dcompiler ? <<dcompiler>>, + libevent, + rsync, }: assert dcompiler != null; @@ -1599,199 +1318,6 @@ ldc dmd #+END_SRC -*** versions SET -**** selected version SET - -#+NAME: dub_version -#+BEGIN_SRC nix -<<dub_version_1_38_1>> -#+END_SRC - -#+NAME: dub_hash -#+BEGIN_SRC nix -<<dub_hash_1_38_1>> -#+END_SRC - -**** 1.38 OK ✓ -***** 1.38.1 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.38.1.tar.gz - -#+NAME: dub_version_1_38_1 -#+BEGIN_SRC nix -1.38.1 -#+END_SRC - -#+NAME: dub_hash_1_38_1 -#+BEGIN_SRC nix -sha256-8Lr/0sx4SKwU1aNOxZArta0RXpDM+EWl29ZsPDdPWFo= -#+END_SRC - -**** 1.36 OK ✓ -***** 1.36.0 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.36.0.tar.gz - -#+NAME: dub_version_1_36_0 -#+BEGIN_SRC nix -1.36.0 -#+END_SRC - -#+NAME: dub_hash_1_36_0 -#+BEGIN_SRC nix -sha256-S8pls9zxbGAQTwqYf4bDT2q7Ow12S8bBsJE5UmsACBs= -#+END_SRC - -**** 1.35 OK ✓ -***** 1.35.0 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.35.0.tar.gz - -#+NAME: dub_version_1_35_0 -#+BEGIN_SRC nix -1.35.0 -#+END_SRC - -#+NAME: dub_hash_1_35_0 -#+BEGIN_SRC nix -sha256-hC46XKE6lLLMLGMGl4vDnLDBQy6P/Z7o3ayDJj0Sois= -#+END_SRC - -**** 1.34 OK ✓ -***** 1.34.0 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.34.0.tar.gz - -#+NAME: dub_version_1_34_0 -#+BEGIN_SRC nix -1.34.0 -#+END_SRC - -#+NAME: dub_hash_1_34_0 -#+BEGIN_SRC nix -sha256-hC46XKE6lLLMLGMGl4vDnLDBQy6P/Z7o3ayDJj0Sois= -#+END_SRC - -**** 1.33 OK ✓ -***** 1.33.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.1.tar.gz - -#+NAME: dub_version_1_33_1 -#+BEGIN_SRC nix -1.33.1 -#+END_SRC - -#+NAME: dub_hash_1_33_1 -#+BEGIN_SRC nix -sha256-QFgUsO04VRXBDjGI5QQs7u9XrexG7/V34TMgJP1D8yA= -#+END_SRC - -**** 1.33.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.0.tar.gz - -#+NAME: dub_version_1_33_0 -#+BEGIN_SRC nix -1.33.0 -#+END_SRC - -#+NAME: dub_hash_1_33_0 -#+BEGIN_SRC nix -sha256-4Mha7WF6cg3DIccfpvOnheuvgfziv/7wo8iFsPXO4yY= -#+END_SRC - -**** 1.32.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.32.1.tar.gz - -#+NAME: dub_version_1_32_1 -#+BEGIN_SRC nix -1.32.1 -#+END_SRC - -#+NAME: dub_hash_1_32_1 -#+BEGIN_SRC nix -sha256-5pW3Fu3PQ1ZLJnsuh7fPpEBNbVQgGfFyiuMrAVOJKQA= -#+END_SRC - -- ISSUES from 1.31.0 continuing - -**** 1.31.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.31.1.tar.gz - -#+NAME: dub_version_1_31_1 -#+BEGIN_SRC nix -1.31.1 -#+END_SRC - -#+NAME: dub_hash_1_31_1 -#+BEGIN_SRC nix -sha256-dp64D51ypowXS1+EYKRXh5hpa3rMmiotvKO2FW+i92w= -#+END_SRC - -- ISSUES from 1.31.0 continuing - -**** 1.31.0 OK ✓ NOTE - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.31.0.tar.gz - -behavior change in dub requiring the setting of pwd in buildPhase - -#+NAME: dub_version_1_31_0 -#+BEGIN_SRC nix -1.31.0 -#+END_SRC - -#+NAME: dub_hash_1_31_0 -#+BEGIN_SRC nix -sha256-Ki8HJOfWFM1tF86s7Ng3STgC/uu5acVTP0Dj87M0l54= -#+END_SRC - -- ISSUES from 1.31.0 continuing -**** 1.30.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.30.0.tar.gz - -#+NAME: dub_version_1_30_0 -#+BEGIN_SRC nix -1.30.0 -#+END_SRC - -#+NAME: dub_hash_1_30_0 -#+BEGIN_SRC nix -sha256-iVl7bjblvIxvrUX7Phq6h4AIAmZjNVkGYYFA1hhsE7c= -#+END_SRC - -**** 1.29.1 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.29.1.tar.gz - -#+NAME: dub_version_1_29_1 -#+BEGIN_SRC nix -1.29.1 -#+END_SRC - -#+NAME: dub_hash_1_29_1 -#+BEGIN_SRC nix -sha256-XDV9p1bDhRL6gX+nizzjoErNJm8NnQK5O8wNnizloss= -#+END_SRC - -**** 1.28.0 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.28.0.tar.gz - -#+NAME: dub_version_1_28_0 -#+BEGIN_SRC nix -1.28.0 -#+END_SRC - -#+NAME: dub_hash_1_28_0 -#+BEGIN_SRC nix -sha256-GOeaQyu8Y/DxZEAJPdlGH9ie/ZRTqvAw2jjvM3dESbg= -#+END_SRC - ** dtools OK ✓ *** info **** links @@ -1815,130 +1341,280 @@ sha256-GOeaQyu8Y/DxZEAJPdlGH9ie/ZRTqvAw2jjvM3dESbg= #+HEADER: :tangle "../nix-overlays/dtools/default.nix" #+BEGIN_SRC nix -{ stdenv, lib, fetchFromGitHub, fetchpatch, ldc, curl, gnumake42 }: +import ./package.nix +#+END_SRC + +**** package.nix + +#+HEADER: :tangle "../nix-overlays/dtools/package.nix" +#+BEGIN_SRC nix +{ + lib, + stdenv, + fetchFromGitHub, + ldc, + curl, +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "dtools"; version = "<<dtools_version>>"; src = fetchFromGitHub { owner = "dlang"; repo = "tools"; - rev = "v${version}"; - sha256 = "<<dtools_hash>>"; + rev = "v${finalAttrs.version}"; + hash = "<<dtools_hash>>"; name = "dtools"; }; patches = [ - (fetchpatch { - # part of https://github.com/dlang/tools/pull/441 - url = "https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69424625ee866.patch"; # Fix LDC arm64 build - sha256 = "sha256-x6EclTYN1Y5FG57KLhbBK0BZicSYcZoWO7MTVcP4T18="; - }) + # Disable failing tests + ./disabled-tests.diff + # Fix LDC arm64 build + ./fix-ldc-arm64.diff ]; - nativeBuildInputs = [ ldc gnumake42 ]; # fails with make 4.4 + nativeBuildInputs = [ ldc ]; buildInputs = [ curl ]; - makeCmd = '' - make -f posix.mak all DMD_DIR=dmd DMD=${ldc.out}/bin/ldmd2 CC=${stdenv.cc}/bin/cc - ''; + makeFlags = [ + "CC=${stdenv.cc}/bin/cc" + "DMD=${ldc.out}/bin/ldmd2" + "INSTALL_DIR=$(out)" + ]; - buildPhase = '' - $makeCmd - ''; + enableParallelBuilding = true; doCheck = true; - - checkPhase = '' - $makeCmd test_rdmd - ''; - - installPhase = '' - $makeCmd INSTALL_DIR=$out install - ''; + checkTarget = "test_rdmd"; meta = with lib; { - description = "Ancillary tools for the D programming language compiler"; + description = "Ancillary tools for the D programming language"; homepage = "https://github.com/dlang/tools"; - license = lib.licenses.boost; - maintainers = with maintainers; [ ThomasMader ]; - platforms = lib.platforms.unix; + license = licenses.boost; + maintainers = with maintainers; [ jtbx ]; + platforms = platforms.unix; }; -} +}) #+END_SRC -*** versions SET - -- https://github.com/dlang/tools +#+HEADER: :tangle "../nix-overlays/dtools/disabled-tests.diff" +#+BEGIN_SRC diff +--- a/rdmd_test.d ++++ b/rdmd_test.d +@@ -616,7 +616,7 @@ void runTests(string rdmdApp, string compiler, string model) + enforce(res.status == 1, res.output); + } + +- version (Posix) ++ version (none) + { + import std.conv : to; + auto makeVersion = execute(["make", "--version"]).output.splitLines()[0]; +#+END_SRC + +#+HEADER: :tangle "../nix-overlays/dtools/fix-ldc-arm64.diff" +#+BEGIN_SRC diff +Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69424625ee866.patch +--- /dev/null ++++ b/osmodel.mak +@@ -0,0 +1,75 @@ ++# osmodel.mak ++# ++# Detects and sets the macros: ++# ++# OS = one of {osx,linux,freebsd,openbsd,netbsd,dragonflybsd,solaris} ++# MODEL = one of { 32, 64 } ++# MODEL_FLAG = one of { -m32, -m64 } ++# ARCH = one of { x86, x86_64, aarch64 } ++# ++# Note: ++# Keep this file in sync between druntime, phobos, and dmd repositories! ++# Source: https://github.com/dlang/dmd/blob/master/src/osmodel.mak ++ ++ ++ifeq (,$(OS)) ++ uname_S:=$(shell uname -s) ++ ifeq (Darwin,$(uname_S)) ++ OS:=osx ++ endif ++ ifeq (Linux,$(uname_S)) ++ OS:=linux ++ endif ++ ifeq (FreeBSD,$(uname_S)) ++ OS:=freebsd ++ endif ++ ifeq (OpenBSD,$(uname_S)) ++ OS:=openbsd ++ endif ++ ifeq (NetBSD,$(uname_S)) ++ OS:=netbsd ++ endif ++ ifeq (DragonFly,$(uname_S)) ++ OS:=dragonflybsd ++ endif ++ ifeq (Solaris,$(uname_S)) ++ OS:=solaris ++ endif ++ ifeq (SunOS,$(uname_S)) ++ OS:=solaris ++ endif ++ ifeq (,$(OS)) ++ $(error Unrecognized or unsupported OS for uname: $(uname_S)) ++ endif ++endif ++ ++# When running make from XCode it may set environment var OS=MACOS. ++# Adjust it here: ++ifeq (MACOS,$(OS)) ++ OS:=osx ++endif ++ ++ifeq (,$(MODEL)) ++ ifeq ($(OS), solaris) ++ uname_M:=$(shell isainfo -n) ++ else ++ uname_M:=$(shell uname -m) ++ endif ++ ifneq (,$(findstring $(uname_M),x86_64 amd64)) ++ MODEL:=64 ++ ARCH:=x86_64 ++ endif ++ ifneq (,$(findstring $(uname_M),aarch64 arm64)) ++ MODEL:=64 ++ ARCH:=aarch64 ++ endif ++ ifneq (,$(findstring $(uname_M),i386 i586 i686)) ++ MODEL:=32 ++ ARCH:=x86 ++ endif ++ ifeq (,$(MODEL)) ++ $(error Cannot figure 32/64 model and arch from uname -m: $(uname_M)) ++ endif ++endif ++ ++MODEL_FLAG:=-m$(MODEL) +--- a/Makefile ++++ b/Makefile +@@ -9,9 +9,8 @@ DUB=dub + WITH_DOC = no + DOC = ../dlang.org + +-# Load operating system $(OS) (e.g. linux, osx, ...) and $(MODEL) (e.g. 32, 64) detection Makefile from dmd +-$(shell [ ! -d $(DMD_DIR) ] && git clone --depth=1 https://github.com/dlang/dmd $(DMD_DIR)) +-include $(DMD_DIR)/compiler/src/osmodel.mak ++# Load operating system $(OS) (e.g. linux, osx, ...) and $(MODEL) (e.g. 32, 64) detection Makefile ++include osmodel.mak + + ifeq (windows,$(OS)) + DOTEXE:=.exe +@@ -30,7 +29,7 @@ DFLAGS = $(MODEL_FLAG) $(if $(findstring windows,$(OS)),,-fPIC) -preview=dip1000 + DFLAGS += $(WARNINGS) + + # Default DUB flags (DUB uses a different architecture format) +-DUBFLAGS = --arch=$(subst 32,x86,$(subst 64,x86_64,$(MODEL))) ++DUBFLAGS = --arch=$(ARCH) + + TOOLS = \ + $(ROOT)/catdoc$(DOTEXE) \ +#+END_SRC + +** versions SET +*** direnv +***** select version SET OK ✓ -**** selected version SET OK ✓ +#+NAME: direnv_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-version()>> +#+END_SRC -#+NAME: dtools_version -#+BEGIN_SRC nix -<<dtools_version_2_103_1>> +#+NAME: direnv_hash +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-hash()>> #+END_SRC -#+NAME: dtools_hash -#+BEGIN_SRC nix -<<dtools_hash_2_103_1>> +*** ldc +***** version & sha256 nix composite + +#+NAME: ldc_version_info +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version-info()>> #+END_SRC -**** 2.103.1 OK ✓ +***** select version SET OK ✓ -- https://github.com/dlang/tools/releases/tag/v2.103.1 +#+NAME: ldc_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version()>> +#+END_SRC -#+NAME: dtools_version_2_103_1 -#+BEGIN_SRC nix -2.103.1 +#+NAME: ldc_hash +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-hash()>> #+END_SRC -#+NAME: dtools_hash_2_103_1 -#+BEGIN_SRC nix -sha256-XM4gUxcarQCOBR8W/o0iWAI54PyLDkH6CsDce22Cnu4= +#+NAME: ldc_llvm_set +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-llvm-set()>> #+END_SRC -**** 2.102.2 +*** dmd -- https://github.com/dlang/tools/releases/tag/v2.102.2 +#+NAME: dmd_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dmd-version()>> +#+END_SRC -#+NAME: dtools_version_2_102_2 -#+BEGIN_SRC nix -2.102.2 +#+NAME: dmd_hash +#+BEGIN_SRC org +<<./nix-develop-dlang-shared.org:dmd-hash()>> #+END_SRC -#+NAME: dtools_hash_2_102_2 -#+BEGIN_SRC nix -sha256-XM4gUxcarQCOBR8W/o0iWAI54PyLDkH6CsDce22Cnu4= +#+NAME: phobos_hash +#+BEGIN_SRC org +<<./nix-develop-dlang-shared.org:phobos-hash()>> #+END_SRC -**** 2.095.1 current nixpkgs 20-03-17 OK ✓ +*** dub -- https://github.com/dlang/tools/releases/tag/v2.095.1 +#+NAME: dub_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dub-version()>> +#+END_SRC -#+NAME: dtools_version_2_095_1 +#+NAME: dub_hash #+BEGIN_SRC nix -2.095.1 +<<./nix-develop-dlang-shared.org:dub-hash()>> #+END_SRC -#+NAME: dtools_hash_2_095_1 -#+BEGIN_SRC nix -sha256:0rdfk3mh3fjrb0h8pr8skwlq6ac9hdl1fkrkdl7n1fa2806b740b +*** dtools + +#+NAME: dtools_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-version()>> +#+END_SRC + +#+NAME: dtools_hash +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-hash()>> #+END_SRC ** sha256 blank_hash #+NAME: sha256-blank #+BEGIN_SRC nix -sha256-0000000000000000000000000000000000000000000= +<<./nix-develop-dlang-shared.org:sha256-blank()>> #+END_SRC #+NAME: blank_hash #+BEGIN_SRC nix -sha256-0000000000000000000000000000000000000000000= +<<./nix-develop-dlang-shared.org:sha256-blank()>> #+END_SRC -#+NAME: assumed_hash -#+BEGIN_SRC nix -sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -#+END_SRC +* __END__ diff --git a/org/ocda.org b/org/ocda.org index dca0098..148edf8 100644 --- a/org/ocda.org +++ b/org/ocda.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -75,7 +75,7 @@ mixin docAbstractionFunctions; #+HEADER: :noweb yes #+BEGIN_SRC d <<docAbstractionInit>> -<<docAbstractionInitSubstitutions>> +<<docAbstractionInitSubstitutionsDebug>> <<docAbstractionMainLoopSrcByLine>> <<docAbstractionPostMainLoop>> <<docAbstractionReturnsStruct>> @@ -109,8 +109,8 @@ scope(exit) { anchor_tag = ""; } mixin spineNode; -auto node_para_int_ = node_metadata_para_int; -auto node_para_str_ = node_metadata_para_str; +int[string] node_para_int_ = node_metadata_para_int; +string[string] node_para_str_ = node_metadata_para_str; ObjGenericComposite comp_obj_; line_occur = [ "heading" : 0, @@ -221,7 +221,7 @@ int cnt1 = 1; int cnt2 = 1; int cnt3 = 1; *** abstraction init substitutions -#+NAME: docAbstractionInitSubstitutions +#+NAME: docAbstractionInitSubstitutionsDebug #+HEADER: :noweb yes #+BEGIN_SRC d debug (substitutions) { @@ -255,7 +255,7 @@ debug (substitutions) { #+NAME: docAbstractionMainLoopSrcByLine #+HEADER: :noweb yes #+BEGIN_SRC d -auto loopMarkupSrcByLine( +_loopMarkupSrcByLineStruct loopMarkupSrcByLine( char[][] markup_sourcefile_content, string[string] an_object, uint[string] pith, @@ -364,7 +364,7 @@ auto loopMarkupSrcByLine( ._doc_header_and_make_substitutions_(conf_make_meta) ._doc_header_and_make_substitutions_fontface_(conf_make_meta); { - auto _get = line.txt_by_line_block_quote(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_quote(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -377,7 +377,7 @@ auto loopMarkupSrcByLine( ._doc_header_and_make_substitutions_fontface_(conf_make_meta) .replaceAll(rgx.para_delimiter, mkup.br_line_spaced ~ "$1"); { - auto _get = line.txt_by_line_block_group(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_group(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -393,7 +393,7 @@ auto loopMarkupSrcByLine( .replaceAll(rgx.spaces_keep, (m.captures[1]).translate([ ' ' : mkup.nbsp ])); } { - auto _get = line.txt_by_line_block_block(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_block(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -402,7 +402,7 @@ auto loopMarkupSrcByLine( continue; } else if (pith["block_is"] == eN.blk_is.poem) { { - auto _get = line.txt_by_line_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg); + ST_txt_by_line_block_poem _get = line.txt_by_line_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg); { an_object = _get.this_object; pith = _get.pith; @@ -436,7 +436,7 @@ auto loopMarkupSrcByLine( object_number_poem["start"] = obj_cite_digits.object_number.to!string; } { - auto _get = line.txt_by_line_block_start(pith, dochas, object_number_poem); + ST_txt_by_line_block_start _get = line.txt_by_line_block_start(pith, dochas, object_number_poem); { pith = _get.pith; dochas = _get.dochas; @@ -466,7 +466,7 @@ auto loopMarkupSrcByLine( || line.matchFirst(rgx.book_index_item_open) || pith["section"] == eN.sect.book_index) { { // book_index - auto _get = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action); + ST_flow_book_index _get = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action); { an_object = _get.this_object; pith = _get.pith; @@ -488,7 +488,7 @@ auto loopMarkupSrcByLine( comp_obj_comment.text = an_object[an_object_key].strip; the_document_body_section ~= comp_obj_comment; { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -505,7 +505,7 @@ auto loopMarkupSrcByLine( && (pith["make_headings"] == eN.bi.off)) { // heading found { - auto _get = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith); + ST_flow_heading_found _get = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith); { heading_match_str = _get.heading_match_str; heading_match_rgx = _get.heading_match_rgx; @@ -520,7 +520,7 @@ auto loopMarkupSrcByLine( ) { // heading make set { - auto _get = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith); + ST_flow_heading_make_set _get = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith); { line = _get.line; an_object = _get.this_object; @@ -558,7 +558,7 @@ auto loopMarkupSrcByLine( ._doc_header_and_make_substitutions_(conf_make_meta) ._doc_header_and_make_substitutions_fontface_(conf_make_meta); { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; @@ -587,7 +587,7 @@ auto loopMarkupSrcByLine( } else if (pith["block_state"] == eN.blk_state.closing) { // line empty, with blocks flag { - auto _get = line.flow_block_flag_line_empty_( + ST_flow_block_flag_line_empty _get = line.flow_block_flag_line_empty_( an_object, bookindex_extract_hash, the_document_body_section, @@ -703,7 +703,7 @@ auto loopMarkupSrcByLine( _anchor_tag = obj_cite_digits.identifier; // (incrementally build toc) table of contents here! { - auto _get = obj_im.flow_table_of_contents_gather_headings( + ST_flow_table_of_contents_gather_headings _get = obj_im.flow_table_of_contents_gather_headings( an_object, conf_make_meta, tag_in_seg, @@ -724,7 +724,7 @@ auto loopMarkupSrcByLine( if (an_object["lev_markup_number"].to!int <= 4) { segnames["epub"] ~= tag_in_seg["seg_lv1to4"]; } - auto comp_obj_ = node_construct.node_emitter_heading( + ObjGenericComposite comp_obj_ = node_construct.node_emitter_heading( an_object, tag_in_seg, lev_anchor_tag, @@ -745,7 +745,7 @@ auto loopMarkupSrcByLine( the_document_body_section ~= comp_obj_; debug(objectrelated1) { writeln(line); } // check { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -766,7 +766,7 @@ auto loopMarkupSrcByLine( an_object["bookindex_nugget"] = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; bookindex_unordered_hashes = bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, tag_in_seg); an_object["is"] = "para"; - auto comp_obj_ = node_construct.node_location_emitter( + ObjGenericComposite comp_obj_ = node_construct.node_location_emitter( content_non_header, tag_in_seg, lev_anchor_tag, @@ -798,7 +798,7 @@ auto loopMarkupSrcByLine( the_document_body_section ~= comp_obj_; tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -872,7 +872,7 @@ auto loopMarkupSrcByLine( return ret; } { // loopMarkupSrcByLine - auto _doc_by_line = loopMarkupSrcByLine(markup_sourcefile_content, an_object, pith); + _loopMarkupSrcByLineStruct _doc_by_line = loopMarkupSrcByLine(markup_sourcefile_content, an_object, pith); the_document_toc_section = _doc_by_line.toc; the_document_body_section = _doc_by_line.body; the_document_glossary_section = _doc_by_line.glossary; @@ -1534,7 +1534,7 @@ struct DocHas_ { return tag_assoc; } } -auto doc_has() { +DocHas_ doc_has() { return DocHas_(); } // the doc to be returned diff --git a/org/ocda_functions.org b/org/ocda_functions.org index 070b842..baae83e 100644 --- a/org/ocda_functions.org +++ b/org/ocda_functions.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -1571,6 +1571,62 @@ ST_txt_by_line_block_start txt_by_line_block_start()( pith["block_is"] = eN.blk_is.table; pith["block_state"] = eN.blk_state.on; pith["block_delim"] = eN.blk_delim.curly_special; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_code_open)) { + dochas["codeblock"]++; + an_object["lang"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : ""; + debug(codequotemarks) { writefln( "* [code quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + } else if (auto m = line.matchFirst(rgx.block_quotemarks_poem_open)) { + dochas["poem"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + object_number_poem["start"] = obj_cite_digits.object_number.to!string; + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + pith["verse_new"] = eN.bi.on; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_group_open)) { + dochas["group"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(group) { writefln( "* [group quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_block_open)) { + dochas["block"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(block) { writefln( "* [block quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_quote_open)) { + dochas["quote"]++; + an_object["syntax"] = ""; + an_object["attrib"] = m["attrib"].to!string; + an_object["lang"] = m["lang"].to!string; + debug(quote) { writefln( "* [quote quotemarks] %s", line); // quote (quotemarks) open + } + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_table_open)) { // quotemarks table open + debug(table) { writefln( "* [table quotemarks] %s", line); } + dochas["table"] ++; + an_object["table_head"] = m["attrib"].to!string; + an_object["block_type"] = "quotemarks"; + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; } else if (auto m = line.matchFirst(rgx.block_tic_code_open)) { dochas["codeblock"]++; an_object["lang"] = ""; @@ -1654,6 +1710,17 @@ ST_txt_by_line_block_generic txt_by_line_block_group()( debug(group) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(group) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(group) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(group) { writeln(line); } @@ -1692,6 +1759,17 @@ ST_txt_by_line_block_generic txt_by_line_block_block()( debug(block) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(block) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(block) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(block) { writeln(line); } @@ -1816,6 +1894,94 @@ ST_txt_by_line_block_poem txt_by_line_block_poem(CMM)( ++cntr; } } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (auto m = line.matchFirst(rgx.block_quotemarks_close)) { + an_object[an_object_key] = "verse"; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + if (processing.length > 0) { + an_object[an_object_key] = processing["verse"]; + } + if (an_object.length > 0) { + debug(poem) { writeln(__LINE__); writeln(obj_cite_digits.object_number, line); } + processing.remove("verse"); + an_object["is"] = "verse"; + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_number_poem["end"] = obj_cite_digits.object_number.to!string; + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + processing["verse"] ~= line ~= "\n"; + if (pith["verse_new"] == eN.bi.on) { + obj_cite_digits = ocn_emit(pith["ocn"]); + pith["verse_new"] = eN.bi.off; + } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { + processing["verse"] = processing["verse"].stripRight; + pith["verse_new"] = eN.bi.on; + verse_line = eN.bi.off; + } + if (pith["verse_new"] == eN.bi.on) { + verse_line = 1; + an_object[an_object_key] = processing["verse"]; + debug(poem) { writefln( + "* %s tic\n%s", + obj_cite_digits.object_number, + an_object[an_object_key] + ); + } + processing.remove("verse"); + an_object["is"] = "verse"; + auto comp_obj_location + = node_construct.node_location_emitter( + content_non_header, + tag_in_seg, + lev_anchor_tag, + tag_assoc, + obj_cite_digits, + cntr, + heading_ptr-1, + an_object["is"] + ); + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (auto m = line.matchFirst(rgx.block_tic_close)) { an_object[an_object_key] = "verse"; @@ -1934,6 +2100,19 @@ ST_txt_by_line_block_generic txt_by_line_block_code()( debug(codecurly) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key] + .replaceFirst(rgx.newline_eol_delimiter_only, "") + .stripRight; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(codetic) { writeln(line); } @@ -2002,6 +2181,16 @@ ST_txt_by_line_block_generic txt_by_line_block_code()( debug(table) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(table) { writeln(line); } + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(table) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(table) { writeln(line); } @@ -2045,6 +2234,17 @@ ST_txt_by_line_block_generic txt_by_line_block_quote()( debug(quote) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(quote) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(quote) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(quote) { writeln(line); } @@ -3899,7 +4099,7 @@ ST_the_section build_the_glossary_section( } } else { // para { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; @@ -4206,7 +4406,7 @@ ST_the_section build_the_blurb_section(Opt) ( tag_assoc[comp_obj_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_.tags.segment_anchor_tag_epub; } else if (!(line.empty)) { { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; diff --git a/org/ocda_obj_setter.org b/org/ocda_obj_setter.org index 576c693..f37df13 100644 --- a/org/ocda_obj_setter.org +++ b/org/ocda_obj_setter.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -437,6 +437,7 @@ static auto eN() { tic, curly_special, tic_special, + quotemarks, } } return _e(); diff --git a/org/out_curate_metadata.org b/org/out_curate_metadata.org index 40a47e7..f01229a 100644 --- a/org/out_curate_metadata.org +++ b/org/out_curate_metadata.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/out_latex.org b/org/out_latex.org index 9685554..9767286 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:latex:pdf: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -2050,7 +2050,7 @@ if (paper_set.is_portrait) { ***** (a4, a5, b4, letter, legal) * (portrait & landscape) -#+BEGIN_SRC sh +#+BEGIN_SRC shell $SpineBIN/spine --verbose --latex --set-papersize="a4,letter.portrait,b4.portrait" --output="$SpineOUT" $SpinePOD/* #+END_SRC diff --git a/org/out_metadata.org b/org/out_metadata.org index 52a2481..92f3eda 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:metadata: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/out_odt.org b/org/out_odt.org index 4344473..75ea565 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:xml:odt: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 991c4ad..2d10d87 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:db:sql:sqlite: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -81,11 +81,8 @@ long _metadata_tid_lastrowid; #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteHubBuildTablesAndPopulate() { - void SQLiteHubBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); + void SQLiteHubBuildTablesAndPopulate(D)(D doc) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -93,20 +90,19 @@ template SQLiteHubBuildTablesAndPopulate() { } catch (FileException ex) { } } template SQLiteDbStatementComposite() { - void SQLiteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDbStatementComposite(Db,D)( + Db db, + D doc ) { <<sqlite_db_statement_composite_collection>> - if (doc_matters.opt.action.vox_gt0) { + if (doc.matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file); } } } try { auto db = Database(pth_sqlite.sqlite_file); - SQLiteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDbStatementComposite!()(db, doc); } catch (FileException e) { writeln("Failed (FileException): ", e.msg, " ", pth_sqlite.sqlite_file); @@ -141,24 +137,20 @@ template SQLiteHubBuildTablesAndPopulate() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteHubDiscreteBuildTablesAndPopulate() { - void SQLiteHubDiscreteBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); - auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); // doc_matters.db_path + void SQLiteHubDiscreteBuildTablesAndPopulate(D)(D doc) { + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); + auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc.matters.output_path, doc.matters.src.language); // doc.matters.db_path if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { pth_sqlite.base.mkdirRecurse; } catch (FileException ex) { } } - auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename)); + auto db = Database(pth_sqlite.sqlite_file(doc.matters.src.filename)); template SQLiteDiscreteDbStatementComposite() { - void SQLiteDiscreteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDiscreteDbStatementComposite(Db,D)( + Db db, + D doc ) { try { <<sqlite_db_statement_composite_discrete>> @@ -185,12 +177,12 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { import core.runtime; core.runtime.Runtime.terminate(); } - if (doc_matters.opt.action.vox_gt0) { - writeln(" ", pth_sqlite.sqlite_file(doc_matters.src.filename)); + if (doc.matters.opt.action.vox_gt0) { + writeln(" ", pth_sqlite.sqlite_file(doc.matters.src.filename)); } } } - SQLiteDiscreteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDiscreteDbStatementComposite!()(db, doc); } } #+END_SRC @@ -245,9 +237,7 @@ template SQLinsertDelimiter() { } } template SQLiteFormatAndLoadObject() { - auto SQLiteFormatAndLoadObject(M)( - M doc_matters, - ) { + auto SQLiteFormatAndLoadObject(M)(M doc_matters) { mixin spineRgxOut; mixin spineRgxXHTML; struct sqlite_format_and_load_objects { @@ -313,9 +303,7 @@ template SQLiteTablesReCreate() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteDeleteDocument() { - string SQLiteDeleteDocument(M)( - M doc_matters, - ) { + string SQLiteDeleteDocument(M)(M doc_matters) { <<sqlite_formatted_delete_format>> <<sqlite_formatted_delete_sql>> <<sqlite_formatted_delete_values>> @@ -330,9 +318,7 @@ template SQLiteDeleteDocument() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertMetadata() { - string SQLiteInsertMetadata(M)( - M doc_matters, - ) { + string SQLiteInsertMetadata(M)(M doc_matters) { <<sqlite_formatted_insertions_doc_matters_metadata_format>> <<sqlite_formatted_insertions_doc_matters_metadata_sql>> <<sqlite_formatted_insertions_doc_matters_metadata_sql_values>> @@ -348,9 +334,7 @@ template SQLiteInsertMetadata() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertMetadataTopics() { - string SQLiteInsertMetadataTopics(M)( - M doc_matters, - ) { + string SQLiteInsertMetadataTopics(M)(M doc_matters) { <<sqlite_formatted_insertions_topic_register_loop>> <<sqlite_formatted_insertions_topic_register_format>> <<sqlite_formatted_insertions_topic_register_sql>> @@ -368,12 +352,9 @@ template SQLiteInsertMetadataTopics() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertDocObjectsLoop() { - string SQLiteInsertDocObjectsLoop(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); + string SQLiteInsertDocObjectsLoop(D)(D doc) { + string _uid = SQLinsertDelimiter!()(doc.matters.src.doc_uid); + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); string insertDocObjectsRow(O)(O obj) { <<sqlite_formatted_insertions_doc_objects_format>> <<sqlite_formatted_insertions_doc_objects_sql>> @@ -525,8 +506,8 @@ template SQLiteDbDrop() { #+NAME: sqlite_db_statement_composite_collection #+BEGIN_SRC d string _db_statement; -if ((doc_matters.opt.action.sqlite_db_create)) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); +if ((doc.matters.opt.action.sqlite_db_create)) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -534,27 +515,27 @@ if ((doc_matters.opt.action.sqlite_db_create)) { } catch (FileException ex) { } } _db_statement ~= SQLiteTablesReCreate!()(); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "TABLE RE-CREATE"); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "TABLE RE-CREATE"); _db_statement = []; } -if (doc_matters.opt.action.sqlite_delete) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); +if (doc.matters.opt.action.sqlite_delete) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; } -if (doc_matters.opt.action.sqlite_update) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); +if (doc.matters.opt.action.sqlite_update) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaData"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaData"); _db_statement = []; - /+ get tid (lastrowid or max) for use in doc_objects table +/ - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT DocObjects"); + /+ get tid (lastrowid or max) for use in doc.objects table +/ + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT DocObjects"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaDataTopics"); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaDataTopics"); _db_statement = []; } db.close; @@ -567,10 +548,10 @@ db.close; { string _db_statement; _db_statement ~= SQLiteTablesReCreate!()(); - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "table CREATE Tables, INSERT DocObjects"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "table CREATE Tables, INSERT DocObjects"); } db.close; #+END_SRC @@ -584,6 +565,7 @@ import sisudoc.io_out.rgx, sisudoc.io_out.rgx_xhtml; import + // std.digest.sha, std.file, std.uri; import std.conv : to; @@ -1534,23 +1516,23 @@ string[string] table(M,O)( #+NAME: sqlite_objects_loop #+BEGIN_SRC d -auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc_matters); +auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc.matters); string[string] obj_txt; string doc_text; string[] _insert_doc_objects; -foreach (part; doc_matters.has.keys_seq.sql) { - foreach (obj; doc_abstraction[part]) { +foreach (part; doc.matters.has.keys_seq.sql) { + foreach (obj; doc.abstraction[part]) { switch (obj.metainfo.is_of_part) { case "frontmatter": assert(part == "head", part); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1559,7 +1541,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1576,14 +1558,14 @@ foreach (part; doc_matters.has.keys_seq.sql) { writeln(__LINE__, ": ", obj.text); } } - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "para": - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1593,28 +1575,28 @@ foreach (part; doc_matters.has.keys_seq.sql) { case "block": switch (obj.metainfo.is_a) { case "quote": - obj_txt = format_and_sqlite_load.quote(doc_matters, obj); + obj_txt = format_and_sqlite_load.quote(doc.matters, obj); break; case "group": - obj_txt = format_and_sqlite_load.group(doc_matters, obj); + obj_txt = format_and_sqlite_load.group(doc.matters, obj); break; case "block": - obj_txt = format_and_sqlite_load.block(doc_matters, obj); + obj_txt = format_and_sqlite_load.block(doc.matters, obj); break; case "poem": // double check on keeping both poem & verse break; case "verse": - obj_txt = format_and_sqlite_load.verse(doc_matters, obj); + obj_txt = format_and_sqlite_load.verse(doc.matters, obj); break; case "code": - obj_txt = format_and_sqlite_load.code(doc_matters, obj); + obj_txt = format_and_sqlite_load.code(doc.matters, obj); break; case "table": - obj_txt = format_and_sqlite_load.table(doc_matters, obj); + obj_txt = format_and_sqlite_load.table(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1623,7 +1605,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1636,23 +1618,23 @@ foreach (part; doc_matters.has.keys_seq.sql) { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "glossary": assert(part == "glossary", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bibliography": assert(part == "bibliography", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bookindex": assert(part == "bookindex", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "blurb": assert(part == "blurb", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1661,7 +1643,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1672,7 +1654,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from @@ -1681,9 +1663,9 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; } if (obj.metainfo.is_a == "heading") { - if (doc_matters.opt.action.show_sqlite) { + if (doc.matters.opt.action.show_sqlite) { if (obj.metainfo.heading_lev_markup == 0) { - writeln(doc_matters.src.filename); + writeln(doc.matters.src.filename); } writeln( "markup: ", obj.metainfo.heading_lev_markup, diff --git a/org/out_src_pod.org b/org/out_src_pod.org index c16280e..e72d332 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:source:pod: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -533,7 +533,7 @@ void zipArchiveDigest(M,F,D)(M doc_matters, F fn_pod, D _digests) { *** pod/{pods/} #+NAME: pod_gitignore -#+BEGIN_SRC sh +#+BEGIN_SRC shell # git ls-files --others --exclude-from=.git/info/exclude ,* !.gitignore @@ -611,7 +611,7 @@ tmp/** *** document pod structure #+NAME: pod_gitignore -#+BEGIN_SRC sh +#+BEGIN_SRC shell # git ls-files --others --exclude-from=.git/info/exclude ,* !.gitignore @@ -641,7 +641,7 @@ tmp/** *** pod po4a structure #+NAME: pod_gitignore -#+BEGIN_SRC sh +#+BEGIN_SRC shell # git ls-files --others --exclude-from=.git/info/exclude ,* !.gitignore diff --git a/org/out_xmls.org b/org/out_xmls.org index c3b9aab..8d0b475 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:xml: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -20,7 +20,7 @@ #+NAME: year #+BEGIN_SRC text -2024 +2025 #+END_SRC * xml offspring (xhtml html epub) @@ -1766,10 +1766,7 @@ module sisudoc.io_out.html; template outputHTML() { <<output_imports_xml>> mixin outputXHTMLs; - void scroll(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void scroll(D)(D doc) { <<output_html_scroll_0>> <<output_html_scroll_loop_parts>> <<output_html_scroll_is_frontmatter>> @@ -1778,10 +1775,7 @@ template outputHTML() { <<output_html_scroll_close_is_case>> } <<output_html_scroll_scroll_write_output>> - void seg(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void seg(D)(D doc) { <<output_html_seg_0>> <<output_html_seg_loop_parts>> <<output_html_seg_is_heading>> @@ -1808,7 +1802,7 @@ auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); string[] doc_html; -string[] doc; +string[] doc_out; string suffix = ".html"; string previous_section = ""; string delimit = ""; @@ -1818,8 +1812,8 @@ string delimit = ""; #+NAME: output_html_scroll_loop_parts #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.scroll) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.scroll) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); switch (obj.metainfo.is_of_part) { @@ -1834,14 +1828,14 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "toc": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1850,7 +1844,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1868,14 +1862,14 @@ case "body": assert(section == "body" || "head"); case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "para": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1885,28 +1879,28 @@ case "body": assert(section == "body" || "head"); case "block": switch (obj.metainfo.is_a) { case "quote": - doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc.matters); break; case "group": - doc_html ~= xhtml_format.group_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.group_scroll(_txt, obj, doc.matters); break; case "block": - doc_html ~= xhtml_format.block_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.block_scroll(_txt, obj, doc.matters); break; case "poem": break; case "verse": - doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc.matters, suffix); break; case "code": - doc_html ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html ~= xhtml_format.table(_txt, obj, doc.matters); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1915,7 +1909,7 @@ case "body": assert(section == "body" || "head"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1934,29 +1928,29 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "endnote": assert(section == "endnotes"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "glossary": assert(section == "glossary"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bibliography": assert(section == "bibliography"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bookindex": assert(section == "bookindex"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "blurb": assert(section == "blurb"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "tail": assert(section == "tail"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1965,7 +1959,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1976,7 +1970,7 @@ case "comment": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -1992,23 +1986,23 @@ default: } } } -doc = xhtml_format.html_head(doc_matters, "scroll") +doc_out = xhtml_format.html_head(doc.matters, "scroll") ~ doc_html ~ xhtml_format.dom_close -~ xhtml_format.tail(doc_matters); -scroll_write_output(doc, doc_matters); +~ xhtml_format.tail(doc.matters); +scroll_write_output(doc_out, doc.matters); #+END_SRC *** write output file #+NAME: output_html_scroll_scroll_write_output #+BEGIN_SRC d -@trusted void scroll_write_output(D,M)( - D doc, +@trusted void scroll_write_output(O,M)( + O doc_out, M doc_matters, ) { debug(asserts) { - static assert(is(typeof(doc) == string[])); + static assert(is(typeof(doc_out) == string[])); } auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { @@ -2017,7 +2011,7 @@ scroll_write_output(doc, doc_matters); } { auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); - foreach (o; doc) { + foreach (o; doc_out) { f.writeln(o); } } @@ -2054,7 +2048,6 @@ static auto rgx_xhtml = RgxXHTML(); auto xhtml_format = outputXHTMLs(); string[][string] doc_html; string[][string] doc_html_endnotes; -string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string previous_seg_filename = ""; @@ -2067,8 +2060,8 @@ string delimit = ""; #+NAME: output_html_seg_loop_parts #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); #+END_SRC @@ -2102,33 +2095,33 @@ if (obj.metainfo.is_a == "heading") { top_level_headings[3] = ""; goto default; default: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); top_level_headings[obj.metainfo.heading_lev_markup] = t[0]; break; } break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg"); - auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.html_head(doc.matters, "seg"); + auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc.matters); doc_html[segment_filename] ~= navigation_bar.toc_pre_next; previous_seg_filename = segment_filename; foreach (top_level_heading; top_level_headings) { doc_html[segment_filename] ~= top_level_heading; } - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; - doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc.matters); doc_html_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -2136,7 +2129,7 @@ if (obj.metainfo.is_a == "heading") { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -2163,12 +2156,12 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2177,7 +2170,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2195,13 +2188,13 @@ case "body": assert(section == "body"); case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2211,24 +2204,24 @@ case "body": assert(section == "body"); case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "code": - doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); doc_html_endnotes[segment_filename] ~= ""; break; default: @@ -2240,7 +2233,7 @@ case "body": assert(section == "body"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; } else { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2249,7 +2242,7 @@ case "body": assert(section == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2268,37 +2261,37 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2307,7 +2300,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2318,7 +2311,7 @@ case "comment": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -2333,7 +2326,7 @@ default: } } } -seg_write_output(doc_html, doc_html_endnotes, doc_matters); +seg_write_output(doc_html, doc_html_endnotes, doc.matters); #+END_SRC *** write output files @@ -2418,9 +2411,7 @@ void css(M)(M doc_matters) { #+NAME: copy_html_images #+BEGIN_SRC d -@trusted void images_cp(M)( // @system - M doc_matters, -) { +@trusted void images_cp(M)(M doc_matters) { // @system { /+ (copy html images) +/ auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); if (!exists(pth_html.image)) { @@ -2562,10 +2553,10 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> #+NAME: output_epub3_constructs_oebps_content #+HEADER: :noweb yes #+BEGIN_SRC d -string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { +string epub3_oebps_content(D,P)(D doc, P parts) { auto xhtml_format = outputXHTMLs(); - auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language); - string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! + auto pth_epub3 = spinePathsEPUB!()(doc.matters.output_path, doc.matters.src.language); + string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc.matters! string content = format(q"┃<?xml version="1.0" encoding="utf-8"?> <<epub3_package_version>> <metadata @@ -2589,25 +2580,25 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { <item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" /> ┃", _uuid, - xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_main), - (doc_matters.conf_make_meta.meta.title_sub.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_sub), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - doc_matters.src.language, // language, fix (needed in dochead metadata) - (doc_matters.conf_make_meta.meta.date_published.empty) - ? "" : xhtml_format.special_characters_date(doc_matters.conf_make_meta.meta.date_published), - (doc_matters.conf_make_meta.meta.rights_copyright.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright), + xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_main), + (doc.matters.conf_make_meta.meta.title_sub.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_sub), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + doc.matters.src.language, // language, fix (needed in dochead metadata) + (doc.matters.conf_make_meta.meta.date_published.empty) + ? "" : xhtml_format.special_characters_date(doc.matters.conf_make_meta.meta.date_published), + (doc.matters.conf_make_meta.meta.rights_copyright.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.rights_copyright), _uuid, _uuid, (pth_epub3.fn_oebps_css).chompPrefix("OEBPS/"), ); content ~= parts["manifest_documents"]; // TODO sort jpg & png - foreach (image; doc_matters.srcs.image_list) { + foreach (image; doc.matters.srcs.image_list) { content ~= format(q"┃ <item id="%s" href="%s/%s" media-type="image/%s" /> ┃", image.baseName.stripExtension, @@ -2625,8 +2616,8 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { content ~= " " ~ "</guide>" ~ "\n "; content ~= "" ~ "</package>"; debug(epubmanifest) { - foreach (section; doc_matters.has.keys_seq.seg) { // TODO - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { // TODO + foreach (obj; doc.abstraction[section]) { if (obj.metainfo.is_a == "heading") { if (obj.metainfo.heading_lev_markup == 4) { writefln( @@ -2658,7 +2649,7 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { #+NAME: output_epub3_constructs_oebps_toc_nav_xhtml #+BEGIN_SRC d -string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { +string epub3_oebps_toc_nav_xhtml(D)(D doc) { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); static auto rgx = RgxO(); @@ -2677,12 +2668,12 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { </header> <nav epub:type="toc" id="toc"> ┃", - (doc_matters.conf_make_meta.meta.title_full).special_characters_text, + (doc.matters.conf_make_meta.meta.title_full).special_characters_text, ); string _toc_nav_tail = ""; - // writeln(doc_matters.has.keys_seq.seg); // DEBUG line - foreach (sect; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[sect]) { + // writeln(doc.matters.has.keys_seq.seg); // DEBUG line + foreach (sect; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[sect]) { if ((sect == "head") && (obj.metainfo.is_a == "heading")) { toc = toc_head; } @@ -2738,7 +2729,7 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { } break; } - if (doc_matters.has.keys_seq.seg[doc_matters.has.keys_seq.seg.length - 2] == sect) { + if (doc.matters.has.keys_seq.seg[doc.matters.has.keys_seq.seg.length - 2] == sect) { // writeln(n, ": ", sect, ": ", _txt, " - ", obj.metainfo.dom_structure_collapsed_tags_status); // DEBUG // read last heading (heading prior to closing) and determine what those instructions imply still need to be done // CLOSE // DomTags { 0 none, 1 open, 2 close, 3 close_and_open, 4 open_still, } @@ -2778,16 +2769,12 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { #+NAME: output_epub3_xhtml_seg_output #+BEGIN_SRC d -@system void outputEPub3(D,I)( - const D doc_abstraction, - I doc_matters, -) { +@system void outputEPub3(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); - string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string[string] oepbs_content_parts; @@ -2810,8 +2797,8 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { #+NAME: output_epub3_xhtml_seg_output_loop #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); #+END_SRC @@ -2845,8 +2832,8 @@ if (obj.metainfo.is_a == "heading") { goto default; default: epubWrite.doc_parts ~= obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= t[0]; epubWrite.doc_epub3_endnotes[obj.tags.segment_anchor_tag_epub] ~= t[1]; break; @@ -2854,19 +2841,19 @@ if (obj.metainfo.is_a == "heading") { break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -2874,7 +2861,7 @@ if (obj.metainfo.is_a == "heading") { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -2901,13 +2888,13 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2916,7 +2903,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2934,13 +2921,13 @@ case "body": assert(section == "body"); case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2950,37 +2937,37 @@ case "body": assert(section == "body"); case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "code": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); epubWrite.doc_epub3_endnotes[segment_filename] ~= ""; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2989,7 +2976,7 @@ case "body": assert(section == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -3008,37 +2995,37 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -3047,7 +3034,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -3064,7 +3051,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -3133,9 +3120,9 @@ if (obj.metainfo.is_a == "heading") { /+ epub specific documents +/ epubWrite.mimetypes = epub3_mimetypes; epubWrite.meta_inf_container_xml = epub3_container_xml; - epubWrite.oebps_toc_nav_xhtml = doc_abstraction.epub3_oebps_toc_nav_xhtml(doc_matters); - epubWrite.oebps_content_opf = doc_abstraction.epub3_oebps_content(doc_matters, oepbs_content_parts); - epubWrite.epub3_write_output_files(doc_matters); + epubWrite.oebps_toc_nav_xhtml = doc.epub3_oebps_toc_nav_xhtml; + epubWrite.oebps_content_opf = doc.epub3_oebps_content(oepbs_content_parts); + epubWrite.epub3_write_output_files(doc.matters); } #+END_SRC diff --git a/org/out_xmls_css.org b/org/out_xmls_css.org index 4e099de..1ba12d0 100644 --- a/org/out_xmls_css.org +++ b/org/out_xmls_css.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:xmls:css: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/out_zip.org b/org/out_zip.org index 7b4b365..5bd503b 100644 --- a/org/out_zip.org +++ b/org/out_zip.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:zip: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/output_hub.org b/org/output_hub.org index 541cc44..c87c757 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -32,15 +32,12 @@ module sisudoc.io_out.hub; @safe: template outputHub() { <<output_imports>> - @system void outputHub(D,I)( - const D doc_abstraction, - I doc_matters - ) { + @system void outputHub(D)(D doc) { mixin Msg; - auto msg = Msg!()(doc_matters); + auto msg = Msg!()(doc.matters); enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff } - void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) { - auto msg = Msg!()(doc_matters); + void Scheduled(D)(int sched, D doc) { + auto msg = Msg!()(doc.matters); <<output_scheduled_task_source_or_pod>> <<output_scheduled_task_epub>> <<output_scheduled_task_html_meta>> @@ -51,15 +48,15 @@ template outputHub() { <<output_scheduled_task_odt>> <<output_scheduled_task_sqlite>> } - if (doc_matters.opt.action.vox_gt0) { writeln(doc_matters.src.filename_base); } - if (!(doc_matters.opt.action.parallelise_subprocesses)) { - foreach(schedule; doc_matters.opt.action.output_task_scheduler) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + if (doc.matters.opt.action.vox_gt0) { writeln(doc.matters.src.filename_base); } + if (!(doc.matters.opt.action.parallelise_subprocesses)) { + foreach(schedule; doc.matters.opt.action.output_task_scheduler) { + Scheduled!()(schedule, doc); } } else { import std.parallelism; - foreach(schedule; parallel(doc_matters.opt.action.output_task_scheduler)) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + foreach(schedule; parallel(doc.matters.opt.action.output_task_scheduler)) { + Scheduled!()(schedule, doc); } } <<output_shared_sqlite_db>> @@ -134,11 +131,11 @@ import sisudoc.io_out, #+BEGIN_SRC d if (sched == outTask.source_or_pod) { msg.v("spine (doc reform) source processing... "); - if (doc_matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } + if (doc.matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } import sisudoc.io_out.source_pod; - spinePod!()(doc_matters); - if (doc_matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } - if (doc_matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } + spinePod!()(doc.matters); + if (doc.matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } + if (doc.matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } } #+END_SRC @@ -149,7 +146,7 @@ if (sched == outTask.source_or_pod) { if (sched == outTask.epub) { msg.v("epub3 processing... "); import sisudoc.io_out.epub3; - doc_abstraction.outputEPub3!()(doc_matters); + doc.outputEPub3!(); msg.vv("epub3 done"); } #+END_SRC @@ -160,7 +157,7 @@ if (sched == outTask.epub) { #+NAME: output_scheduled_task_html_meta #+BEGIN_SRC d if (sched == outTask.html_stuff) { - outputMetadata!()(doc_matters); + outputMetadata!()(doc.matters); msg.vv("html metadata done"); } #+END_SRC @@ -172,7 +169,7 @@ if (sched == outTask.html_stuff) { if (sched == outTask.html_scroll) { msg.v("html scroll processing... "); import sisudoc.io_out.html; - outputHTML!().scroll(doc_abstraction, doc_matters); + outputHTML!().scroll(doc); msg.vv("html scroll done"); } #+END_SRC @@ -184,7 +181,7 @@ if (sched == outTask.html_scroll) { if (sched == outTask.html_seg) { msg.v("html seg processing... "); import sisudoc.io_out.html; - outputHTML!().seg(doc_abstraction, doc_matters); + outputHTML!().seg(doc); msg.vv("html seg done"); } #+END_SRC @@ -195,8 +192,8 @@ if (sched == outTask.html_seg) { #+BEGIN_SRC d if (sched == outTask.html_stuff) { import sisudoc.io_out.html; - outputHTML!().css(doc_matters); - outputHTML!().images_cp(doc_matters); + outputHTML!().css(doc.matters); + outputHTML!().images_cp(doc.matters); msg.vv("html css & images done"); } #+END_SRC @@ -218,17 +215,17 @@ if (sched == outTask.latex) { msg.v("latex processing... (available for downstream processing & pdf output"); import sisudoc.io_out.latex; import std.file; - if ((isValidPath(doc_matters.output_path ~ "/latex/sty")) - && (!(exists(doc_matters.output_path ~ "/latex/sty"))) + if ((isValidPath(doc.matters.output_path ~ "/latex/sty")) + && (!(exists(doc.matters.output_path ~ "/latex/sty"))) ) { outputLaTeXstyInit!()( - doc_matters.output_path, - doc_matters.opt.action.generated_by, - doc_matters.generator_program.name_version_and_compiler, - doc_matters.generator_program.time_output_generated, + doc.matters.output_path, + doc.matters.opt.action.generated_by, + doc.matters.generator_program.name_version_and_compiler, + doc.matters.generator_program.time_output_generated, ); } - outputLaTeX!()(doc_abstraction, doc_matters); + outputLaTeX!()(doc.abstraction, doc.matters); msg.vv("latex done"); } #+END_SRC @@ -240,7 +237,7 @@ if (sched == outTask.latex) { if (sched == outTask.odt) { msg.v("odf:odt processing... "); import sisudoc.io_out.odt; - outputODT!()(doc_abstraction, doc_matters); + outputODT!()(doc.abstraction, doc.matters); msg.vv("odf:odt done"); } #+END_SRC @@ -252,7 +249,7 @@ if (sched == outTask.odt) { if (sched == outTask.sqlite) { msg.v("sqlite processing... "); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubDiscreteBuildTablesAndPopulate!(); msg.vv("sqlite done"); } #+END_SRC @@ -263,15 +260,15 @@ if (sched == outTask.sqlite) { #+NAME: output_shared_sqlite_db #+BEGIN_SRC d -if (doc_matters.opt.action.sqlite_update) { +if (doc.matters.opt.action.sqlite_update) { msg.v("sqlite update processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite update done"); -} else if (doc_matters.opt.action.sqlite_delete) { +} else if (doc.matters.opt.action.sqlite_delete) { msg.v("sqlite delete processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite delete done"); } #+END_SRC diff --git a/org/output_show.org b/org/output_show.org index 53e2d77..6f54451 100644 --- a/org/output_show.org +++ b/org/output_show.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -28,10 +28,8 @@ module sisudoc.meta.metadoc_show_summary; @safe: template spineMetaDocSummary() { - void spineMetaDocSummary(S,T)( - const S doc_abstraction, - T doc_matters, - ) { + void spineMetaDocSummary(D)(D doc) { + auto doc_matters = doc.matters; <<metadoc_show_summary_imports>> <<metadoc_show_imports_shared>> mixin InternalMarkup; @@ -55,7 +53,7 @@ string[string] check = [ "last_object_number_book_index" : "0", ]; foreach (k; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[k]) { + foreach (obj; doc.abstraction[k]) { if (obj.metainfo.is_of_part != "empty") { if (!empty(obj.metainfo.object_number)) { if (k == "body") { @@ -92,9 +90,9 @@ writefln( doc_matters.src.language, markup.repeat_character_by_number_provided("-", char_repeat_number), "- toc arr length:", - to!int(doc_abstraction["toc"].length), - "- doc_abstraction arr length:", - to!int(doc_abstraction["body"].length), + to!int(doc.abstraction["toc"].length), + "- doc.abstraction arr length:", + to!int(doc.abstraction["body"].length), " doc body last obj on.#:", to!int(check["last_object_number_body"]), " - number of tables:", @@ -110,26 +108,26 @@ writefln( " - number of images:", doc_matters.has.images, "- endnotes length:", // subtract headings - (doc_abstraction["endnotes"].length > 2) - ? (to!int(doc_abstraction["endnotes"].length - 2)) + (doc.abstraction["endnotes"].length > 2) + ? (to!int(doc.abstraction["endnotes"].length - 2)) : 0, "- glossary length:", - (doc_abstraction["glossary"].length > 1) - ? (to!int(doc_abstraction["glossary"].length)) + (doc.abstraction["glossary"].length > 1) + ? (to!int(doc.abstraction["glossary"].length)) : 0, "- biblio length:", - (doc_abstraction["bibliography"].length > 1) - ? (to!int(doc_abstraction["bibliography"].length)) + (doc.abstraction["bibliography"].length > 1) + ? (to!int(doc.abstraction["bibliography"].length)) : 0, "- bookindex length:", - (doc_abstraction["bookindex"].length > 1) - ? (to!int(doc_abstraction["bookindex"].length)) + (doc.abstraction["bookindex"].length > 1) + ? (to!int(doc.abstraction["bookindex"].length)) : 0, " book idx last obj on.#:", to!int(check["last_object_number_book_index"]), "- blurb length:", - (doc_abstraction["blurb"].length > 1) - ? (to!int(doc_abstraction["blurb"].length)) + (doc.abstraction["blurb"].length > 1) + ? (to!int(doc.abstraction["blurb"].length)) : 0, "* last obj on.#:", to!int(check["last_object_number"]), @@ -252,9 +250,7 @@ writefln( #+HEADER: :noweb yes #+BEGIN_SRC d template spineShowConfig() { - void spineShowConfig(T)( - T doc_matters, - ) { + void spineShowConfig(T)(T doc_matters) { <<metadoc_show_summary_imports>> <<metadoc_show_imports_shared>> mixin InternalMarkup; @@ -348,9 +344,7 @@ writefln( module sisudoc.meta.metadoc_show_make; @safe: template spineShowMake() { - void spineShowMake(T)( - T doc_matters, - ) { + void spineShowMake(T)(T doc_matters) { <<metadoc_show_summary_imports>> <<metadoc_show_imports_shared>> mixin InternalMarkup; @@ -422,9 +416,7 @@ writefln( module sisudoc.meta.metadoc_show_metadata; @safe: template spineShowMetaData() { - void spineShowMetaData(T)( - T doc_matters, - ) { + void spineShowMetaData(T)(T doc_matters) { <<metadoc_show_summary_imports>> <<metadoc_show_imports_shared>> mixin InternalMarkup; diff --git a/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org b/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org index 28ead23..b536386 100644 --- a/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org +++ b/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -29,7 +29,7 @@ - Author: Ralph Amissah [ralph.amissah@gmail.com] - - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved. + - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved. - License: AGPL 3 or later: @@ -98,7 +98,7 @@ #+NAME: spine_project_version_part_minor #+BEGIN_SRC org -17 +18 #+END_SRC *** patch diff --git a/org/spine.org b/org/spine.org index d185adb..51c649c 100644 --- a/org/spine.org +++ b/org/spine.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -1282,7 +1282,7 @@ enforce( *** 1. _document abstraction_ [#A] - return tuple of: - - doc_abstraction (the document) + - doc.abstraction (the document) - doc_matters #+NAME: spine_each_file_do_abstraction @@ -1292,11 +1292,8 @@ if ((_opt_action.debug_do) ) { writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } -auto t = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); -static assert(t.length==2); -auto doc_abstraction = t[dAM.abstraction]; -auto doc_matters = t[dAM.matters]; -if ((doc_matters.opt.action.debug_do) +auto doc = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); +if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_stages) ) { writeln("- stepX complete for [", manifest.src.filename, "]"); @@ -1323,9 +1320,9 @@ if ((doc_matters.opt.action.debug_do) #+NAME: spine_each_file_do_debugs_checkdoc_0 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.show_summary) { +if (doc.matters.opt.action.show_summary) { import sisudoc.meta.metadoc_show_summary; - spineMetaDocSummary!()(doc_abstraction, doc_matters); + spineMetaDocSummary!()(doc); } #+END_SRC @@ -1335,9 +1332,9 @@ if (doc_matters.opt.action.show_summary) { #+NAME: spine_each_file_do_debugs_checkdoc_1 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.show_metadata) { +if (doc.matters.opt.action.show_metadata) { import sisudoc.meta.metadoc_show_metadata; - spineShowMetaData!()(doc_matters); + spineShowMetaData!()(doc.matters); } #+END_SRC @@ -1347,9 +1344,9 @@ if (doc_matters.opt.action.show_metadata) { #+NAME: spine_each_file_do_debugs_checkdoc_2 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.show_make) { +if (doc.matters.opt.action.show_make) { import sisudoc.meta.metadoc_show_make; - spineShowMake!()(doc_matters); + spineShowMake!()(doc.matters); } #+END_SRC @@ -1359,9 +1356,9 @@ if (doc_matters.opt.action.show_make) { #+NAME: spine_each_file_do_debugs_checkdoc_3 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.show_config) { +if (doc.matters.opt.action.show_config) { import sisudoc.meta.metadoc_show_config; - spineShowConfig!()(doc_matters); + spineShowConfig!()(doc.matters); } #+END_SRC @@ -1370,17 +1367,17 @@ if (doc_matters.opt.action.show_config) { #+NAME: spine_each_file_do_debugs_checkdoc_4 #+BEGIN_SRC d -if (doc_matters.opt.action.curate) { - auto _hvst = spineMetaDocCurate!()(doc_matters, hvst); +if (doc.matters.opt.action.curate) { + auto _hvst = spineMetaDocCurate!()(doc.matters, hvst); if ( _hvst.title.length > 0 && _hvst.author_surname_fn.length > 0 ) { hvst.curates ~= _hvst; } else { - if ((doc_matters.opt.action.debug_do) + if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_curate) - || (doc_matters.opt.action.vox_gt2) + || (doc.matters.opt.action.vox_gt2) ) { writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc); } @@ -1394,8 +1391,8 @@ if (doc_matters.opt.action.curate) { #+NAME: spine_each_file_do_debugs_checkdoc_5 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.debug_do) { - spineDebugs!()(doc_abstraction, doc_matters); +if (doc.matters.opt.action.debug_do) { + spineDebugs!()(doc.abstraction, doc.matters); } #+END_SRC @@ -1413,16 +1410,12 @@ if (!(_opt_action.skip_output)) { #+NAME: spine_each_file_do_selected_output #+BEGIN_SRC d /+ ↓ output hub +/ -if (!(doc_matters.opt.action.skip_output)) { - if ((_opt_action.debug_do) - || (_opt_action.debug_do_stages) - ) { +if (!(doc.matters.opt.action.skip_output)) { + if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } - doc_abstraction.outputHub!()(doc_matters); - if ((_opt_action.debug_do) - || (_opt_action.debug_do_stages) - ) { + doc.outputHub!(); + if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("- step5 complete for [", manifest.src.filename, "]"); } } @@ -1467,13 +1460,13 @@ template spineAbstraction() { <<spine_metadoc_mixin>> enum makeMeta { make, meta } enum docAbst { doc_abstract_obj, doc_has } - @system auto spineAbstraction(E,P,O,Cfg,M,S)( - E _env, - P program_info, - O _opt_action, - Cfg _cfg, - M _manifest, - S _make_and_meta_struct + @system auto spineAbstraction(E,P,O,Cfg,M)( + E _env, + P program_info, + O _opt_action, + Cfg _cfg, + M _manifest, + ConfComposite _make_and_meta_struct ){ <<spine_conf_files_in_yaml>> <<spine_each_file_do_read_and_split_dr_markup_file_content_into_header_and_body>> @@ -1489,8 +1482,19 @@ template spineAbstraction() { } auto doc_matters = ST_DocumentMatters(); <<spine_each_file_do_document_matters_msg_step4_end>> - auto t = tuple(doc_abstraction, doc_matters); - return t; + auto theDOC() { + struct ST_DOC { + const auto abstraction() { + return doc_abstraction; + } + auto matters() { + return doc_matters; + } + } + return ST_DOC(); + } + auto the_doc = theDOC(); + return the_doc; } } #+END_SRC @@ -1589,12 +1593,12 @@ if ((_opt_action.debug_do) - prepare the document abstraction used in downstream processing - _return tuple of_: - - document abstraction (_the_document_ or doc_abstraction) + - document abstraction (_the_document_ or doc.abstraction) - document abstraction keys - (head, toc, body, endnotes, glossary, bibliography, bookindex, blurb, tail) - - (transfer to _doc_matters_) - - segnames for html epub (transfer to _doc_matters_) - - image list (transfer to _doc_matters_) + - (transfer to _doc.matters_) + - segnames for html epub (transfer to _doc.matters_) + - image list (transfer to _doc.matters_) #+NAME: spine_each_file_do_document_abstraction #+BEGIN_SRC d @@ -1632,7 +1636,7 @@ if ((_opt_action.debug_do) if ((_opt_action.debug_do) || (_opt_action.debug_do_stages) ) { - writeln("step4 commence → (doc_matters) [", _manifest.src.filename, "]"); + writeln("step4 commence → (doc.matters) [", _manifest.src.filename, "]"); } #+END_SRC @@ -1691,7 +1695,7 @@ auto generated_time() { #+NAME: spine_each_file_do_document_matters_2_meta #+BEGIN_SRC d -auto conf_make_meta() { +ConfComposite conf_make_meta() { return _make_and_meta_struct; } auto doc_digest() { diff --git a/org/spine_info.org b/org/spine_info.org index f5013a7..a2078fe 100644 --- a/org/spine_info.org +++ b/org/spine_info.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:info: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -122,7 +122,7 @@ ,#+FILETAGS: :spine:build:tools: ,#+AUTHOR: Ralph Amissah ,#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -,#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +,#+COPYRIGHT: Copyright (C) 2015 - 2025 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 @@ -240,7 +240,7 @@ author: name: "Ralph Amissah" email: ralph.amissah@gmail.com -copyright: "(C) 2015 - 2024 Ralph Amissah, All Rights Reserved." +copyright: "(C) 2015 - 2025 Ralph Amissah, All Rights Reserved." license: - "project code: AGPL 3 or later" @@ -975,7 +975,7 @@ webserv: - Author: Ralph Amissah [ralph.amissah@gmail.com] -- Copyright: (C) 2015 - 2024 Ralph Amissah +- Copyright: (C) 2015 - 2025 Ralph Amissah #+END_SRC *** license @@ -1155,14 +1155,14 @@ webserv: * CHANGELOG :changelog: -#+BEGIN_SRC sh +#+BEGIN_SRC shell 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 +#+BEGIN_SRC shell git log --pretty=format:"-_-_%+s %+as %ae%+h%d%+b" --no-merges \ > ${CHL} && sed -i '/^$/d; s/^\([ ]\)*\*/\1-/; s/ \+$//; s/^-_-_//' ${CHL} #+END_SRC diff --git a/org/spine_markup_sample.org b/org/spine_markup_sample.org index 288d2ec..d0381ac 100644 --- a/org/spine_markup_sample.org +++ b/org/spine_markup_sample.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:build:tools: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -333,7 +333,7 @@ date: modified: "2020-04-11" rights: - copyright: "Copyright (C) Ralph Amissah 2007, 2024" + copyright: "Copyright (C) Ralph Amissah 2007, 2025" license: "AGPL 3 (part of SiSU Spine documentation)" classify: diff --git a/org/util_spine_markup_conversion_from_sisu.org b/org/util_spine_markup_conversion_from_sisu.org index 99852b0..56f79dd 100644 --- a/org/util_spine_markup_conversion_from_sisu.org +++ b/org/util_spine_markup_conversion_from_sisu.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:info: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/util_spine_syntax_highlighting_emacs.org b/org/util_spine_syntax_highlighting_emacs.org index 00f82a6..7272faf 100644 --- a/org/util_spine_syntax_highlighting_emacs.org +++ b/org/util_spine_syntax_highlighting_emacs.org @@ -1,10 +1,10 @@ -*- mode: org -*- -#+TITLE: sisudoc spine (doc_reform) information files +#+TITLE: sisudoc spine (doc_reform) emacs syntax highlighting #+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 +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -21,7 +21,7 @@ ** README -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/README" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/README" #+BEGIN_SRC elisp ; put this into your .emacs file, then use the mode file: @@ -31,7 +31,7 @@ ** autoload sisuspine-mode-autoloads.el -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el" #+BEGIN_SRC elisp (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) (autoload 'sisu-spine-mode "sisu-spine-mode" "\ @@ -47,17 +47,18 @@ and search. ** mode sisu-spine-mode.el -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/sisu-spine-mode.el" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/sisu-spine-mode.el" #+BEGIN_SRC elisp ;;; sisu-spine-mode.el --- Major mode for SiSU (spine parser) markup text -;; Copyright (C) 2011, 2024 Free Software Foundation, Inc. +;; Copyright (C) 2011, 2025 Free Software Foundation, Inc. ;; Author: Ralph Amissah & Ambrose Kofi Laing ;; Maintainer: Ralph Amissah <ralph.amissah@gmail.com> ;; Keywords: text, syntax, processes, tools ;; Version: 8.0.0 -;; URL: https://www.sisudoc.org/ +;; URL: https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el +;; https://sisudoc.org/ ;; originally looked at (based on) doc-mode, with kind permission of the author ;; Author: SUN, Tong <suntong001@users.sf.net>, (c)2001-6, all right reserved ;; Version: $Date: 2006/01/19 03:13:41 $ $Revision: 1.14 $ @@ -199,6 +200,14 @@ and search. (cons "^```[ ]+poem$\\|^```$" 'sisu-general-font-lock-red2) (cons "^```[ ]+alt$\\|^```$" 'sisu-general-font-lock-red2) ;;grouped text --------- + ;(cons "^'''[ ]code\\(.\\|\n\\)+?\n'''\n" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+code.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+table.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+group$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+block$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+poem$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+alt$\\|^'''$" 'sisu-general-font-lock-red2) + ;;grouped text --------- (cons "^group{\\|^}group" 'sisu-general-font-lock-red2) (cons "^block{\\|^}block" 'sisu-general-font-lock-red2) (cons "^code{\\|^}code" 'sisu-general-font-lock-red2) diff --git a/org/util_spine_syntax_highlighting_vim.org b/org/util_spine_syntax_highlighting_vim.org index bd9aa6d..b66b67d 100644 --- a/org/util_spine_syntax_highlighting_vim.org +++ b/org/util_spine_syntax_highlighting_vim.org @@ -1,10 +1,10 @@ -*- mode: org -*- -#+TITLE: sisudoc spine (doc_reform) information files +#+TITLE: sisudoc spine (doc_reform) vim syntax highlighting & colorschemes #+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 +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -20,21 +20,21 @@ * Vim Syntax highlighting ** filetype -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/filetype.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/filetype.vim" #+BEGIN_SRC text " SiSU filetype file if exists("did_load_filetypes") finish endif augroup filetypedetect - au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu - au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu + au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu-spine + au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu-spine augroup END #+END_SRC ** debian vim addon manager -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/vim-sisu.yaml" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/vim-sisu.yaml" #+BEGIN_SRC text #vim-addons: debian vim-addon-manager addon: sisu @@ -45,326 +45,827 @@ files: - syntax/sisu.vim #+END_SRC +** markup syntax +*** sisu.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/syntax/sisu.vim" +#+BEGIN_SRC text +" SiSU Vim syntax file +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" Last Change: 2017-06-22 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save +#+END_SRC + +*** sisu-spine.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim" +#+BEGIN_SRC text +" SiSU Vim syntax file (sisu-spine) +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" sisu-spine Markup: sisu-spine +" Last Change: 2017-06-22, 2025-02-21 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim> +" <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+table" end="^'''\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\(block\|group\|poem\|alt\)" end="^'''\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\box\(\.[a-z]\+\)\?" end="^'''\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^'''\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^'''\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^'''\s\+quote" end="^'''\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save +#+END_SRC + ** color files *** def.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/def.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/def.vim" #+BEGIN_SRC text -" Vim color file -" Name: def -" Maintainer: Ralph Amissah <ralph@amissah.com> -" Last Change: 2013-02-14 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/def.vim;hb=HEAD> -" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +"%% Vim color file +" Name: def +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def.vim> +" <https://sisudoc.org/> +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults " (with occasional other colors selected from 256 color palate) " .Xdefaults tweaking to make identical to def (256) provided, " along with an alternative possibility using colors beyond " 256 color palate -:hi clear -if exists("syntax_on") - syntax reset -endif -:set t_Co=256 -:set background=dark -:let colors_name = "def" -" ------- -" terminal def -" ------- -:hi Normal ctermbg=0 ctermfg=7 -":hi Cursor ctermbg=5 ctermfg=0 -:hi lCursor cterm=reverse -:hi StatusLine cterm=bold,reverse -:hi StatusLineNC cterm=reverse -:hi Search cterm=none ctermbg=57 ctermfg=0 -:hi IncSearch cterm=none ctermbg=154 ctermfg=0 -:hi SpecialKey ctermfg=4 -:hi Visual cterm=reverse -:hi VisualNOS cterm=bold,underline -:hi MoreMsg ctermfg=2 -:hi ModeMsg cterm=bold -:hi Question ctermfg=2 -:hi Title cterm=bold ctermfg=3 -:hi NonText cterm=bold ctermfg=4 -:hi LineNr cterm=bold ctermbg=0 ctermfg=0* -:hi CursorLineNr cterm=bold ctermbg=166 ctermfg=0 -:hi Directory ctermfg=4 -:hi WildMenu ctermbg=3 ctermfg=0 -:hi VertSplit cterm=reverse -:hi Folded cterm=none ctermbg=0 ctermfg=8 -:hi FoldColumn ctermbg=7 ctermfg=4 -:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 -:hi DiffChange cterm=none ctermbg=7 ctermfg=0 -:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 -:hi DiffText cterm=none ctermbg=6 ctermfg=0 -:hi String cterm=none ctermfg=3 -:hi Comment cterm=none ctermbg=0 ctermfg=4 -:hi Constant ctermfg=1 -:hi Special ctermfg=6 -:hi Identifier ctermfg=6 -:hi Statement ctermfg=2 -:hi Operator ctermfg=2 -:hi PreProc ctermfg=1 -:hi Type cterm=bold ctermfg=3 -:hi Delimiter cterm=none ctermfg=2 -:hi Ignore cterm=bold ctermfg=7 -:hi Todo ctermbg=3 ctermfg=0 -:hi Underlined cterm=underline -:hi Include ctermfg=1 -:hi Define ctermfg=3 -:hi Function ctermfg=6 -:hi Structure ctermfg=2 -:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 -:hi CursorLine cterm=bold -:hi CursorColumn ctermbg=17 -:hi ColorColumn ctermbg=17 -:hi SpellBad cterm=underline ctermbg=0 ctermfg=5 -:hi SpellCap cterm=underline ctermbg=0 ctermfg=5 -:hi SpellLocal cterm=underline ctermbg=0 ctermfg=5 -:hi SpellRare cterm=underline ctermbg=0 ctermfg=5 -:hi TrailingWhitespace ctermbg=1 -:hi ExtraWhitespace ctermbg=1 -:hi WarningMsg ctermfg=1 -:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 -:hi Error cterm=bold ctermbg=1 ctermfg=7 -" ------- -" gui def -" ------- -:hi Normal guibg=#000000 guifg=#D3D3D3 -:hi Cursor guibg=#CC9966 guifg=#000000 -:hi lCursor gui=reverse -:hi StatusLine gui=bold,reverse -:hi StatusLineNC gui=reverse -:hi Search gui=none guibg=#5F00FF guifg=#000000 -:hi IncSearch gui=none guibg=#AFFF00 guifg=#000000 -:hi SpecialKey guifg=#5971AD -:hi Visual gui=reverse -:hi VisualNOS gui=bold,underline -:hi MoreMsg guifg=#4E9A06 -:hi ModeMsg gui=bold -:hi Question guifg=#4E9A06 -:hi Title gui=bold guifg=#C4A000 -:hi NonText gui=bold guifg=#5971AD -:hi LineNr gui=bold guibg=#000000 guifg=#808080 -:hi CursorLineNr gui=bold guibg=#D75F00 guifg=#000000 -:hi Directory guifg=#5971AD -:hi WildMenu guibg=#C4A000 guifg=#000000 -:hi VertSplit gui=reverse -:hi Folded gui=none guibg=#000000 guifg=#808080 -:hi FoldColumn guibg=#D3D3D3 guifg=#5971AD -:hi DiffAdd gui=none guibg=#4E9A06 guifg=#000000 -:hi DiffChange gui=none guibg=#D3D3D3 guifg=#000000 -:hi DiffDelete gui=none guibg=#D3D3D3 guifg=#000000 -:hi DiffText gui=none guibg=#06989A guifg=#000000 -:hi String gui=none guifg=#C4A000 -:hi Comment gui=none guibg=#000000 guifg=#5971AD -:hi Constant guifg=#CC0000 -:hi Special guifg=#06989A -:hi Identifier guifg=#06989A -:hi Statement guifg=#4E9A06 -:hi Operator guifg=#4E9A06 -:hi PreProc guifg=#CC0000 -:hi Type gui=bold guifg=#C4A000 -:hi Delimiter gui=none guifg=#4E9A06 -:hi Ignore gui=bold guifg=#D3D3D3 -:hi Todo guibg=#C4A000 guifg=#000000 -:hi Underlined gui=underline -:hi Include guifg=#CC0000 -:hi Define guifg=#C4A000 -:hi Function guifg=#06989A -:hi Structure guifg=#4E9A06 -:hi MatchParen gui=bold guibg=#5971AD guifg=#D3D3D3 -:hi CursorLine gui=bold -:hi CursorColumn guibg=#00005F -:hi ColorColumn guibg=#00005F -:hi SpellBad gui=underline guibg=#000000 guifg=#75507B -:hi SpellCap gui=underline guibg=#000000 guifg=#75507B -:hi SpellLocal gui=underline guibg=#000000 guifg=#75507B -:hi SpellRare gui=underline guibg=#000000 guifg=#75507B -:hi TrailingWhitespace guibg=#080000 -:hi ExtraWhitespace guibg=#CC0000 -:hi WarningMsg guifg=#CC0000 -:hi ErrorMsg gui=bold guibg=#CC0000 guifg=#D3D3D3 -:hi Error gui=bold guibg=#CC0000 guifg=#D3D3D3 -" ------- -"256 color .Xdefaults vim: cterm giu -"<https://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim> -"<https://guns.github.com/xterm-color-table.vim/images/xterm-color-table-with-visible-rgb.png> -" ------- -" 256 color .Xdefaults vim: cterm giu def -" ------- -" 16 color standard altered 256 altered beyond 256 -" black/dark grey -" 0 [ 0:#000000] #000000 -" 8 [ 8:#808080] [59:#5F5F5F] #555555 -" red -" 1 [ 1:#800000] 160:#DF0000 #CC0000 -" 9 [ 9:#FF0000] #EF2929 -" green -" 2 [ 2:#008000] 112:#87DF00 #4E9A06 -" 10 [10:#00FF00] 154:#AFFF00 #8AE234 -" yellow/orange -" 3 [ 3:#808000] 178:#DFAF00 #C4A000 -" 11 [11:#FFFF00] 184:#DFDF00 #FC9E4F -" blue -" 4 [ 4:#000080] 24:#005F87 #5971AD -" 12 [12:#0000FF] 73:#5FAFAF #729FCF -" magenta -" 5 [ 5:#800080] 90:#870087 #75507B -" 13 [13:#FF00FF] 126:#AF0087 #AD7FA8 -" cyan -" 6 [ 6:#008080] 37:#00AFAF #06989A -" 14 [14:#00FFFF] 87:#5FFFFF #34E2E2 -" white -" 7 [ 7:#C0C0C0] #D3D3D3 -" 15 [15:#FFFFFF] #EEEEEE -" -------- -" .Xdefaults (rxvt urxvt setting beyond 256 colors, vim colorscheme "def" gui settings) -" (vim colorscheme "def" cterm matches "def" gui if .Xdefaults set thus) -" -------- -" ! black -" Rxvt.color0 : #000000 -" Rxvt.color8 : #555555 -" ! red -" Rxvt.color1 : #CC0000 -" Rxvt.color9 : #EF2929 -" ! green -" Rxvt.color2 : #4E9A06 -" Rxvt.color10 : #8AE234 -" ! yellow -" Rxvt.color3 : #C4A000 -" Rxvt.color11 : #FCE94F -" ! blue -" Rxvt.color4 : #5971AD -" Rxvt.color12 : #729FCF -" ! magenta -" Rxvt.color5 : #75507B -" Rxvt.color13 : #AD7FA8 -" ! cyan -" Rxvt.color6 : #06989A -" Rxvt.color14 : #34E2E2 -" ! white -" Rxvt.color7 : #D3D7CF -" Rxvt.color15 : #EEEEEE -" -------- -" .Xdefaults 256 (rxvt urxvt setting, vim colorscheme "def256" cterm & gui settings) -" (vim colorscheme "def" cterm matches "def256" if .Xdefaults set thus) -" -------- -" ! black -" Rxvt.color0 : #000000 -" Rxvt.color8 : #808080 -" ! red -" Rxvt.color1 : #DF0000 -" Rxvt.color9 : #FF0000 -" ! green -" Rxvt.color2 : #87DF00 -" Rxvt.color10 : #AFFF00 -" ! yellow -" Rxvt.color3 : #DFAF00 -" Rxvt.color11 : #FFFF00 -" ! blue -" Rxvt.color4 : #5F87DF -" Rxvt.color12 : #87DFFF -" ! magenta -" Rxvt.color5 : #8700DF -" Rxvt.color13 : #87DFFF -" ! cyan -" Rxvt.color6 : #00DFDF -" Rxvt.color14 : #5F5FDF -" ! white -" Rxvt.color7 : #C0C0C0 -" Rxvt.color15 : #FFFFFF +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "def" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=236 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=bold ctermfg=59 ctermbg=16 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=231 ctermbg=236 "bg:233,59,242,67 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=67 ctermbg=16 "fg:248,59,242,3,2,67 +" hi Folded cterm=none ctermfg=59 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=4 +: hi Constant ctermfg=1 +: hi Special ctermfg=6 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=2 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=4 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=1 "fg:2,5,140 +: hi Type ctermfg=3 "fg:67,2 +: hi Include ctermfg=1 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline "ctermul=166 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +" ------- +" gui def +" ------- +: hi Normal guifg=#D3D3D3 guibg=#000000 +: hi Cursor guifg=#000000 guibg=#CC9966 +: hi lCursor gui=reverse +: hi CursorLine gui=bold +: hi CursorLineNr gui=bold guifg=#000000 guibg=#D75F00 +: hi CursorColumn guibg=#00005F +: hi LineNr gui=bold guifg=#808080 guibg=#000000 +: hi StatusLine gui=bold,reverse +: hi StatusLineNC gui=reverse +: hi Search gui=none guifg=#000000 guibg=#5F00FF +: hi IncSearch gui=none guifg=#000000 guibg=#AFFF00 +: hi SpecialKey guifg=#5971AD +: hi Visual gui=reverse +: hi VisualNOS gui=bold,underline +: hi MoreMsg guifg=#4E9A06 +: hi ModeMsg gui=bold +: hi Question guifg=#4E9A06 +: hi Title gui=bold guifg=#C4A000 +: hi NonText gui=bold guifg=#5971AD +: hi Directory guifg=#5971AD +: hi WildMenu guifg=#000000 guibg=#C4A000 +: hi VertSplit gui=reverse +: hi Folded gui=none guifg=#808080 guibg=#000000 +: hi FoldColumn guifg=#5971AD guibg=#D3D3D3 +: hi DiffAdd gui=none guifg=#000000 guibg=#4E9A06 +: hi DiffChange gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffDelete gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffText gui=none guifg=#000000 guibg=#06989A +: hi String gui=none guifg=#C4A000 +: hi Comment gui=none guifg=#5971AD guibg=#000000 +: hi Constant guifg=#CC0000 +: hi Special guifg=#06989A +: hi Identifier guifg=#06989A +: hi Statement guifg=#4E9A06 +: hi Operator guifg=#4E9A06 +: hi PreProc guifg=#CC0000 +: hi Type gui=bold guifg=#C4A000 +: hi Delimiter gui=none guifg=#4E9A06 +: hi Ignore gui=bold guifg=#D3D3D3 +: hi Todo guifg=#000000 guibg=#C4A000 +: hi Underlined gui=underline +: hi Include guifg=#CC0000 +: hi Define guifg=#C4A000 +: hi Function guifg=#06989A +: hi Structure guifg=#4E9A06 +: hi MatchParen gui=bold guifg=#D3D3D3 guibg=#5971AD +: hi ColorColumn guibg=#00005F +: hi SpellBad gui=underline guifg=#75507B guibg=#000000 +: hi SpellCap gui=underline guifg=#75507B guibg=#000000 +: hi SpellLocal gui=underline guifg=#75507B guibg=#000000 +: hi SpellRare gui=underline guifg=#75507B guibg=#000000 +: hi TrailingWhitespace guibg=#080000 +: hi ExtraWhitespace guibg=#CC0000 +: hi WarningMsg guifg=#CC0000 +: hi ErrorMsg gui=bold guifg=#D3D3D3 guibg=#CC0000 +: hi Error gui=bold guifg=#D3D3D3 guibg=#CC0000 #+END_SRC *** slate.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/slate.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/slate.vim" #+BEGIN_SRC text "%% SiSU Vim color file -" Name: Slate -" Maintainer: Ralph Amissah <ralph@amissah.com> -" Last Change: 2013-02-09 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/slate.vim;hb=HEAD> -" Notes: cterm now uses frugal-sisu 8 colors for term -" (for gui originally looked at desert Hans Fugal <hans@fugal.net> -" <https://hans.fugal.net/vim/colors/desert.vim> (April/May 2003)) -:set background=dark -:hi clear -if exists("syntax_on") - syntax reset -endif -:let colors_name = "slate" -" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white -:hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white -:hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey -:hi lCursor term=reverse cterm=reverse -:hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black -:hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 -:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat -:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green -:hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen -:hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki -:hi VisualNOS term=bold,underline cterm=bold,underline -:hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen -:hi ModeMsg term=bold cterm=bold guifg=goldenrod -:hi Question term=standout ctermfg=2 guifg=springgreen -:hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold -:hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue -:hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 -:hi Directory term=bold ctermfg=4 -:hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black -:hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 -:hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 -:hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 -:hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white -:hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white -:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white -:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black -:hi String cterm=none ctermfg=3 guifg=SkyBlue -:hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 -:hi Constant term=underline ctermfg=1 guifg=#ffa0a0 -:hi Special term=bold ctermfg=6 guifg=darkkhaki -:hi Identifier term=underline ctermfg=6 guifg=salmon -:hi Statement term=bold ctermfg=6 guifg=CornflowerBlue -:hi Operator term=bold ctermfg=1 guifg=red -:hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red -:hi Type term=underline ctermfg=2 guifg=CornflowerBlue -:hi Delimiter term=none cterm=none ctermfg=1 -:hi Ignore cterm=bold ctermfg=7 guifg=grey40 -:hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered -:hi Underlined term=underline cterm=underline -:hi Include ctermfg=1 guifg=red -:hi Define ctermfg=3 gui=bold guifg=gold -:hi Function ctermfg=6 guifg=navajowhite -:hi Structure ctermfg=2 guifg=green -:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 -:hi CursorLine cterm=bold,underline guibg=black -:hi CursorColumn cterm=bold guibg=black -:hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white -:hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 -:hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white -:hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 -:hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon -:hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white -:hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white -:hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black -:hi Red ctermbg=black ctermfg=red guibg=black guifg=red -:hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta -:hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue -:hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan -:hi Green ctermbg=black ctermfg=green guibg=black guifg=green -:hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow -:hi White ctermbg=black ctermfg=white guibg=black guifg=white +" Name: Slate +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-09, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/slate.vim> +" <https://sisudoc.org/> +" <https://sisudoc.org/> +" Notes: cterm now uses frugal-sisu 8 colors for term +" (for gui originally looked at desert Hans Fugal <hans@fugal.net> +" <http://hans.fugal.net/vim/colors/desert.vim> (April/May 2003)) +: hi clear +: if exists("syntax_on") +: syntax reset +: endif +: let colors_name = "slate" +: set background=dark +" ------- +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +" ------- +: hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white +: hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey +: hi lCursor term=reverse cterm=reverse +: hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black +: hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat +: hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green +: hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen +: hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki +: hi VisualNOS term=bold,underline cterm=bold,underline +: hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen +: hi ModeMsg term=bold cterm=bold guifg=goldenrod +: hi Question term=standout ctermfg=2 guifg=springgreen +: hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold +: hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue +: hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 +: hi Directory term=bold ctermfg=4 +: hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black +: hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 +: hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 +: hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white +: hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white +: hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white +: hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black +: hi String cterm=none ctermfg=3 guifg=SkyBlue +: hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 +: hi Constant term=underline ctermfg=1 guifg=#ffa0a0 +: hi Special term=bold ctermfg=6 guifg=darkkhaki +: hi Identifier term=underline ctermfg=6 guifg=salmon +: hi Statement term=bold ctermfg=6 guifg=CornflowerBlue +: hi Operator term=bold ctermfg=1 guifg=red +: hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red +: hi Type term=underline ctermfg=2 guifg=CornflowerBlue +: hi Delimiter term=none cterm=none ctermfg=1 +: hi Ignore cterm=bold ctermfg=7 guifg=grey40 +: hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered +: hi Underlined term=underline cterm=underline +: hi Include ctermfg=1 guifg=red +: hi Define ctermfg=3 gui=bold guifg=gold +: hi Function ctermfg=6 guifg=navajowhite +: hi Structure ctermfg=2 guifg=green +: hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +: hi CursorLine cterm=bold,underline guibg=black +: hi CursorColumn cterm=bold guibg=black +: hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon +: hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: if &diff +: highlight! link DiffText MatchParen +: endif +: hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black +: hi Red ctermbg=black ctermfg=red guibg=black guifg=red +: hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta +: hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue +: hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan +: hi Green ctermbg=black ctermfg=green guibg=black guifg=green +: hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow +: hi White ctermbg=black ctermfg=white guibg=black guifg=white #+END_SRC *** def-sisu.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/def-sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/def-sisu.vim" #+BEGIN_SRC text " Vim color file " Name: def-sisu " Maintainer: Ralph Amissah <ralph@amissah.com> " Last Change: 2013-02-14 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/def-sisu.vim;hb=HEAD> +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def-sisu.vim> +" <https://sisudoc.org/> " Note: primarily 16 color cterm improved by tweaking of .Xdefaults " (with occasional other colors selected from 256 color palate) " .Xdefaults tweaking to make identical to def (256) provided, @@ -585,15 +1086,184 @@ endif " Rxvt.color15 : #FFFFFF #+END_SRC +*** redo.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/redo.vim" +#+BEGIN_SRC text +"%% Vim color file +" Name: redo +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <> +" Note: this is a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "redo" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=242 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn ctermfg=231 ctermbg=236 "bg:233,59,236 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=248 ctermbg=0 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=172 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=4 "ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +#+END_SRC + +*** shift.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/shift.vim" +#+BEGIN_SRC text +"%% Vim color file +" Name: shift +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-09 +" URL: <> +" Note: this is a shift in redo which as a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "shift" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=7 ctermbg=236 "bg:233,59 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=242 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=4 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=6 ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +#+END_SRC + *** frugal-cterm.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim" #+BEGIN_SRC text " Vim color file " Name: frugal-cterm-sisu " Maintainer: Ralph Amissah <ralph@amissah.com> " Last Change: 2013-02-09 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim;hb=HEAD> +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim> +" <https://sisudoc.org/> " Note: 8 color cterm, related colorschemes 8 & sparse :set background=dark :hi clear @@ -657,9 +1327,240 @@ endif :hi Error cterm=bold ctermbg=1 ctermfg=7 #+END_SRC -** ftplugin sisu.vim +** ftplugin sisu.vim & spine.vim (for the same files) +*** sisu.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/ftplugin/sisu.vim" +#+BEGIN_SRC text +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah <ralph@amissah.com> +" SiSU Markup: SiSU (sisu-3.3) 2012-08-18 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype off +":filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map <silent> <C-m> :if &guioptions =~# 'm' <Bar> + \set guioptions-=m <Bar> + \set guioptions-=T <Bar> + \else <Bar> + \set guioptions+=m <Bar> + \set guioptions-=T <Bar> + \endif<CR> +:set paste +""% statusline +"set statusline= " +"set fillchars=stl:―,stlnc:—,vert:│,fold:۰,diff:· +"" [ buffer number ] +"set statusline +=%#Normal#[ " +"set statusline +=%#Identifier#%n " buffer number +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ file name (& modified?) ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Statement#%<%F%* " full path +""set statusline +=%#Statement#%<%t " full path +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ column : line number / number of lines in file, percentage of file ] [%v:%l/%L\ %p%%] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Identifier#%v " column & line +"set statusline +=%#Normal#: " +"set statusline +=%#Identifier#%l " column & line +"set statusline +=%#SpecialKey#/%L\ " total lines +"set statusline +=%#Identifier#%p " percentage of file +"set statusline +=%#SpecialKey#%% " +"set statusline +=%#Normal#] " " +"" [ file format : file type ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#SpecialKey#%{&fenc} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%{&ff} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%y " file type +"set statusline +=%#Normal#] " +"" [ character under cursor ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#String#0x%04B " character under cursor +"set statusline +=%#Normal#]\ " +"" [ syntastic ] +"set statusline +=%#warningmsg# +"set statusline +=%{SyntasticStatuslineFlag()}\ " +""set statusline+=%* +"" Status line background +"set statusline +=%#Folded#\ " +"" misc +"set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map <leader>paste :set invpaste<cr> +"% wrap/formatting paragraph according to the current 'textwidth' with ^\ (control-\): +:imap <C-\> <C-O>gqap +:nmap <C-\> gqap +:vmap <C-\> gq +"% save file, go to next file in buffer +:map <leader>nf :w <enter> :n <enter> +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map <leader>ls :vs<cr> :Explore<cr> +:map <leader>dir :vs<cr> :Explore<cr> +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap <Down> gj +:nnoremap <Up> gk +:vnoremap <Down> gj +:vnoremap <Up> gk +:inoremap <Down> <C-o>gj +:inoremap <Up> <C-o>gk +"% search and replace +:map <leader>rd :.,$s///c "search and replace down +:map <leader>rg :%s///c "search and replace whole file +:map <leader>rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map <leader>e :e <c-r>=expand("%:p:h") . "/" <cr> +:map <leader>pwd :exe 'cd ' . expand ("%:p:h")<cr> +"% searchhighlight t93: Toggle search highlight <C-n> +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap <silent> <C-n> :silent call ToggleHLSearched()<cr> +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map <leader>fs :set foldmethod=expr foldcolumn=2 foldlevel=0 <cr> +:map <leader>ff :F<cr> +:map <leader>fe :F<cr> zE +"% foldtoggle Fold Toggle mapped to <space> +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap <space> :call ToggleFold()<cr> +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake(<q-args>) +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% linenumbering, on, relative, off +:map <Leader>nn :set <c-r>={'00':'','01':'r','10':'nor'}[&rnu.&nu]<CR>nu<CR> +"% cursorline +:map <leader>cu :if &cursorcolumn <Bar> + \set nocursorline nocursorcolumn <Bar> + \else <Bar> + \set cursorline cursorcolumn <Bar> + \endif<cr> +:map <leader>cu- :set nocursorline nocursorcolumn<cr> +:map <leader>cu+ :set cursorline cursorcolumn<cr> +#+END_SRC + +*** sisu-spine.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/ftplugin/sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim" #+BEGIN_SRC text "%% SiSU Vim ftplugin " SiSU Maintainer: Ralph Amissah <ralph@amissah.com> @@ -890,7 +1791,7 @@ endif ** templates *** sst.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/sst.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/sst.tpl" #+BEGIN_SRC text # SiSU 8.0 @@ -926,7 +1827,7 @@ make: *** ssm.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/ssm.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/ssm.tpl" #+BEGIN_SRC text # SiSU 8.0 master @@ -962,7 +1863,7 @@ make: *** ssm.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/ssi.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/ssi.tpl" #+BEGIN_SRC text # SiSU 8.0 insert |