diff options
93 files changed, 952 insertions, 1576 deletions
@@ -5,7 +5,7 @@ - Author: Ralph Amissah [ralph.amissah@gmail.com] - - Copyright: (C) 2015 - 2024 Ralph Amissah + - Copyright: (C) 2015 - 2025 Ralph Amissah - code under src/* src/sisudoc/* - License: AGPL 3 or later: @@ -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 #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t @@ -28,7 +28,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" @@ -11,7 +11,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" diff --git a/data/pod/sisu-spine-markup/media/text/en/sisu-spine-markup.sst b/data/pod/sisu-spine-markup/media/text/en/sisu-spine-markup.sst index 11553c2..6ae09d1 100644 --- a/data/pod/sisu-spine-markup/media/text/en/sisu-spine-markup.sst +++ b/data/pod/sisu-spine-markup/media/text/en/sisu-spine-markup.sst @@ -234,7 +234,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: @@ -2,7 +2,7 @@ "authors": [ "Ralph Amissah" ], - "copyright": "Copyright © 2015 - 2024 Ralph Amissah", + "copyright": "Copyright © 2015 - 2025 Ralph Amissah", "name": "spine", "version": "0.17.0", "description": "an object-centric sisu-like document parser", diff --git a/nix-overlays/README b/nix-overlays/README index f23f837..c593dc5 100644 --- a/nix-overlays/README +++ b/nix-overlays/README @@ -4,7 +4,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 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..299aa3e 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 @@ -53,7 +53,7 @@ fi - ${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>>" @@ -126,59 +126,59 @@ echo "• *** 3.0.6 #+NAME: direnv-version -#+BEGIN_SRC sh +#+BEGIN_SRC shell 3.0.6 #+END_SRC #+NAME: direnv-sha -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= #+END_SRC *** 3.0.4 -#+BEGIN_SRC sh +#+BEGIN_SRC shell 3.0.4 #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= #+END_SRC *** 3.0.0 -#+BEGIN_SRC sh +#+BEGIN_SRC shell 3.0.0 #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= #+END_SRC *** 2.4.0 -#+BEGIN_SRC sh +#+BEGIN_SRC shell 2.4.0 #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell 2.3.0 #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8= #+END_SRC #+NAME: direnv-sha_ -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-0000000000000000000000000000000000000000000= #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell - https://github.com/nix-community/nix-direnv NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000=" direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc @@ -188,7 +188,7 @@ direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${Nix #+HEADER: :tangle ../.envrc-git-init #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [[ ! -d ./.git ]]; then git init git add . @@ -201,7 +201,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: diff --git a/org/config_git.org b/org/config_git.org index fbafd2a..2f4d024 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 @@ -115,7 +115,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..a255712 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 @@ -662,14 +662,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 +738,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 +751,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 +789,7 @@ echo "#+END_SRC ,* initialised shell variables -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell SpineSRC=$SpineSRC SpineDOC=$SpineDOC SpinePOD=$SpinePOD @@ -802,81 +802,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 +884,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/* @@ -899,26 +899,26 @@ $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local ,*** 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 +927,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 +962,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 +983,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 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..52d52d7 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 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..700b551 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 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/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org index 073e1e2..b351e67 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,7 +267,7 @@ 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>>" @@ -294,51 +294,51 @@ use flake . *** 3.0.6 #+NAME: direnv-version -#+BEGIN_SRC sh +#+BEGIN_SRC shell 3.0.6 #+END_SRC #+NAME: direnv-sha -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= #+END_SRC *** 3.0.4 -#+BEGIN_SRC sh +#+BEGIN_SRC shell 3.0.4 #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= #+END_SRC *** 3.0.0 -#+BEGIN_SRC sh +#+BEGIN_SRC shell 3.0.0 #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= #+END_SRC *** 2.4.0 -#+BEGIN_SRC sh +#+BEGIN_SRC shell 2.4.0 #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= #+END_SRC #+NAME: direnv-sha_ -#+BEGIN_SRC sh +#+BEGIN_SRC shell sha256-0000000000000000000000000000000000000000000= #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell - https://github.com/nix-community/nix-direnv NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000=" direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc diff --git a/org/ocda.org b/org/ocda.org index dca0098..2e4bbb0 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 diff --git a/org/ocda_functions.org b/org/ocda_functions.org index 070b842..120c3e3 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 diff --git a/org/ocda_obj_setter.org b/org/ocda_obj_setter.org index 576c693..5ae401a 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 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..9610cfc 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 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..b3b16d7 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) 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..fb9453a 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 diff --git a/org/output_show.org b/org/output_show.org index 53e2d77..607f668 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 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..4084a66 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: diff --git a/org/spine.org b/org/spine.org index d185adb..f1fc7b2 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 @@ -1467,13 +1467,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>> @@ -1691,7 +1691,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..740064b 100644 --- a/org/util_spine_syntax_highlighting_emacs.org +++ b/org/util_spine_syntax_highlighting_emacs.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 @@ -51,7 +51,7 @@ and search. #+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> diff --git a/org/util_spine_syntax_highlighting_vim.org b/org/util_spine_syntax_highlighting_vim.org index bd9aa6d..f4b6c8a 100644 --- a/org/util_spine_syntax_highlighting_vim.org +++ b/org/util_spine_syntax_highlighting_vim.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/src/COPYRIGHT b/src/COPYRIGHT index 2676bf1..2a71121 100644 --- a/src/COPYRIGHT +++ b/src/COPYRIGHT @@ -5,7 +5,7 @@ - Author: Ralph Amissah [ralph.amissah@gmail.com] - - Copyright: (C) 2015 - 2024 Ralph Amissah + - Copyright: (C) 2015 - 2025 Ralph Amissah - code under src/* src/sisudoc/* - License: AGPL 3 or later: diff --git a/src/sisudoc/COPYRIGHT b/src/sisudoc/COPYRIGHT index 2676bf1..2a71121 100644 --- a/src/sisudoc/COPYRIGHT +++ b/src/sisudoc/COPYRIGHT @@ -5,7 +5,7 @@ - Author: Ralph Amissah [ralph.amissah@gmail.com] - - Copyright: (C) 2015 - 2024 Ralph Amissah + - Copyright: (C) 2015 - 2025 Ralph Amissah - code under src/* src/sisudoc/* - License: AGPL 3 or later: diff --git a/src/sisudoc/conf/compile_time_info.d b/src/sisudoc/conf/compile_time_info.d index e1ce86b..3169237 100644 --- a/src/sisudoc/conf/compile_time_info.d +++ b/src/sisudoc/conf/compile_time_info.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_in/paths_source.d b/src/sisudoc/io_in/paths_source.d index 071abff..d5fafa3 100644 --- a/src/sisudoc/io_in/paths_source.d +++ b/src/sisudoc/io_in/paths_source.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_in/read_config_files.d b/src/sisudoc/io_in/read_config_files.d index c71364c..8da08f5 100644 --- a/src/sisudoc/io_in/read_config_files.d +++ b/src/sisudoc/io_in/read_config_files.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_in/read_source_files.d b/src/sisudoc/io_in/read_source_files.d index b465cc3..3cbaed0 100644 --- a/src/sisudoc/io_in/read_source_files.d +++ b/src/sisudoc/io_in/read_source_files.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/create_zip_file.d b/src/sisudoc/io_out/create_zip_file.d index 36863eb..e468253 100644 --- a/src/sisudoc/io_out/create_zip_file.d +++ b/src/sisudoc/io_out/create_zip_file.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/defaults.d b/src/sisudoc/io_out/defaults.d index be7c122..e373b76 100644 --- a/src/sisudoc/io_out/defaults.d +++ b/src/sisudoc/io_out/defaults.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/epub3.d b/src/sisudoc/io_out/epub3.d index b4ff21b..8fd1cb5 100644 --- a/src/sisudoc/io_out/epub3.d +++ b/src/sisudoc/io_out/epub3.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/html.d b/src/sisudoc/io_out/html.d index d9aaa58..c1f0aa5 100644 --- a/src/sisudoc/io_out/html.d +++ b/src/sisudoc/io_out/html.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/html_snippet.d b/src/sisudoc/io_out/html_snippet.d index 480246a..9cc9259 100644 --- a/src/sisudoc/io_out/html_snippet.d +++ b/src/sisudoc/io_out/html_snippet.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/hub.d b/src/sisudoc/io_out/hub.d index 0b7fe8c..498fa5c 100644 --- a/src/sisudoc/io_out/hub.d +++ b/src/sisudoc/io_out/hub.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/latex.d b/src/sisudoc/io_out/latex.d index e1b5731..d26d502 100644 --- a/src/sisudoc/io_out/latex.d +++ b/src/sisudoc/io_out/latex.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/metadata.d b/src/sisudoc/io_out/metadata.d index 0917969..4d540af 100644 --- a/src/sisudoc/io_out/metadata.d +++ b/src/sisudoc/io_out/metadata.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/odt.d b/src/sisudoc/io_out/odt.d index 0450509..8740d44 100644 --- a/src/sisudoc/io_out/odt.d +++ b/src/sisudoc/io_out/odt.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/package.d b/src/sisudoc/io_out/package.d index 5c73cb9..1ab72b0 100644 --- a/src/sisudoc/io_out/package.d +++ b/src/sisudoc/io_out/package.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/paths_output.d b/src/sisudoc/io_out/paths_output.d index f134f41..72508fc 100644 --- a/src/sisudoc/io_out/paths_output.d +++ b/src/sisudoc/io_out/paths_output.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/rgx.d b/src/sisudoc/io_out/rgx.d index 474a120..9c70c1e 100644 --- a/src/sisudoc/io_out/rgx.d +++ b/src/sisudoc/io_out/rgx.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/rgx_latex.d b/src/sisudoc/io_out/rgx_latex.d index 826455c..05c1adb 100644 --- a/src/sisudoc/io_out/rgx_latex.d +++ b/src/sisudoc/io_out/rgx_latex.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/rgx_xhtml.d b/src/sisudoc/io_out/rgx_xhtml.d index 1c33b0e..58d6138 100644 --- a/src/sisudoc/io_out/rgx_xhtml.d +++ b/src/sisudoc/io_out/rgx_xhtml.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/source_pod.d b/src/sisudoc/io_out/source_pod.d index 2b9953f..a6253ab 100644 --- a/src/sisudoc/io_out/source_pod.d +++ b/src/sisudoc/io_out/source_pod.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/sqlite.d b/src/sisudoc/io_out/sqlite.d index bee9cad..4075bba 100644 --- a/src/sisudoc/io_out/sqlite.d +++ b/src/sisudoc/io_out/sqlite.d @@ -6,7 +6,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: diff --git a/src/sisudoc/io_out/xmls.d b/src/sisudoc/io_out/xmls.d index c268bb7..7fc5e51 100644 --- a/src/sisudoc/io_out/xmls.d +++ b/src/sisudoc/io_out/xmls.d @@ -6,7 +6,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: @@ -490,7 +490,7 @@ string tail(M)(M doc_matters) { <a href="https://sisudoc.org" class="lnkicon">≅ SiSU Spine ፨</a> (object numbering & object search) </p> <p class="small_center" id="sisu_spine"><a name="sisu_spine"></a> - (web 1993, object numbering 1997, object search 2002 ...) 2024 + (web 1993, object numbering 1997, object search 2002 ...) 2025 </p> </div> <a name="bottom" id="bottom"></a> diff --git a/src/sisudoc/io_out/xmls_css.d b/src/sisudoc/io_out/xmls_css.d index e9f38e6..aef861a 100644 --- a/src/sisudoc/io_out/xmls_css.d +++ b/src/sisudoc/io_out/xmls_css.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/conf_make_meta_json.d b/src/sisudoc/meta/conf_make_meta_json.d index 5330799..44f2c5e 100644 --- a/src/sisudoc/meta/conf_make_meta_json.d +++ b/src/sisudoc/meta/conf_make_meta_json.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/conf_make_meta_structs.d b/src/sisudoc/meta/conf_make_meta_structs.d index 3ece2dc..4738a57 100644 --- a/src/sisudoc/meta/conf_make_meta_structs.d +++ b/src/sisudoc/meta/conf_make_meta_structs.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/conf_make_meta_yaml.d b/src/sisudoc/meta/conf_make_meta_yaml.d index 5712bcf..98a92f9 100644 --- a/src/sisudoc/meta/conf_make_meta_yaml.d +++ b/src/sisudoc/meta/conf_make_meta_yaml.d @@ -6,7 +6,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: @@ -71,7 +71,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, @@ -91,8 +91,55 @@ template contentYAMLtoSpineStruct() { .strip; return _txt; } + @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; + } confCompositeMakeBuild _mk; if (_identifier != "header") { // called only once per run anyway + string _init_string; /+ conf ------------------------------------------------------------------- +/ /+ _cfg. build defaults (else program runtime defaults) @@ -101,145 +148,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)) @@ -261,75 +215,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 @@ -337,106 +239,68 @@ template contentYAMLtoSpineStruct() { && (_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; - // } - } - // 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) + { + _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) ) { - 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; - } + _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)? + { + _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 @@ -444,65 +308,36 @@ template contentYAMLtoSpineStruct() { 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; } } } } @@ -568,20 +403,11 @@ template contentYAMLtoSpineStruct() { } 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 ( @@ -590,29 +416,18 @@ template contentYAMLtoSpineStruct() { && _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 @@ -621,33 +436,24 @@ template contentYAMLtoSpineStruct() { 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; } } } } - } else { + } else { // !(_identifier != "header") + string _init_string; + int _init_int; /+ make ------------------------------------------------------------------- +/ if ("make" in _yaml && _yaml["make"].type.sequence @@ -655,41 +461,24 @@ template contentYAMLtoSpineStruct() { 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 @@ -781,16 +570,9 @@ template contentYAMLtoSpineStruct() { 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 @@ -823,29 +605,18 @@ template contentYAMLtoSpineStruct() { 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) @@ -901,43 +672,27 @@ template contentYAMLtoSpineStruct() { ) { _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; + { + _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 ("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; + 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; } } - 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; - } - } 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; @@ -962,23 +717,15 @@ template contentYAMLtoSpineStruct() { 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 @@ -1032,47 +779,27 @@ template contentYAMLtoSpineStruct() { 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; } } } } @@ -1088,23 +815,15 @@ template contentYAMLtoSpineStruct() { 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; } } } } @@ -1114,29 +833,18 @@ template contentYAMLtoSpineStruct() { 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; } } } } @@ -1151,59 +859,34 @@ template contentYAMLtoSpineStruct() { 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; - } - 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", "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; } + } + { + _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; } } } } @@ -1217,12 +900,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) { @@ -1249,7 +932,7 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() { std.exception, std.regex, std.stdio, - std.traits, + // std.traits, std.typecons, std.utf, std.conv : to; @@ -1265,12 +948,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/src/sisudoc/meta/defaults.d b/src/sisudoc/meta/defaults.d index fe0cd1a..97b1d5f 100644 --- a/src/sisudoc/meta/defaults.d +++ b/src/sisudoc/meta/defaults.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/doc_debugs.d b/src/sisudoc/meta/doc_debugs.d index ae50256..35fd3de 100644 --- a/src/sisudoc/meta/doc_debugs.d +++ b/src/sisudoc/meta/doc_debugs.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc.d b/src/sisudoc/meta/metadoc.d index 25f28b6..0d58c2e 100644 --- a/src/sisudoc/meta/metadoc.d +++ b/src/sisudoc/meta/metadoc.d @@ -6,7 +6,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: @@ -68,13 +68,13 @@ template spineAbstraction() { mixin outputHub; 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 ){ { /+ document config/make file +/ auto _config_document_struct = readConfigDoc!()(_manifest, _env); @@ -190,7 +190,7 @@ template spineAbstraction() { ~ ":" ~ _st.second.to!string; return _time; } - auto conf_make_meta() { + ConfComposite conf_make_meta() { return _make_and_meta_struct; } auto doc_digest() { diff --git a/src/sisudoc/meta/metadoc_curate.d b/src/sisudoc/meta/metadoc_curate.d index 3b5654b..bb7452a 100644 --- a/src/sisudoc/meta/metadoc_curate.d +++ b/src/sisudoc/meta/metadoc_curate.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_curate_authors.d b/src/sisudoc/meta/metadoc_curate_authors.d index cb2b1db..c86d3e1 100644 --- a/src/sisudoc/meta/metadoc_curate_authors.d +++ b/src/sisudoc/meta/metadoc_curate_authors.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_curate_topics.d b/src/sisudoc/meta/metadoc_curate_topics.d index a30be73..fca3ff2 100644 --- a/src/sisudoc/meta/metadoc_curate_topics.d +++ b/src/sisudoc/meta/metadoc_curate_topics.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_from_src.d b/src/sisudoc/meta/metadoc_from_src.d index 70fec62..012dd36 100644 --- a/src/sisudoc/meta/metadoc_from_src.d +++ b/src/sisudoc/meta/metadoc_from_src.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_from_src_functions.d b/src/sisudoc/meta/metadoc_from_src_functions.d index 953e75a..8ccf21b 100644 --- a/src/sisudoc/meta/metadoc_from_src_functions.d +++ b/src/sisudoc/meta/metadoc_from_src_functions.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_object_setter.d b/src/sisudoc/meta/metadoc_object_setter.d index 8b2daf0..89ef856 100644 --- a/src/sisudoc/meta/metadoc_object_setter.d +++ b/src/sisudoc/meta/metadoc_object_setter.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_show_config.d b/src/sisudoc/meta/metadoc_show_config.d index 76a0394..a56e632 100644 --- a/src/sisudoc/meta/metadoc_show_config.d +++ b/src/sisudoc/meta/metadoc_show_config.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_show_make.d b/src/sisudoc/meta/metadoc_show_make.d index ddbb687..d3271bf 100644 --- a/src/sisudoc/meta/metadoc_show_make.d +++ b/src/sisudoc/meta/metadoc_show_make.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_show_metadata.d b/src/sisudoc/meta/metadoc_show_metadata.d index 31ff1ea..1857df8 100644 --- a/src/sisudoc/meta/metadoc_show_metadata.d +++ b/src/sisudoc/meta/metadoc_show_metadata.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/metadoc_show_summary.d b/src/sisudoc/meta/metadoc_show_summary.d index 92d476c..0404af4 100644 --- a/src/sisudoc/meta/metadoc_show_summary.d +++ b/src/sisudoc/meta/metadoc_show_summary.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/package.d b/src/sisudoc/meta/package.d index 1926eb6..d24afbb 100644 --- a/src/sisudoc/meta/package.d +++ b/src/sisudoc/meta/package.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/rgx.d b/src/sisudoc/meta/rgx.d index 0b5f9f0..eb6fc04 100644 --- a/src/sisudoc/meta/rgx.d +++ b/src/sisudoc/meta/rgx.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/rgx_files.d b/src/sisudoc/meta/rgx_files.d index 05db651..299c2a4 100644 --- a/src/sisudoc/meta/rgx_files.d +++ b/src/sisudoc/meta/rgx_files.d @@ -6,7 +6,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: diff --git a/src/sisudoc/meta/rgx_yaml_tags.d b/src/sisudoc/meta/rgx_yaml_tags.d index 6266bac..ee57469 100644 --- a/src/sisudoc/meta/rgx_yaml_tags.d +++ b/src/sisudoc/meta/rgx_yaml_tags.d @@ -6,7 +6,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: diff --git a/src/sisudoc/share/defaults.d b/src/sisudoc/share/defaults.d index f6303c8..502aca0 100644 --- a/src/sisudoc/share/defaults.d +++ b/src/sisudoc/share/defaults.d @@ -6,7 +6,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: diff --git a/src/sisudoc/spine.d b/src/sisudoc/spine.d index 39563fb..fc2b2dd 100755 --- a/src/sisudoc/spine.d +++ b/src/sisudoc/spine.d @@ -7,7 +7,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: |