diff options
120 files changed, 7294 insertions, 3315 deletions
diff --git a/.env/echo-nixNote b/.env/echo-nixNote index 99d69dd..36dfa3a 100644 --- a/.env/echo-nixNote +++ b/.env/echo-nixNote @@ -10,7 +10,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 @@ -48,7 +48,7 @@ echo "#+END_SRC * initialised shell variables -#+BEGIN_SRC sh +#+BEGIN_SRC shell SpineSRC=$SpineSRC SpineDOC=$SpineDOC SpinePOD=$SpinePOD @@ -61,81 +61,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 @@ -143,7 +143,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/* @@ -152,32 +152,31 @@ $SpineBIN/spine -v --show-config --config=$SpinePOD/.dr $SpineBIN/spine --html $SpinePOD/* - $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site #+END_SRC *** generate html linked to search form -#+BEGIN_SRC sh +#+BEGIN_SRC shell $SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --output=$SpineOUT $SpinePOD/* #+END_SRC *** create or re-create sql db (--sqlite-db-create or --sqlite-db-recreate) -#+BEGIN_SRC sh +#+BEGIN_SRC shell $SpineBIN/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath" $SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath" #+END_SRC *** populate sqlite db -#+BEGIN_SRC sh +#+BEGIN_SRC shell $SpineBIN/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=$SpineOUT $SpinePOD/* #+END_SRC *** generate html (linked to search form), sql output, curate COMPOSITE -#+BEGIN_SRC sh +#+BEGIN_SRC shell $SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --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 @@ -186,7 +185,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 @@ -221,13 +220,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 @@ -21,13 +21,14 @@ echo ' ❯❯ nix flake update && nix flake check && nix flake show • for a dev shell (development environment): - - ❯❯ nix develop - ❯❯ nix develop ".#" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh + • nix develop + ❯❯ nix develop ".#" --print-build-logs -c zsh + • nix develop using nixpkgs + ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh + • nix develop using package overlays: (dmd-2.109.1, ldc-1.40.0, dub-1.38.1) + ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh ❯❯ nix flake show • to build project: @@ -36,10 +37,12 @@ echo ' ❯❯ nix build ".#" --print-build-logs • to build project: - ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs - ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs - ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs - ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs + • nix build using nixpkgs + ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs + ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs + • nix build using package overlays: (dmd-2.109.1, ldc-1.40.0, dub-1.38.1) + ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs + ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs • to build using dub on nix (get dependencies by setting your development environment): @@ -63,6 +63,20 @@ !sisudoc !views !docs/*.html +!sundry +!sundry/editor-syntax-etc +!sundry/editor-syntax-etc/vim +!sundry/editor-syntax-etc/vim/*.vim +!sundry/editor-syntax-etc/vim/*.yaml +!sundry/editor-syntax-etc/vim/colors +!sundry/editor-syntax-etc/vim/colors/*.vim +!sundry/editor-syntax-etc/vim/ftplugin +!sundry/editor-syntax-etc/vim/ftplugin/*.vim +!sundry/editor-syntax-etc/vim/syntax +!sundry/editor-syntax-etc/vim/syntax/*.vim +!sundry/editor-syntax-etc/emacs +!sundry/editor-syntax-etc/emacs/*.el +!sundry/editor-syntax-etc/emacs/README !notes notes/** !notes/sisu-description.sst @@ -1,5 +1,964 @@ + +doc (metadata & abstraction) struct follow through +2025-02-19 ralph.amissah@gmail.com +1b311d6 (main) + +document (metadata & abstraction) struct +2025-02-19 ralph.amissah@gmail.com +48fc249 +- struct replaces tuple +- some direct naming of structs returned + (instead of use of auto) - minor + +org, touch, minor +2025-02-12 ralph.amissah@gmail.com +de49320 + +org, reorganize version info +2025-02-12 ralph.amissah@gmail.com +93b5018 + +org blocks, identify syntax +2025-01-05 ralph.amissah@gmail.com +f9fbc8e + +2025 +2025-01-01 ralph.amissah@gmail.com +24b8d40 + +refactor yaml extraction code file +2024-12-20 ralph.amissah@gmail.com +369a5b0 (2025) + +nix build, flake.nix ldc2-1.40.0 +2024-12-15 ralph.amissah@gmail.com +54f6469 (origin/main, origin/HEAD) + +flake.nix, removed flake-utils +2024-12-09 ralph.amissah@gmail.com +843a265 + +nix build, dub, take account of nixpkgs build changes +2024-12-05 ralph.amissah@gmail.com +ad607f7 + +nix build housekeeping, ldc, follow nixpkgs build +2024-12-03 ralph.amissah@gmail.com +d1903f4 + +nix build flake.nix fix +2024-12-03 ralph.amissah@gmail.com +03ab3db + +nix build houskeeping, version updates, incl. dmd & dub +2024-12-02 ralph.amissah@gmail.com +01b97ab + +pod zip fixes +2024-07-10 ralph.amissah@gmail.com +18bdad0 (main-a-org) +- serial processing (need to be built serially) +- multilingual pods, copy all languages before zip + +nix dlang overlay ldc-1.39.0 +2024-07-04 ralph.amissah@gmail.com +928142a + +[fn].digest.txt, sha256 of pod source files & pod +2024-07-04 ralph.amissah@gmail.com +d7e7c79 + +markup source digest to metadata.html +2024-07-01 ralph.amissah@gmail.com +602bc01 + +markup source digests (write to terminal) +2024-06-29 ralph.amissah@gmail.com +3ff7241 + +digest tuple rearrange +2024-06-29 ralph.amissah@gmail.com +03b6742 + +reduction in use of tuples +2024-06-29 ralph.amissah@gmail.com +83b2933 + +document digests and reduction in use of tuples +2024-06-29 ralph.amissah@gmail.com +860b894 + +nix minor +2024-06-29 ralph.amissah@gmail.com +6f5dd3d + +0.17.0 +2024-06-29 ralph.amissah@gmail.com +f2d12a2 + +shallow clone for install directory +2024-06-12 ralph.amissah@gmail.com +d887ec9 (tag: sisudoc-spine_v0.16.0, hashes-sha256-fix) + +nix dlang overlay dmd-2.109.0 +2024-06-03 ralph.amissah@gmail.com +3288e38 + +latex footers from document header make, a fix +2024-05-29 ralph.amissah@gmail.com +39d2dfa (dmd-new) + +README, further note on using nix for installation +2024-05-22 ralph.amissah@gmail.com +9876842 +- built on Debian using nix +- (first time usiing nix on a system other than + NixOS) + +org, minor reorganize for d config views +2024-05-21 ralph.amissah@gmail.com +e5e69a8 (next3) + +README update, return to ... +2024-05-17 ralph.amissah@gmail.com +19286de + +update fix default home text link info +2024-05-17 ralph.amissah@gmail.com +dc9a985 +- used e.g. in html text home button + +nix flake and envrc-nix minor +2024-05-17 ralph.amissah@gmail.com +594122a + +nix dlang overlay ldc-1.38.0 +2024-05-11 ralph.amissah@gmail.com +0452f31 +- (DMD v2.108.0, LLVM 18.1.5) + +nix dlang overlay ldc-1.38.0-beta1 +2024-05-09 ralph.amissah@gmail.com +f84e31a +- ldc-1.38.0-beta1 (DMD v2.108.0, LLVM 18.1.5) + +nix dlang overlay dmd-2.108.0, follow upstream +2024-05-09 ralph.amissah@gmail.com +12e3523 +- less passing Foundation +- default.nix filename kept + (upstream using package.nix) + +dub (dlang) prefer dub run to dub build +2024-05-07 ralph.amissah@gmail.com +05111f6 + +.envrc-nix info +2024-05-06 ralph.amissah@gmail.com +97e9d4c + +work on more generic install + instructions +2024-05-06 ralph.amissah@gmail.com +16532cb + +set nixVersions.nix_2_21 +2024-05-03 ralph.amissah@gmail.com +95203d8 + +comment out nixpkg nixVersions.unstable +2024-05-02 ralph.amissah@gmail.com +41eecdb +- nixVersions.unstable no longer available + +sisudoc spine initial release +2024-05-01 ralph.amissah@gmail.com +164ce8c + +org nixpkgs overlays housekeeping +2024-04-23 ralph.amissah@gmail.com +105a5ac + +nix direnv v 3.0.4 +2024-04-14 ralph.amissah@gmail.com +eaa9956 + +0.16.0 sisudoc (src/sisudoc sisudoc spine) +2024-04-10 ralph.amissah@gmail.com +90873fa +- src/sisudoc (replaces src/doc_reform) +- sisudoc spine (used more) + +0.15.0 +2024-04-10 ralph.amissah@gmail.com +3340de4 (tag: doc-reform_v0.15.0) + +flake.nix cosmetic minor +2024-03-20 ralph.amissah@gmail.com +e7c4b9e (tag: doc-reform_v0.14.0) + +mark modules as @safe: (& identify what is not) +2024-03-12 ralph.amissah@gmail.com +e9e17be + +nix flake & env upkeep +2024-03-08 ralph.amissah@gmail.com +2a87433 + +dmd & ldc upkeep (dmd at 2.106.1) +2024-03-08 ralph.amissah@gmail.com +3abf804 +- dmd current nixpkgs and overlay identical + +ldc-1.37.0 & dub-1.36.0 +2024-03-03 ralph.amissah@gmail.com +f67c532 + +org, ocda (ongoing) split file, separate functions +2024-01-21 ralph.amissah@gmail.com +10a66c9 + +org, ocda (ongoing) +2024-01-21 ralph.amissah@gmail.com +6dc3609 + +ldc-1.36.0 & dub-1.35.0 (& removed old/superseded beta versions) +2024-01-06 ralph.amissah@gmail.com +3940eb1 + +org, ocda (ongoing) +2024-01-02 ralph.amissah@gmail.com +98c1c70 + +2024 +2024-01-02 ralph.amissah@gmail.com +32b8127 + +org, ocda (ongoing) +2023-12-18 ralph.amissah@gmail.com +0eb9052 + +org, ocda (ongoing) +2023-12-16 ralph.amissah@gmail.com +b69940c + +org, spine ver & doc header (copyright & license) +2023-12-16 ralph.amissah@gmail.com +61d8e58 +- org import: reuse settings in another org file + using code block to evaluate other org file + spine_version_info_and_doc_header_including_copyright_and_license.org + +.envrc re-adjust & update direnv +2023-12-08 ralph.amissah@gmail.com +7c0c0e6 +- nixDirEnv (a copy of .envrc) used for flake.nix + (getting around an issue that arose when + building project; may revert to direct use of + .envrc) + +config_dub.org remove some unused parts +2023-12-07 ralph.amissah@gmail.com +e3bd7b7 + +ldc-1.36.0-beta1 tested ok (here still using 1.35.0) +2023-12-07 ralph.amissah@gmail.com +08017ca + +nix flake related modifications +2023-12-07 ralph.amissah@gmail.com +844e0b6 + +poem substitution +2023-12-06 ralph.amissah@gmail.com +cdb5d7a +- strange events yesterday, I am assuming that this substitution is a + long past uncommited change (as the like was needed and considered); + rather than the demonstration of my having being hacked, which if it + was, appears to have been rather kindly done considering the + implications of such access (seemingly having left everything else + untouched, though it implies access to and considerable knowledge of + this code base), and the choice of poem, one that I might make but + would be generous for someone else to choose for me. + +0.14.0 +2023-11-20 ralph.amissah@gmail.com +c6ee6dc + +ocda, structs (replacing tuples) +2023-11-19 ralph.amissah@gmail.com +e413648 (tag: doc-reform_v0.13.0) + +ocda, minor text formatting for comments & debugs +2023-11-19 ralph.amissah@gmail.com +7924d2a +- side-note: issues with doom emacs org babel + tangle + (not completely resolved, and have persisted) + +ocda, arrange structs, continue +2023-11-15 ralph.amissah@gmail.com +245b9a3 + +ocda, single out, use more structs +2023-11-15 ralph.amissah@gmail.com +d2a94f9 + +0.13.0 +2023-11-15 ralph.amissah@gmail.com +e0a48ea + +nix housekeeping +2023-11-04 ralph.amissah@gmail.com +f9be4ab (tag: doc-reform_v0.12.0) + +updates incl. ldc-1.35.0, direnv-2.4.0 +2023-10-15 ralph.amissah@gmail.com +12f3394 + +housekeeping, updates incl. ldc-1.34.0, dub-1.34.0 +2023-09-05 ralph.amissah@gmail.com +976f1ca + +ldc 1.33.0 (tokyo) +2023-07-28 ralph.amissah@gmail.com +973b279 + +flake.nix minor +2023-07-11 ralph.amissah@gmail.com +9410a4e + +ocda, improve doc markup structure error messages +2023-07-09 ralph.amissah@gmail.com +af80415 +- ocda, metadoc_from_src + workon doc markup structure error message, check + +flake nix build dub, set HOME, dub >= 1.31.0 fix +2023-07-08 ralph.amissah@gmail.com +12c4f6a +- fixes dub >= 1.31.0 build failure, attempted to + build in /homeless-shelter + +ocda, minor, tidy earlier work +2023-07-08 ralph.amissah@gmail.com +f16bcc2 +- ocda, fontface internal markup, cleanup & fixes + +nixenv generic set shell from system (from zsh) +2023-06-28 ralph.amissah@gmail.com +3798d20 + +icon chars, usability / cosmetic minor fix +2023-06-27 ralph.amissah@gmail.com +b861bbb + +"empty page" index.html, sort homepage link +2023-06-26 ralph.amissah@gmail.com +1ff7f29 + +html links and metadata, fixes & cosmetic work +2023-06-26 ralph.amissah@gmail.com +6118013 + +replace some instances of dir listing, index.html +2023-06-26 ralph.amissah@gmail.com +82d94b3 + +replace directory listing, blank index.html +2023-06-25 ralph.amissah@gmail.com +9125357 + +html, bespoke homepage, symlink toc.html index.html +2023-06-24 ralph.amissah@gmail.com +3434b91 +- html, bespoke homepage option +- html, symlinks toc.html index.html + +ocda, fontface internal markup, cleanup & fixes +2023-06-24 ralph.amissah@gmail.com +ff0a41d + +ocda, process section rather than part +2023-06-24 ralph.amissah@gmail.com +a47b0ef + +ldc 1.33.0-beta2 nix overlay +2023-06-27 ralph.amissah@gmail.com +30a6178 + +nix configure +2023-06-10 ralph.amissah@gmail.com +badd5fe + +unicode, changes in use of symbols to represent things +2023-06-10 ralph.amissah@gmail.com +516165c + +make set_depends (dyaml update) +2023-06-04 ralph.amissah@gmail.com +7973da9 + +nix use overlays when convenient +2023-06-04 ralph.amissah@gmail.com +446c0fe + +dub nix +2023-05-26 ralph.amissah@gmail.com +66ccfe4 + +ocda org file ("metaverse" renamed) +2023-05-21 ralph.amissah@gmail.com +fd8a637 +- ocda - object centric document abstraction +- "metaverse" name predates current association, + no need to hold on to either, rename + +nix dev + update direnv 2.2.1 => 2.3.0 +2023-04-29 ralph.amissah@gmail.com +d7930ad + +html search form action (for index & text results) +2023-04-20 ralph.amissah@gmail.com +cff8fea +- obstinately avoiding scripting, even javascript + result far from an ideal compromise, + (two submission forms (for text & for index)) + +nix org cleaning +2023-04-10 ralph.amissah@gmail.com +e3ced89 + +nix run alejandra formatter, decided to go with it +2023-04-10 ralph.amissah@gmail.com +d79a579 + +org & nix flake, mod for local dev (D related) +2023-03-16 ralph.amissah@gmail.com +667fcd4 +- for local dev using newer versions of things D + related + +nix flake & build, temp. remove gdc +2023-02-21 ralph.amissah@gmail.com +9598bd7 + +nix flake & build, devShells etc. +2023-01-26 ralph.amissah@gmail.com +970eea0 + +nix & build housekeeping +2023-01-24 ralph.amissah@gmail.com +5010380 + +nix & build housekeeping, alternative D compilers +2023-01-23 ralph.amissah@gmail.com +a615ba4 +- compilation status + - dmd (@D2.100) ok, & has been fine + - ldc (@D2.100) ok, & has been fine + - gdc11 available in nixpkgs does not compile + awaiting gdc12 (which would also be based on + @D2.100 & just might) + +2023, year rollover, old habit +2023-01-01 ralph.amissah@gmail.com +9085f33 + +nix and build housekeeping +2022-12-15 ralph.amissah@gmail.com +3d78a75 + +removed old ruby utility scripts +2022-12-16 ralph.amissah@gmail.com +d11d08b + +sqlite, check db exists, writable etc. +2022-12-09 ralph.amissah@gmail.com +fa286f5 + +regex review, match speed & compile time, ctregex +2022-11-25 ralph.amissah@gmail.com +f6d28b6 +- improve match time + - add interim fontface identifier marker +- improve compile time + - remove unused regexs + - separate out some specialized output matches + +gitignore & things nix +2022-12-08 ralph.amissah@gmail.com +684091e + +spine-search-cgi separate commits, remove sundry +2022-11-25 ralph.amissah@gmail.com +fb112dc + +0.12.0 +2022-11-25 ralph.amissah@gmail.com +4c08954 + +epub header assertion removed, check +2022-12-23 ralph.amissah@gmail.com +5d34421 (tag: doc-reform_v0.11.3) + +configs housekeeping, minor +2022-11-16 ralph.amissah@gmail.com +2bbbda5 + +regex (start thinking about ctRegex) +2022-11-11 ralph.amissah@gmail.com +f7079c9 + +org nix cosmetic +2022-11-11 ralph.amissah@gmail.com +ea80c51 + +org nix +2022-09-28 ralph.amissah@gmail.com +3b6e027 + +org noweb adjustments +2022-08-03 ralph.amissah@gmail.com +ace605e + +org nix adjust +2022-07-31 ralph.amissah@gmail.com +934b830 + +ocn metaverse, rearrange +2022-06-14 ralph.amissah@gmail.com +9b9ecaf + +org-mode headers modified +2022-06-15 ralph.amissah@gmail.com +73eb325 + +makefile, too much, prune! +2022-06-03 ralph.amissah@gmail.com +14a07cb + +build related, mostly nix flakes +2022-06-01 ralph.amissah@gmail.com +4808d0f + +html links to output, flags for a bit finer control +2022-05-26 ralph.amissah@gmail.com +dadc2ca + +pdf output links, should user choose to have it +2022-05-25 ralph.amissah@gmail.com +2eff2b6 + +sub dependency update, updates D-YAML +2022-05-26 ralph.amissah@gmail.com +8bd1faf + +housekeeping +2022-05-14 ralph.amissah@gmail.com +3a03516 + +generated-by header, latex, html, epub +2022-04-03 ralph.amissah@gmail.com +5bd8cbc +- consider, implementation quite messy + +latex doc headers moved to .sty files in ./sty dir +2022-03-30 ralph.amissah@gmail.com +15d1dc2 +- some changes made, font selection included + +latex head adjustments +2022-04-02 ralph.amissah@gmail.com +4b0ae05 + +latex header, work on (& some code formatting) +2022-03-24 ralph.amissah@gmail.com +6d74d9f + +latex output (try tidy); linebreaks more generally +2022-03-24 ralph.amissah@gmail.com +e2424c0 + +latex, pagebreaks, make headers, consider +2022-03-07 ralph.amissah@gmail.com +81f4747 + +latex, pagebreaks, make headers +2022-03-07 ralph.amissah@gmail.com +60e34a2 +- for book, article and manually set pagebreaks, + not fully utilized but flexibility introduced + +latex, pdf headers, some removed +2022-03-06 ralph.amissah@gmail.com +7e46a33 +- removed some pdf headers preceding substantive + text + +latex, use geometry package for page setting +2022-03-04 ralph.amissah@gmail.com +64de475 + +latex, linebreak br +2022-03-04 ralph.amissah@gmail.com +f4c6cf3 + +latex, urls +2022-03-02 ralph.amissah@gmail.com +e19cbce + +latex \newcommand: \ocn for ocn with margin +2022-03-01 ralph.amissah@gmail.com +b8d295e + +latex font sizes +2022-02-28 ralph.amissah@gmail.com +e4cca3e + +latex select papersize & orientation +2022-02-28 ralph.amissah@gmail.com +8dde791 +- cfte, doc collection config, cli e.g. + --set-papersize="a4,letter.portrait,b4.portrait" + +org-mode, latex file, cosmetic +2022-03-05 ralph.amissah@gmail.com +a1a07ff + +external dependency update, housekeeping, routine +2022-02-25 ralph.amissah@gmail.com +78a2310 + +verbosity level, "vox_gt[lv]" (voice greater than) +2022-02-23 ralph.amissah@gmail.com +20a3674 + +rethink verbose & debug flags, introduce show +2022-02-22 ralph.amissah@gmail.com +614e44a + +pod org file, minor +2022-02-20 ralph.amissah@gmail.com +e5da2f6 + +debug flags, narrow purpose +2022-02-21 ralph.amissah@gmail.com +8757dfd + +cgi search housekeeping, sync & remove redundancy +2022-02-18 ralph.amissah@gmail.com +7787e2c +- removed copy of d search form both org and src + duplication & out of date + +footers, year, minor +2022-02-18 ralph.amissah@gmail.com +d5e1af6 + +sqlite, html lite breakline related +2022-02-09 ralph.amissah@gmail.com +afca0c7 + +xmls, copyright and license display +2022-02-09 ralph.amissah@gmail.com +e9ff833 + +quote block, footnotes, markup? +2022-02-05 ralph.amissah@gmail.com +6acf808 + +epub, navigation +2022-02-04 ralph.amissah@gmail.com +94f56fa + +epub, work on +2022-02-04 ralph.amissah@gmail.com +30b6d71 + +codegen cgi search removed (using src in org-mode) +2022-02-03 ralph.amissah@gmail.com +b32a501 + +htmls, banner layout additions +2022-02-02 ralph.amissah@gmail.com +b3ab72d +- scroll/seg doc access toggle +- epub link added, later make optional +- search button, minor cosmetic + +xmls css, step +2022-02-01 ralph.amissah@gmail.com +3d89027 + +xmls css, stepwise changes +2022-01-29 ralph.amissah@gmail.com +d3f7134 + +xmls css, start to consider mobile usability +2022-01-29 ralph.amissah@gmail.com +8333ab4 + +config & sqlite search output, some changes +2022-01-28 ralph.amissah@gmail.com +d39da3f + +cgi sqlite_search, heading matches fix, cleanup +2022-01-27 ralph.amissah@gmail.com +1e04f9f + +doc presentation, add option to include date with title and author +2022-01-25 ralph.amissah@gmail.com +3c2da30 + +metadata, topic register to json removed, unused +2022-01-25 ralph.amissah@gmail.com +07581b1 + +sqlite: table, topic register +2022-01-24 ralph.amissah@gmail.com +f167586 + +xmls, html group text output (bullets & indents) +2022-01-20 ralph.amissah@gmail.com +845f644 + +org files naming, minor +2022-01-19 ralph.amissah@gmail.com +5b3d661 + +sqlite, minor, cosmetic in use case, if not exist +2022-01-16 ralph.amissah@gmail.com +33a5e14 + +a new year +2022-01-05 ralph.amissah@gmail.com +3105b44 + +nix setup related but messy +2021-12-23 ralph.amissah@gmail.com +168e45c + +metaverse, xml dom close eof +2021-12-03 ralph.amissah@gmail.com +bb03ff2 + +xmls, html header band +2021-12-03 ralph.amissah@gmail.com +a8d1de6 + +dlang dub & nix build related, includes dep update +2021-10-23 ralph.amissah@gmail.com +c4f6c86 +- nix-shell --pure + - nix-build + - dub build --compiler=ldc2 --build=release --force + +nix .envrc related +2021-10-16 ralph.amissah@gmail.com +69571dc + +org files, tangle output, some fixes +2021-10-13 ralph.amissah@gmail.com +0ff37b7 + +configuration, hierarchy filenames & paths ... +2021-10-07 ralph.amissah@gmail.com +e37589f + +sqlite related internal naming +2021-10-05 ralph.amissah@gmail.com +abe7e76 + +xmls homepage link +2021-10-05 ralph.amissah@gmail.com +6f65d96 + +primarily org related +2021-10-05 ralph.amissah@gmail.com +0271831 + +nix related config, direnv else minor +2021-09-20 ralph.amissah@gmail.com +85a2a29 + +org latex organize +2021-09-09 ralph.amissah@gmail.com +e8d88ac + +metadata "curate" replaces "harvest" +2021-09-01 ralph.amissah@gmail.com +1f8b96b +- "curated metadata" instead of "metadata harvest" +- css color change to related pages, light theme + +xmls, epub3 toc_nav.xhtml toc.ncx +2021-08-29 ralph.amissah@gmail.com +2cdc5d2 + +config nix +2021-08-29 ralph.amissah@gmail.com +bc5b1b8 + +metaverse parallel processing reproducability +2021-08-21 ralph.amissah@gmail.com +8525eb4 +- html xhtml issue with tags +- epub issue with title (skipped) in OEBPS/toc.ncx + +config, clean up and make a bit more consistent +2021-08-12 ralph.amissah@gmail.com +2426920 +- check version settings with: + rg -A2 _version_set$ org + +configuration reorganized into config files +2021-08-11 ralph.amissah@gmail.com +f459b2f +- spine_build_scaffold broken up into many files + +spine search and configuration related +2021-08-11 ralph.amissah@gmail.com +118ea61 + +spine_search (work on) +2021-08-08 ralph.amissah@gmail.com +b521068 + +nix help files, .envrc_local_ (& nix_notes_.org) +2021-08-07 ralph.amissah@gmail.com +c16231d + +track org config suggestions that require bespoke adjustment +2021-08-01 ralph.amissah@gmail.com +9b9b125 + +ext_depends updates: d-yaml & d2sqlite3 +2021-08-01 ralph.amissah@gmail.com +47bff1c + +config defaults: cfte, config-file & cle +2021-08-01 ralph.amissah@gmail.com +9b72621 + +spine_search +2021-08-01 ralph.amissah@gmail.com +ff59047 + +dir rename ./sundry (from ./misc) +2021-06-27 ralph.amissah@gmail.com +4d5ee2e + +org-mode code block headers +2021-06-27 ralph.amissah@gmail.com +4e84f49 + +nix-build cleanup, external sources localized +2021-05-15 ralph.amissah@gmail.com +924fabf +- clean up as external sources kept locally, in + ./src/ext_depends/ +- remove dub2nix dependency, no longer needed/used + +cgi.d arsd update +2021-05-15 ralph.amissah@gmail.com +33c8101 + +org-mode file minor adjustment +2021-05-05 ralph.amissah@gmail.com +ae7cb63 + +regex adjust, dc update build fix required +2021-05-03 ralph.amissah@gmail.com +6b55016 +- ldc-v1.26.0 dmd-v2.096.1 + +org .envrc-local_ (sample for nix-shell) +2021-04-22 ralph.amissah@gmail.com +fd3cddd + +spine, harvests require doc abstraction be run +2021-04-23 ralph.amissah@gmail.com +1eba3ef + +ext-dep: d-yaml updated +2021-04-22 ralph.amissah@gmail.com +b8fadcd + +spine options, pod uses source file structure +2021-04-20 ralph.amissah@gmail.com +cd6c5db + +spine_build_scaffold: nix related housekeeping +2021-04-20 ralph.amissah@gmail.com +08e51e7 +- mkDub.nix (dub2nix) use lib, + stdenv.lib deprecated +- .envrc stop using lorri +- .envrc-local_ set local variables as needed + +ext-dep: d2sqlite3 updated +2021-04-19 ralph.amissah@gmail.com +d9de45a + +org-mode, cosmetic +2021-04-16 ralph.amissah@gmail.com +8072ebd + +epub, minor adjustments +2021-04-13 ralph.amissah@gmail.com +294cc37 + +doc summary reinstated (org fix) +2021-04-13 ralph.amissah@gmail.com +be3b4e7 + +headers: copyright, license, year; also https +2021-04-04 ralph.amissah@gmail.com +5588bc1 + +fix issues raised by dmd2.095.1 ldc2 1.25.0 +2021-03-05 ralph.amissah@gmail.com +cbd7a2e + +make set_depends run dub describe, track json output +2021-03-03 ralph.amissah@gmail.com +e897eee +- traded $PWD for project root as ./, i.e. from dub describe json +- dub describe deletes parts of dependencies that are unreferenced by + the project build; these are available elsewhere and there is little + reason to keep them + +ext depends meta info: ver hash, license +2021-03-02 ralph.amissah@gmail.com +ede7dc3 + +cleaning +2021-02-25 ralph.amissah@gmail.com +c408957 + +external & build dependences in src tree +2021-02-19 ralph.amissah@gmail.com +02ca32a +- external & build dependences boost licensed + - ext_depends (external depends) + - D-YAML + - tinyendian + - d2sqlite3 + - imageformats + - build_depends + - dub2nix + +build from static source-tree pre fetch depends +2021-02-19 ralph.amissah@gmail.com +e1f5135 + +0.11.3 +2021-02-19 ralph.amissah@gmail.com +47ca5be + CHANGELOG 2021-02-19 ralph.amissah@gmail.com +8e1f65b (tag: doc-reform_v0.11.2) make changelog & echo version tag 2021-02-19 ralph.amissah@gmail.com @@ -106,7 +1065,7 @@ ldc-1.23.0 overlay for nixos 20.09 nix 2020-10-23 ralph.amissah@gmail.com -ccd9370 (compiler) +ccd9370 org mode, code-block names 2020-10-22 ralph.amissah@gmail.com @@ -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: diff --git a/derivation.nix b/derivation.nix index 3ad7056..90e549e 100644 --- a/derivation.nix +++ b/derivation.nix @@ -87,7 +87,7 @@ with ( ); mkDubDerivation rec { pname = "spine"; - version = "0.17.0"; + version = "0.18.0"; src = ./.; nativeBuildInputs = with pkgs; [dub ldc]; buildInputs = with pkgs; [nixVersions.latest sqlite]; @@ -2,9 +2,9 @@ "authors": [ "Ralph Amissah" ], - "copyright": "Copyright © 2015 - 2024 Ralph Amissah", + "copyright": "Copyright © 2015 - 2025 Ralph Amissah", "name": "spine", - "version": "0.17.0", + "version": "0.18.0", "description": "an object-centric sisu-like document parser", "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1734126203, - "narHash": "sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU=", + "lastModified": 1740019556, + "narHash": "sha256-vn285HxnnlHLWnv59Og7muqECNMS33mWLM14soFIv2g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "71a6392e367b08525ee710a93af2e80083b5b3e2", + "rev": "dad564433178067be1fbdfcce23b546254b6d641", "type": "github" }, "original": { @@ -9,7 +9,7 @@ ... }@inputs: let pname = "spine"; - version = "0.17.0"; + version = "0.18.0"; shell = ./shell.nix; devEnv = ./nixDevEnv.sh; supportedSystems = ["x86_64-linux"]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; @@ -130,6 +130,7 @@ spine-overlay-dmd = stdenv.mkDerivation { inherit pname; inherit version; + #name = "spine-0.18.0 dmd-2.109.1 dub-1.38.1"; meta.mainProgram = "spine-dmd"; executable = true; src = self; @@ -153,6 +154,7 @@ spine-overlay-ldc = stdenv.mkDerivation { inherit pname; inherit version; + #name = "spine-0.18.0 ldc-1.40.0 dub-1.38.1"; meta.mainProgram = "spine-ldc"; executable = true; src = self; @@ -212,7 +214,7 @@ in with pkgs-nix; { dsh-overlay = mkShell { - name = "spine base dev shell"; + name = "spine-0.18.0 base dev shell, ldc-1.40.0, dub-1.38.1"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -225,7 +227,7 @@ inherit shellHook; }; dsh-nixpkgs-dmd-dub = mkShell { - name = "spine base dev shell"; + name = "spine-0.18.0 base dev shell"; inherit shell; inherit devEnv; packages = [ @@ -237,7 +239,7 @@ inherit shellHook; }; dsh-nixpkgs-ldc-dub = mkShell { - name = "spine base dev shell"; + name = "spine-0.18.0 base dev shell"; inherit shell; inherit devEnv; packages = [ @@ -249,7 +251,7 @@ inherit shellHook; }; dsh-overlay-dmd-dub = mkShell { - name = "spine base dev shell"; + name = "spine-0.18.0 base dev shell, dmd-2.109.1, dub-1.38.1"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -261,7 +263,7 @@ inherit shellHook; }; dsh-overlay-ldc-dub = mkShell { - name = "spine base dev shell"; + name = "spine-0.18.0 base dev shell, ldc-1.40.0, dub-1.38.1"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -273,7 +275,7 @@ inherit shellHook; }; dsh-epub = mkShell { - name = "spine dev shell for epub output"; + name = "spine-0.18.0 dev shell for epub output"; inherit shell; inherit devEnv; packages = [ @@ -301,7 +303,7 @@ inherit shellHook; }; dsh-html = mkShell { - name = "spine dev shell for html output"; + name = "spine-0.18.0 dev shell for html output"; inherit shell; inherit devEnv; packages = [ @@ -321,7 +323,7 @@ inherit shellHook; }; dsh-latex-pdf = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-0.18.0 dev shell for latex & pdf output"; inherit shell; inherit devEnv; packages = [ @@ -337,7 +339,7 @@ inherit shellHook; }; dsh-sqlite = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-0.18.0 dev shell for sqlite3 output"; inherit shell; inherit devEnv; packages = [ @@ -350,7 +352,7 @@ inherit shellHook; }; dsh-i18n = mkShell { - name = "spine dev shell internationalization, po4a"; + name = "spine-0.18.0 dev shell for internationalization, po4a"; inherit shell; inherit devEnv; packages = [ @@ -1301,8 +1301,8 @@ gitsnapshot: distclean tangle git commit -a version_tag: - echo "DRV=0.17.0; git tag -f sisudoc-spine_v$$\{DRV} -m\"doc-reform sisudoc spine-$$\{DRV}\" HEAD"; \ - echo "git tag -f sisudoc-spine_v0.17.0 -m\"doc-reform sisudoc spine-0.17.0\" HEAD" + echo "DRV=0.18.0; git tag -f sisudoc-spine_v$$\{DRV} -m\"doc-reform sisudoc spine-$$\{DRV}\" HEAD"; \ + echo "git tag -f sisudoc-spine_v0.18.0 -m\"doc-reform sisudoc spine-0.18.0\" HEAD" .PHONY : all build rebuild release \ distclean init \ diff --git a/meson.build b/meson.build index 226e198..6ebe0dc 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('spine', 'd', license: 'AGPL-3', - version: '0.17.0', + version: '0.18.0', meson_version: '>=0.46' ) #if meson.get_compiler('d').get_id() == 'gcc' diff --git a/nix-overlays/README b/nix-overlays/README index f23f837..f69d2a5 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 @@ -20,7 +20,7 @@ nix overlays for (updates nixpkgs, more recent versions of): - dub ( 1.23.0 -> 1.38.1 ) [for nix versions 1.31.0 ... 1.33.0 broken] - dtools ( 2.095.1 -> 2.103.1 ) - - dmd ( 2.106.1 -> 2.109.1 ) + - dmd ( 2.106.1 -> 2.110.0 ) - gdc [not yet available] dlang-nix-flakes.org --❯ @@ -59,14 +59,14 @@ search nixpkgs here: - version in nixpkgs: - https://search.nixos.org/packages?channel=unstable&show=ldc&from=0&size=100&sort=relevance&type=packages&query=ldc -*** dmd OK ✓ ( 2.100.2 -> 2.109.1 ) +*** dmd OK ✓ ( 2.100.2 -> 2.110.0 ) - https://dlang.org/ - https://wiki.dlang.org/LDC - https://github.com/dlang/dmd - https://github.com/dlang/dmd/tags - nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.1.tar.gz + nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.110.0.tar.gz - https://github.com/dlang/dmd/pulls - version in nixpkgs: diff --git a/nix-overlays/dmd/default.nix b/nix-overlays/dmd/default.nix index b5268b7..69a9f75 100644 --- a/nix-overlays/dmd/default.nix +++ b/nix-overlays/dmd/default.nix @@ -1,5 +1,5 @@ import ./generic.nix { - version = "2.109.1"; - dmdHash = "sha256-3nCDPZnb4eQZmhYYxcH6qOmsP8or0KYuzAa5g/C9xdU="; - phobosHash = "sha256-73I0k7tCBwe5tl4K6uMs3/nT2JTZ2SppFYzmokS4W5Y="; + version = "2.110.0"; + dmdHash = "sha256-icXp9xWF2AI2gp7z/lQFAChmXfQePe9b5pbpQ9Mn19Y="; + phobosHash = "sha256-CmJpcHM+sIsaYBlpALCFoQFG+93s8gUyWmM0tYqjXkk="; } 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..9913dce 100644 --- a/org/config_env.org +++ b/org/config_env.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:build:tools: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -23,7 +23,7 @@ ** nixDevEnv envrc :envrc: #+HEADER: :tangle ../nixDevEnv.sh -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [ -f .envrc ]; then source_env_if_exists .envrc || source .envrc fi @@ -33,7 +33,7 @@ fi #+NAME: envrc #+HEADER: :tangle ../.envrc -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [ -f .envrc-git-init ]; then source_env_if_exists .envrc-git-init || source .envrc-git-init fi @@ -49,15 +49,15 @@ fi - https://github.com/nix-community/nix-direnv - source_url - - direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/<<direnv-version>>/direnvrc" "<<direnv-sha>>" + - direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/<<direnv-version>>/direnvrc" "<<direnv_hash>>" - ${NixDirEnvVersion} #+HEADER: :tangle ../.envrc-nix -#+BEGIN_SRC sh +#+BEGIN_SRC shell NIX_ENFORCE_PURITY=1 # - https://github.com/nix-community/nix-direnv -NixDirEnvVersion="<<direnv-version>>" -NixDirEnvSHA="<<direnv-sha>>" +NixDirEnvVersion="<<direnv_version>>" +NixDirEnvSHA="<<direnv_hash>>" if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}" fi @@ -77,13 +77,14 @@ echo ' ❯❯ nix flake update && nix flake check && nix flake show • for a dev shell (development environment): - - ❯❯ nix develop - ❯❯ nix develop ".#" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh + • nix develop + ❯❯ nix develop ".#" --print-build-logs -c zsh + • nix develop using nixpkgs + ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh + • nix develop using package overlays: (dmd-<<dmd_version>>, ldc-<<ldc_version>>, dub-<<dub_version>>) + ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh ❯❯ nix flake show • to build project: @@ -92,10 +93,12 @@ echo ' ❯❯ nix build ".#" --print-build-logs • to build project: - ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs - ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs - ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs - ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs + • nix build using nixpkgs + ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs + ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs + • nix build using package overlays: (dmd-<<dmd_version>>, ldc-<<ldc_version>>, dub-<<dub_version>>) + ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs + ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs • to build using dub on nix (get dependencies by setting your development environment): @@ -123,72 +126,11 @@ echo "• " #+END_SRC -*** 3.0.6 - -#+NAME: direnv-version -#+BEGIN_SRC sh -3.0.6 -#+END_SRC - -#+NAME: direnv-sha -#+BEGIN_SRC sh -sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= -#+END_SRC - -*** 3.0.4 - -#+BEGIN_SRC sh -3.0.4 -#+END_SRC - -#+BEGIN_SRC sh -sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= -#+END_SRC - -*** 3.0.0 - -#+BEGIN_SRC sh -3.0.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= -#+END_SRC - -*** 2.4.0 - -#+BEGIN_SRC sh -2.4.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= -#+END_SRC - -#+BEGIN_SRC sh -2.3.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8= -#+END_SRC - -#+NAME: direnv-sha_ -#+BEGIN_SRC sh -sha256-0000000000000000000000000000000000000000000= -#+END_SRC - -#+BEGIN_SRC sh -- https://github.com/nix-community/nix-direnv -NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000=" -direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc -#+END_SRC - ** .envrc-git-init #+HEADER: :tangle ../.envrc-git-init #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [[ ! -d ./.git ]]; then git init git add . @@ -201,7 +143,7 @@ fi #+HEADER: :tangle ../.envrc-local_ #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') export SpineBIN=./result/bin/spine # ❯❯ nix builds spine binary: @@ -232,3 +174,61 @@ export SpineCGIbin=/var/www/cgi/cgi-bin export SpineDBpath=/var/www/sqlite #export SpineDBpath=/srv/www/spine/sqlite #+END_SRC + +* SHARED versions +** direnv + +#+NAME: direnv_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-version()>> +#+END_SRC + +#+NAME: direnv_hash +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-hash()>> +#+END_SRC + +** spine project VERSION :version:set:project: + +#+NAME: spine_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> +#+END_SRC + +** dlang overlays +*** ldc + +#+NAME: ldc_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version()>> +#+END_SRC + +*** dmd + +#+NAME: dmd_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dmd-version()>> +#+END_SRC + +*** dub + +#+NAME: dub_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dub-version()>> +#+END_SRC + +*** dtools + +#+NAME: dtools_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-version()>> +#+END_SRC + +* __END__ diff --git a/org/config_git.org b/org/config_git.org index fbafd2a..b997923 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -21,7 +21,7 @@ ** .gitignore :gitignore: #+HEADER: :tangle "../.gitignore" -#+BEGIN_SRC sh +#+BEGIN_SRC gitignore # git ls-files --others --exclude-from=.git/info/exclude # git check-ignore -v flake.lock # git clean -ix @@ -87,6 +87,20 @@ !sisudoc !views !docs/*.html +!sundry +!sundry/editor-syntax-etc +!sundry/editor-syntax-etc/vim +!sundry/editor-syntax-etc/vim/*.vim +!sundry/editor-syntax-etc/vim/*.yaml +!sundry/editor-syntax-etc/vim/colors +!sundry/editor-syntax-etc/vim/colors/*.vim +!sundry/editor-syntax-etc/vim/ftplugin +!sundry/editor-syntax-etc/vim/ftplugin/*.vim +!sundry/editor-syntax-etc/vim/syntax +!sundry/editor-syntax-etc/vim/syntax/*.vim +!sundry/editor-syntax-etc/emacs +!sundry/editor-syntax-etc/emacs/*.el +!sundry/editor-syntax-etc/emacs/README !notes notes/** !notes/sisu-description.sst @@ -115,7 +129,7 @@ tmp/** ** .gitattributes :gitattributes: #+HEADER: :tangle "../.gitattributes" -#+BEGIN_SRC sh +#+BEGIN_SRC gitattributes /org export-ignore /subprojects export-ignore /build export-ignore diff --git a/org/config_make.org b/org/config_make.org index 3806db0..286842b 100644 --- a/org/config_make.org +++ b/org/config_make.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:build:tools: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: show4levels hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -31,14 +31,14 @@ - meson #+NAME: meson_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.46 #+END_SRC - soversion #+NAME: soversion_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0 #+END_SRC diff --git a/org/config_meson.org b/org/config_meson.org index 9f2f27b..60690cc 100644 --- a/org/config_meson.org +++ b/org/config_meson.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -33,7 +33,7 @@ https://code.dlang.org/packages/d2sqlite3 #+NAME: d2sqlite3_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.19.1 #+END_SRC @@ -41,7 +41,7 @@ https://code.dlang.org/packages/imageformats #+NAME: imageformats_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 7.0.2 #+END_SRC @@ -49,7 +49,7 @@ https://code.dlang.org/packages/dyaml #+NAME: dyaml_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.8.3 #+END_SRC @@ -57,7 +57,7 @@ https://code.dlang.org/packages/tinyendian #+NAME: tinyendian_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.2.0 #+END_SRC @@ -66,14 +66,14 @@ - meson #+NAME: meson_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0.46 #+END_SRC - soversion #+NAME: soversion_version_set -#+BEGIN_SRC sh +#+BEGIN_SRC shell 0 #+END_SRC @@ -115,7 +115,7 @@ cat spine_sources.txt #+HEADER: :tangle ../meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell project('spine', 'd', license: 'AGPL-3', version: '<<spine_version>>', @@ -220,7 +220,7 @@ spine_exe = executable('spine', ***** wrap #+HEADER: :tangle ../subprojects/d2sqlite3.wrap -#+BEGIN_SRC sh +#+BEGIN_SRC shell [wrap-git] directory = d2sqlite3 url = https://github.com/dlang-community/d2sqlite3.git @@ -231,7 +231,7 @@ revision = head #+HEADER: :NO-tangle ../subprojects/d2sqlite3.meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell project('d2sqlite3', 'd', meson_version: '>=<<meson_version_set>>', license: 'BSL-1.0', @@ -286,7 +286,7 @@ d2sqlite3_dep = declare_dependency( ***** wrap #+HEADER: :tangle ../subprojects/dyaml.wrap -#+BEGIN_SRC sh +#+BEGIN_SRC shell [wrap-git] directory = dyaml url = https://github.com/dlang-community/D-YAML.git @@ -299,7 +299,7 @@ Upstream provides meson.build #+HEADER: :NO-tangle ../subprojects/D-YAML/meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell project('D-YAML', 'd', meson_version: '>=<<meson_version_set>>', subproject_dir: 'contrib', @@ -376,7 +376,7 @@ dyaml_dep = declare_dependency( ***** wrap #+HEADER: :tangle ../subprojects/imageformats.wrap -#+BEGIN_SRC sh +#+BEGIN_SRC shell [wrap-git] directory = imageformats url = https://github.com/lgvz/imageformats.git @@ -387,7 +387,7 @@ revision = head #+HEADER: :NO-tangle ../subprojects/imageformats.meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell project('imageformats', 'd', meson_version: '>=<<meson_version_set>>', license: 'BSL-1.0', @@ -434,7 +434,7 @@ imageformats_dep = declare_dependency( ***** wrap #+HEADER: :tangle ../subprojects/tinyendian.wrap -#+BEGIN_SRC sh +#+BEGIN_SRC shell [wrap-git] directory = tinyendian url = https://github.com/dlang-community/tinyendian.git @@ -447,7 +447,7 @@ Upstream provides meson.build #+HEADER: :NO-tangle ../subprojects/tinyendian/meson.build #+HEADER: :noweb yes -#+BEGIN_SRC sh +#+BEGIN_SRC shell # -*- mode: python; -*- project( diff --git a/org/config_misc.org b/org/config_misc.org index 8d0de84..cf79a58 100644 --- a/org/config_misc.org +++ b/org/config_misc.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -26,7 +26,7 @@ babel tangle) org files in ./org/ to create .d source files in ./src/sisudoc/ #+HEADER: :tangle ../tangle #+HEADER: :tangle-mode (identity #o755) #+HEADER: :shebang "#!/bin/sh" -#+BEGIN_SRC sh +#+BEGIN_SRC shell # -*- mode: shell-script -*- # tangle files with org-mode DIR=`pwd` @@ -56,11 +56,11 @@ emacs --batch -Q -q \ ** build *** dub -#+BEGIN_SRC sh +#+BEGIN_SRC shell dub build -h #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell time dub --compiler=ldc2 -v --force time (dub --compiler=ldc2 --config=spine-ldc --debug=steps) time (dub --compiler=ldc2 --config=spine-ldc --debug=checkdoc --debug=summary --debug=dumpdoc) @@ -79,7 +79,7 @@ time (dub --compiler=gdc --config=spine-gdc-debug --debug=io) *** make -#+BEGIN_SRC sh +#+BEGIN_SRC shell time make dmd time make gdc time make ldc @@ -98,13 +98,13 @@ time make ldc_testrun_find_pod_epub ** git *** project version -#+BEGIN_SRC sh +#+BEGIN_SRC shell echo $(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') #+END_SRC *** what files changed -#+BEGIN_SRC sh +#+BEGIN_SRC shell git whatchanged --since="1 day ago" --oneline --name-only --pretty=format: | sort -u git log --since="1 day ago" --name-only --pretty=format: | sort -u #+END_SRC @@ -112,7 +112,7 @@ git log --since="1 day ago" --name-only --pretty=format: | sort -u ** test run *** e.g. -#+BEGIN_SRC sh +#+BEGIN_SRC shell time (./result/bin/spine --source --html -v --output-dir=tmp/program-output data/pod/sisu-manual/media/text/en/sisu_markup.sst ) time (./bin/spine-ldc --source --html -v --output-dir=tmp/program-output data/pod/sisu-manual/media/text/en/sisu_markup.sst ) @@ -144,7 +144,7 @@ find data/sisudir/media/text -name *.ss[tm] | sort | xargs *** sort -#+BEGIN_SRC sh +#+BEGIN_SRC shell ~dr/bin/spine-ldc -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=/var/www/html \ ~grotto/repo/git.repo/code/project-spine/doc-reform-markup/markup_samples/markup/pod/* @@ -170,7 +170,7 @@ find data/sisudir/media/text -name *.ss[tm] | sort | xargs - search script in D @: /var/www/html/cgi/src/spine_search.d - html output * /var/www/html/en/html/[filename] -#+BEGIN_SRC sh +#+BEGIN_SRC shell cd /var/www/html/cgi cp arsd/cgi.d /var/www/html/cgi/. *-[needs to be implemented as part of code] diff --git a/org/config_nix.org b/org/config_nix.org index e394822..54ec0ec 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 @@ -153,6 +153,7 @@ spine-overlay-dmd = stdenv.mkDerivation { inherit pname; inherit version; + #name = "spine-<<spine_version>> dmd-<<dmd_version>> dub-<<dub_version>>"; meta.mainProgram = "spine-dmd"; executable = true; src = self; @@ -176,6 +177,7 @@ spine-overlay-ldc = stdenv.mkDerivation { inherit pname; inherit version; + #name = "spine-<<spine_version>> ldc-<<ldc_version>> dub-<<dub_version>>"; meta.mainProgram = "spine-ldc"; executable = true; src = self; @@ -235,7 +237,7 @@ in with pkgs-nix; { dsh-overlay = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell, ldc-<<ldc_version>>, dub-<<dub_version>>"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -248,7 +250,7 @@ inherit shellHook; }; dsh-nixpkgs-dmd-dub = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell"; inherit shell; inherit devEnv; packages = [ @@ -260,7 +262,7 @@ inherit shellHook; }; dsh-nixpkgs-ldc-dub = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell"; inherit shell; inherit devEnv; packages = [ @@ -272,7 +274,7 @@ inherit shellHook; }; dsh-overlay-dmd-dub = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell, dmd-<<dmd_version>>, dub-<<dub_version>>"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -284,7 +286,7 @@ inherit shellHook; }; dsh-overlay-ldc-dub = mkShell { - name = "spine base dev shell"; + name = "spine-<<spine_version>> base dev shell, ldc-<<ldc_version>>, dub-<<dub_version>>"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -296,7 +298,7 @@ inherit shellHook; }; dsh-epub = mkShell { - name = "spine dev shell for epub output"; + name = "spine-<<spine_version>> dev shell for epub output"; inherit shell; inherit devEnv; packages = [ @@ -324,7 +326,7 @@ inherit shellHook; }; dsh-html = mkShell { - name = "spine dev shell for html output"; + name = "spine-<<spine_version>> dev shell for html output"; inherit shell; inherit devEnv; packages = [ @@ -344,7 +346,7 @@ inherit shellHook; }; dsh-latex-pdf = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-<<spine_version>> dev shell for latex & pdf output"; inherit shell; inherit devEnv; packages = [ @@ -360,7 +362,7 @@ inherit shellHook; }; dsh-sqlite = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-<<spine_version>> dev shell for sqlite3 output"; inherit shell; inherit devEnv; packages = [ @@ -373,7 +375,7 @@ inherit shellHook; }; dsh-i18n = mkShell { - name = "spine dev shell internationalization, po4a"; + name = "spine-<<spine_version>> dev shell for internationalization, po4a"; inherit shell; inherit devEnv; packages = [ @@ -645,15 +647,6 @@ installPhase = '' ''; #+END_SRC -** variables used SET -*** spine project VERSION :version:set:project: - -#+NAME: spine_version -#+HEADER: :noweb yes -#+BEGIN_SRC emacs-lisp -<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> -#+END_SRC - *** nixpkgs path / url - nixpkgs_url_github @@ -662,14 +655,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 +731,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 +744,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 +782,7 @@ echo "#+END_SRC ,* initialised shell variables -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell SpineSRC=$SpineSRC SpineDOC=$SpineDOC SpinePOD=$SpinePOD @@ -802,81 +795,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 +877,7 @@ $SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD ,** cgi operations (output to $SpineOUT /var/www) -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/* $SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/* @@ -893,32 +886,31 @@ $SpineBIN/spine -v --show-config --config=$SpinePOD/.dr $SpineBIN/spine --html $SpinePOD/* - $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site ,#+END_SRC ,*** generate html linked to search form -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --output=$SpineOUT $SpinePOD/* ,#+END_SRC ,*** create or re-create sql db (--sqlite-db-create or --sqlite-db-recreate) -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine -v --sqlite-db-create --sqlite-db-filename="<<spine_search_db>>" --sqlite-db-path="$SpineDBpath" $SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="<<spine_search_db>>" --sqlite-db-path="$SpineDBpath" ,#+END_SRC ,*** populate sqlite db -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine -v --sqlite-update --sqlite-db-filename="<<spine_search_db>>" --output=$SpineOUT $SpinePOD/* ,#+END_SRC ,*** generate html (linked to search form), sql output, curate COMPOSITE -,#+BEGIN_SRC sh +,#+BEGIN_SRC shell $SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="<<spine_search_db>>" --cgi-sqlite-search-filename="<<spine_search_cgi>>" --sqlite-db-path="$SpineDBpath" --output="$SpineOUT" $SpinePOD/* $SpineBIN/spine --epub --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --cgi-url-action="https://sisudoc.org/spine_search" --ouput="$SpineOUT" $SpinePOD/* ,#+END_SRC @@ -927,7 +919,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 +954,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 +975,12 @@ ls $SpineOutstatic/latex/*.tex *** db search related variables #+NAME: spine_search_db -#+BEGIN_SRC sh +#+BEGIN_SRC shell spine.search.db #+END_SRC #+NAME: spine_search_cgi -#+BEGIN_SRC sh +#+BEGIN_SRC shell spine_search #+END_SRC @@ -1028,7 +1020,50 @@ postInstall: echo `ls -la $${out}/bin/spine` #+END_SRC -** empty sha56 hash +* SHARED +** versions +*** spine project VERSION :version:set:project: + +#+NAME: spine_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> +#+END_SRC + +*** dlang overlays +**** ldc + +#+NAME: ldc_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version()>> +#+END_SRC + +**** dmd + +#+NAME: dmd_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dmd-version()>> +#+END_SRC + +**** dub + +#+NAME: dub_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dub-version()>> +#+END_SRC + +**** dtools + +#+NAME: dtools_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-version()>> +#+END_SRC + +*** empty sha56 hash #+NAME: blank_hash #+BEGIN_SRC nix @@ -1040,11 +1075,3 @@ sha256-0000000000000000000000000000000000000000000= sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= #+END_SRC -** version info SET VERSION :version:set:project: -*** spine project VERSION :version:set:project: - -#+NAME: spine_version -#+HEADER: :noweb yes -#+BEGIN_SRC emacs-lisp -<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> -#+END_SRC diff --git a/org/default_imports.org b/org/default_imports.org index 5945d39..d708124 100644 --- a/org/default_imports.org +++ b/org/default_imports.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:imports: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/default_misc.org b/org/default_misc.org index 3b0b23f..baa7a81 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:default:misc: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/default_paths.org b/org/default_paths.org index 6a41ae6..3cdb909 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:paths: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/default_regex.org b/org/default_regex.org index ffd03f1..dc70056 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:regex: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -53,6 +53,7 @@ static template spineRgxIn() { <<meta_rgx_paragraph_marks>> <<meta_rgx_blocks>> <<meta_rgx_block_tic>> + <<meta_rgx_block_quotemarks>> <<meta_rgx_block_curly>> <<meta_rgx_sub_match_code>> <<meta_rgx_table>> @@ -220,12 +221,14 @@ static grouped_para_indent_hang = ctRegex!(`^_(?P<hang>[0-9])_(? #+NAME: meta_rgx_blocks #+BEGIN_SRC d /+ blocked markup +/ -static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^`{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); -static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|`{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); +static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^[`']{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); +static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|[`']{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); #+END_SRC *** blocked markup tic :block:tic: +- consider quotemarks as alternative to, or to replace tics as using tics in text markup is a bit cumbersome + #+NAME: meta_rgx_block_tic #+BEGIN_SRC d /+ blocked markup tics +/ @@ -238,6 +241,22 @@ static block_tic_table_open = ctRegex!("^`{3} table(?:[(](?P static block_tic_close = ctRegex!("^(`{3})$","m"); #+END_SRC +*** blocked markup quotemarks :block:quotemarks: + +- consider quotemarks as alternative to, or to replace tics as using tics in text markup is a bit cumbersome + +#+NAME: meta_rgx_block_quotemarks +#+BEGIN_SRC d +/+ blocked markup tics +/ +static block_quotemarks_code_open = ctRegex!(`^'{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_poem_open = ctRegex!(`^'{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_group_open = ctRegex!(`^'{3} group(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_block_open = ctRegex!(`^'{3} block(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_quote_open = ctRegex!(`^'{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_table_open = ctRegex!(`^'{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); // ctRegex!("^'{3} table(?:\(.*?\))?"); +static block_quotemarks_close = ctRegex!(`^('{3})$`,"m"); +#+END_SRC + *** blocked markup curly :block:curly: #+NAME: meta_rgx_block_curly diff --git a/org/default_shared_snippets.org b/org/default_shared_snippets.org index b5fa945..3cdcb7d 100644 --- a/org/default_shared_snippets.org +++ b/org/default_shared_snippets.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:default:shared: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/doc-reform.org b/org/doc-reform.org index 6236ab2..ee39909 100644 --- a/org/doc-reform.org +++ b/org/doc-reform.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -25,7 +25,7 @@ #+NAME: listdir #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 *\.org #+END_SRC @@ -78,7 +78,7 @@ util_spine_syntax_highlighting_vim.org #+NAME: listdir_spine #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 spine\.org #+END_SRC @@ -98,7 +98,7 @@ misc and shared look at #+NAME: listdir_default #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 default_*\.org #+END_SRC @@ -118,7 +118,7 @@ default_shared.org #+NAME: listdir_in #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 in_*\.org #+END_SRC @@ -134,7 +134,7 @@ in_source_files.org #+NAME: listdir_meta #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 ocda\.org meta_*\.org #+END_SRC @@ -150,7 +150,7 @@ ocda.org #+NAME: listdir_out #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 output_*\.org out_*\.org #+END_SRC @@ -175,7 +175,7 @@ out_zip.org #+NAME: listdir_spine_misc #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 spine_*\.org #+END_SRC @@ -192,7 +192,7 @@ spine_markup_sample.org #+NAME: listdir_config #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 config_*\.org #+END_SRC @@ -212,7 +212,7 @@ config_nix.org #+NAME: listdir_util #+HEADER: :results output replace #+HEADER: :wrap src text -#+BEGIN_SRC sh +#+BEGIN_SRC shell ls -1 util_*\.org #+END_SRC diff --git a/org/in_source_files.org b/org/in_source_files.org index 674709a..cdd220f 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:sourcefile:read: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -581,7 +581,7 @@ final char[][] getInsertMarkupSourceContentRawLineArray( #+BEGIN_SRC d char[][] contents_insert; int code_block_status = 0; -enum codeBlock { off, curly, tic, } +enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; #+END_SRC @@ -598,11 +598,19 @@ if (code_block_status == codeBlock.curly) { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents_insert ~= line; +} else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents_insert ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents_insert ~= line; +} else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents_insert ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents_insert ~= line; @@ -666,7 +674,7 @@ return ret; #+BEGIN_SRC d char[][] contents; int code_block_status = 0; -enum codeBlock { off, curly, tic, } +enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; char[][] contents_insert; @@ -686,11 +694,19 @@ if (code_block_status == codeBlock.curly) { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents ~= line; +} else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents ~= line; +} else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents ~= line; diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index 9c62322..00bc3d3 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:config: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -15,18 +15,6 @@ #+PROPERTY: header-args+ :mkdirp yes #+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t -#+NAME: meta_check_input_markup -#+BEGIN_SRC d -string check_input_markup()( - string _txt, -) { - _txt = _txt - .replaceAll(regex(r"\\"), mkup.br_line_inline) - .strip; - return _txt; -} -#+END_SRC - - [[./doc-reform.org][doc-reform.org]] [[./][org/]] * generic @@ -553,6 +541,73 @@ JSONValue config_jsonstr = `{ #+END_SRC * YAML to spineStruct :module:conf_make_meta:yaml: + +** check markup + +#+NAME: meta_check_input_markup +#+BEGIN_SRC d +string check_input_markup()( + string _txt, +) { + _txt = _txt + .replaceAll(regex(r"\\"), mkup.br_line_inline) + .strip; + return _txt; +} +#+END_SRC + +** extract yaml + +#+NAME: meta_extract_yaml +#+BEGIN_SRC d +@system string _get_yaml_node_string(Y)( + Y _yaml, + string _return, + string _title, + string _subtitle, + bool _munge=false +) { + if ((_title in _yaml && _yaml[_title].type.sequence) + && (_yaml[_title].type.mapping + && _yaml[_title].tag.match(rgx_y.yaml_tag_is_map)) + ) { + if (_subtitle in _yaml[_title] + && _yaml[_title][_subtitle].type.string + && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_str) + ) { + _return = (!(_munge)) + ? _yaml[_title][_subtitle].get!string + : check_input_markup(_yaml[_title][_subtitle].get!string); + } + } + return _return; +} +@system int _get_yaml_node_int(Y)( + Y _yaml, + int _return, + string _title, + string _subtitle +) { + if ((_title in _yaml && _yaml[_title].type.sequence) + && (_yaml[_title].type.mapping + && _yaml[_title].tag.match(rgx_y.yaml_tag_is_map)) + ) { + if (_subtitle in _yaml[_title] + && _yaml[_title][_subtitle].type.string + && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_int) + ) { + _return = _yaml[_title][_subtitle].get!int; + } else if (_subtitle in _yaml[_title] + && _yaml[_title][_subtitle].type.string + && _yaml[_title][_subtitle].tag.match(rgx_y.yaml_tag_is_str) + ) { + _return = _yaml[_title][_subtitle].get!int; + } + } + return _return; +} +#+END_SRC + ** _module template_ #+HEADER: :tangle "../src/sisudoc/meta/conf_make_meta_yaml.d" @@ -583,7 +638,7 @@ template contentYAMLtoSpineStruct() { sisudoc.meta.rgx_yaml, sisudoc.meta.rgx; ConfComposite _struct_composite; - @system auto contentYAMLtoSpineStruct(C,Y,M,O,Cfg)( + @system ConfComposite contentYAMLtoSpineStruct(C,Y,M,O,Cfg)( C _struct_composite, Y _yaml, M _manifested, @@ -596,10 +651,11 @@ template contentYAMLtoSpineStruct() { mixin spineRgxYamlTags; static auto rgx_y = RgxYaml(); <<meta_check_input_markup>> + <<meta_extract_yaml>> confCompositeMakeBuild _mk; if (_identifier != "header") { // called only once per run anyway <<yaml_objects_conf>> - } else { + } else { // !(_identifier != "header") <<yaml_objects_make>> <<yaml_objects_meta>> } @@ -614,6 +670,7 @@ template contentYAMLtoSpineStruct() { #+NAME: yaml_objects_conf #+BEGIN_SRC d +string _init_string; /+ conf ------------------------------------------------------------------- +/ /+ _cfg. build defaults (else program runtime defaults) @@ -622,145 +679,52 @@ template contentYAMLtoSpineStruct() { +/ { if (_opt_action.webserver_http.length > 0) { - _struct_composite.conf.w_srv_http - = _opt_action.webserver_http; + _struct_composite.conf.w_srv_http = _opt_action.webserver_http; } else { - _struct_composite.conf.w_srv_http - = (_cfg.http_request_type.empty) - ? "http" - : _cfg.http_request_type; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("http" in _yaml["webserv"] - && _yaml["webserv"]["http"].type.string - && _yaml["webserv"]["http"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_http - = _yaml["webserv"]["http"].get!string; - } - } + _init_string = (_cfg.http_request_type.empty) ? "http" : _cfg.http_request_type; + _struct_composite.conf.w_srv_http = _get_yaml_node_string(_yaml, _init_string, "webserv", "http"); } if (_opt_action.cgi_search_title.length > 0) { - _struct_composite.conf.w_srv_cgi_search_form_title - = _opt_action.cgi_search_title; + _struct_composite.conf.w_srv_cgi_search_form_title = _opt_action.cgi_search_title; } else { - _struct_composite.conf.w_srv_cgi_search_form_title - = (_cfg.cgi_search_form_title.empty) - ? "≅ SiSU spine search form" - : _cfg.cgi_search_form_title; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("cgi_search_form_title" in _yaml["webserv"] - && _yaml["webserv"]["cgi_search_form_title"].type.string - && _yaml["webserv"]["cgi_search_form_title"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_search_form_title - = _yaml["webserv"]["cgi_search_form_title"].get!string; - } - } + _init_string = (_cfg.cgi_search_form_title.empty) ? "≅ SiSU spine search form" : _cfg.cgi_search_form_title; + _struct_composite.conf.w_srv_cgi_search_form_title = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_search_form_title"); } if (_opt_action.cgi_sqlite_search_filename.length > 0) { - _struct_composite.conf.w_srv_cgi_search_script - = _opt_action.cgi_sqlite_search_filename; + _struct_composite.conf.w_srv_cgi_search_script = _opt_action.cgi_sqlite_search_filename; } else { - _struct_composite.conf.w_srv_cgi_search_script - = (_cfg.cgi_filename.empty) - ? "spine_search" - : _cfg.cgi_filename; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("cgi_search_script" in _yaml["webserv"] - && _yaml["webserv"]["cgi_search_script"].type.string - && _yaml["webserv"]["cgi_search_script"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_search_script - = _yaml["webserv"]["cgi_search_script"].get!string; - } - } + _init_string = (_cfg.cgi_filename.empty) ? "spine_search" : _cfg.cgi_filename; + _struct_composite.conf.w_srv_cgi_search_script = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_search_script"); } if (_opt_action.sqliteDB_filename.length > 0) { - _struct_composite.conf.w_srv_db_sqlite_filename - = _opt_action.sqliteDB_filename; + _struct_composite.conf.w_srv_db_sqlite_filename = _opt_action.sqliteDB_filename; } else { - _struct_composite.conf.w_srv_db_sqlite_filename - = (_cfg.db_sqlite_filename.empty) - ? "spine.search.db" - : _cfg.db_sqlite_filename; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("db_sqlite_filename" in _yaml["webserv"] - && _yaml["webserv"]["db_sqlite_filename"].type.string - && _yaml["webserv"]["db_sqlite_filename"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_db_sqlite_filename - = _yaml["webserv"]["db_sqlite_filename"].get!string; - } - } + _init_string = (_cfg.db_sqlite_filename.empty) ? "spine.search.db" : _cfg.db_sqlite_filename; + _struct_composite.conf.w_srv_db_sqlite_filename = _get_yaml_node_string(_yaml, _init_string, "webserv", "db_sqlite_filename"); } if (_opt_action.sqliteDB_path.length > 0) { - _struct_composite.conf.w_srv_db_sqlite_path - = _opt_action.sqliteDB_path; + _struct_composite.conf.w_srv_db_sqlite_path = _opt_action.sqliteDB_path; } else { - _struct_composite.conf.w_srv_db_sqlite_path - = (_cfg.db_sqlite_path.empty) - ? "/var/www/sqlite" - : _cfg.db_sqlite_path; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("db_sqlite_path" in _yaml["webserv"] - && _yaml["webserv"]["db_sqlite_path"].type.string - && _yaml["webserv"]["db_sqlite_path"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_db_sqlite_path - = _yaml["webserv"]["db_sqlite_path"].get!string; - } - } + _init_string = (_cfg.db_sqlite_path.empty) ? "/var/www/sqlite" : _cfg.db_sqlite_path; + _struct_composite.conf.w_srv_db_sqlite_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "db_sqlite_path"); } if (_opt_action.cgi_url_action.length > 0) { _struct_composite.conf.w_srv_cgi_action = _opt_action.cgi_url_action; } else { - _struct_composite.conf.w_srv_cgi_action - = (_cfg.www_url_doc_root.empty) - ? "http://locahost" // "https://sisudoc.org" - : _cfg.www_url_doc_root; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("cgi_action" in _yaml["webserv"] - && _yaml["webserv"]["cgi_action"].type.string - && _yaml["webserv"]["cgi_action"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_action - = _yaml["webserv"]["cgi_action"].get!string; - } else if (_opt_action.cgi_sqlite_search_filename.length > 0) { - _struct_composite.conf.w_srv_cgi_action - = _struct_composite.conf.w_srv_cgi_bin_url ~ "/" ~ _opt_action.cgi_sqlite_search_filename; - } + _init_string = (_cfg.www_url_doc_root.empty) ? "http://locahost" : _cfg.www_url_doc_root; // "https://sisudoc.org" + _struct_composite.conf.w_srv_cgi_action = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_action"); + if (_opt_action.cgi_sqlite_search_filename.length > 0) { + _struct_composite.conf.w_srv_cgi_action = _struct_composite.conf.w_srv_cgi_bin_url ~ "/" ~ _opt_action.cgi_sqlite_search_filename; // not yet right } } if (!(_struct_composite.conf.output_path)) { _struct_composite.conf.output_path = ((_manifested.output.path).asNormalizedPath).array; } { if (_opt_action.output_dir_set.length > 0) { - _struct_composite.conf.output_path - = (_opt_action.output_dir_set.asNormalizedPath).array; + _struct_composite.conf.output_path = (_opt_action.output_dir_set.asNormalizedPath).array; } else { - _struct_composite.conf.output_path - = (_cfg.processing_path_doc_root.empty) - ? "/srv/www/spine" - : _cfg.processing_path_doc_root; + _struct_composite.conf.output_path = (_cfg.processing_path_doc_root.empty) ? "/srv/www/spine" : _cfg.processing_path_doc_root; if (("webserv" in _yaml && _yaml["webserv"].type.sequence) && (_yaml["webserv"].type.mapping && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) @@ -782,75 +746,23 @@ template contentYAMLtoSpineStruct() { } } if (_opt_action.webserver_host_doc_root.length > 0) { // same as output_path immediately above, resolve FIX REMOVE - _struct_composite.conf.w_srv_data_root_path - = _opt_action.webserver_host_doc_root; + _struct_composite.conf.w_srv_data_root_path = _opt_action.webserver_host_doc_root; } else { - _struct_composite.conf.w_srv_data_root_path - = (_cfg.processing_path_doc_root.empty) - ? "/var/www/spine" - : _cfg.processing_path_doc_root; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("data_root_path" in _yaml["webserv"] - && _yaml["webserv"]["data_root_path"].type.string - && _yaml["webserv"]["data_root_path"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_data_root_path - = _yaml["webserv"]["data_root_path"].get!string; - } - } + _init_string = (_cfg.processing_path_doc_root.empty) ? "/var/www/spine" : _cfg.processing_path_doc_root; + _struct_composite.conf.w_srv_data_root_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_root_path"); } } if (_opt_action.cgi_bin_root.length > 0) { - _struct_composite.conf.w_srv_cgi_bin_path - = _opt_action.cgi_bin_root; + _struct_composite.conf.w_srv_cgi_bin_path = _opt_action.cgi_bin_root; } else { - _struct_composite.conf.w_srv_cgi_bin_path - = (_cfg.cgi_bin_root.empty) - ? "/var/www/cgi/cgi-bin" - : _cfg.cgi_bin_root; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("cgi_bin_path" in _yaml["webserv"] - && _yaml["webserv"]["cgi_bin_path"].type.string - && _yaml["webserv"]["cgi_bin_path"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_bin_path - = _yaml["webserv"]["cgi_bin_path"].get!string; - } - } - } - { _struct_composite.conf.w_srv_data_root_part - = ""; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("data_root_part" in _yaml["webserv"] - && _yaml["webserv"]["data_root_part"].type.string - && _yaml["webserv"]["data_root_part"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_data_root_part = _yaml["webserv"]["data_root_part"].get!string; - } - } - } - { _struct_composite.conf.w_srv_images_root_part - = "image"; - if (("webserv" in _yaml && _yaml["webserv"].type.sequence) - && (_yaml["webserv"].type.mapping - && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) - ) { - if ("images_root_part" in _yaml["webserv"] - && _yaml["webserv"]["images_root_part"].type.string - && _yaml["webserv"]["images_root_part"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_images_root_part = _yaml["webserv"]["images_root_part"].get!string; - } - } + _init_string = (_cfg.cgi_bin_root.empty) ? "/var/www/cgi/cgi-bin" : _cfg.cgi_bin_root; + _struct_composite.conf.w_srv_cgi_bin_path = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_bin_path"); + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_root_part"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_data_root_part = _init_string; } + } { + _init_string = "image"; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "images_root_part"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_images_root_part = _init_string; } } } if (("webserv" in _yaml @@ -858,106 +770,68 @@ if (("webserv" in _yaml && (_yaml["webserv"].type.mapping && _yaml["webserv"].tag.match(rgx_y.yaml_tag_is_map)) ) { // cannot be used as is with opt_action FIX look at remaining, decide what to do later - if ("data_http" in _yaml["webserv"] - && _yaml["webserv"]["data_http"].type.string - && _yaml["webserv"]["data_http"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_data_http = _yaml["webserv"]["data_http"].get!string; - } - // if (_opt_action.*.length > 0) { - if ("cgi_http" in _yaml["webserv"] - && _yaml["webserv"]["cgi_http"].type.string - && _yaml["webserv"]["cgi_http"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_http = _yaml["webserv"]["cgi_http"].get!string; - } - // if (_opt_action.*.length > 0) { - if ("host" in _yaml["webserv"] - && _yaml["webserv"]["host"].type.string - && _yaml["webserv"]["host"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_host = _yaml["webserv"]["host"].get!string; - } - if ("data_root_url" in _yaml["webserv"] - && _yaml["webserv"]["data_root_url"].type.string - && _yaml["webserv"]["data_root_url"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string; - _struct_composite.conf.w_srv_data_root_url_html = - _yaml["webserv"]["data_root_url"].get!string - ~ _struct_composite.conf.w_srv_data_root_part ~ "/" - ~ _manifested.src.language ~ "/" - ~ "html"; - } else { - _struct_composite.conf.w_srv_data_root_url = _struct_composite.conf.w_srv_data_root_part; - _struct_composite.conf.w_srv_data_root_url_html = - _struct_composite.conf.w_srv_data_root_part ~ "/" - ~ _manifested.src.language ~ "/" - ~ "html"; - } - if ("cgi_host" in _yaml["webserv"] - && _yaml["webserv"]["cgi_host"].type.string - && _yaml["webserv"]["cgi_host"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_host = _yaml["webserv"]["cgi_host"].get!string; - } else { // composite construct - _struct_composite.conf.w_srv_cgi_host = _struct_composite.conf.w_srv_host; - } - if ("cgi_bin_subpath" in _yaml["webserv"] - && _yaml["webserv"]["cgi_bin_subpath"].type.string - && _yaml["webserv"]["cgi_bin_subpath"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_bin_subpath = _yaml["webserv"]["cgi_bin_subpath"].get!string; - } - if ("cgi_port" in _yaml["webserv"] - && _yaml["webserv"]["cgi_port"].type.string - && _yaml["webserv"]["cgi_port"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_port = _yaml["webserv"]["cgi_port"].get!string; - } - if ("cgi_user" in _yaml["webserv"] - && _yaml["webserv"]["cgi_user"].type.string - && _yaml["webserv"]["cgi_user"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_user = _yaml["webserv"]["cgi_user"].get!string; - } - if ("cgi_bin_url" in _yaml["webserv"] - && _yaml["webserv"]["cgi_bin_url"].type.string - && _yaml["webserv"]["cgi_bin_url"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.w_srv_cgi_bin_url = _yaml["webserv"]["cgi_bin_url"].get!string; - } else { - _struct_composite.conf.w_srv_cgi_bin_url = - (_struct_composite.conf.w_srv_cgi_http.empty) - ? _struct_composite.conf.w_srv_http - :_struct_composite.conf.w_srv_cgi_http - ~ "://" - ~ (_struct_composite.conf.w_srv_cgi_host.empty) - ? _struct_composite.conf.w_srv_cgi_host - : _struct_composite.conf.w_srv_host - ~ _struct_composite.conf.w_srv_cgi_bin_subpath; - } - // if ("cgi_file_links" in _yaml["webserv"] - // && _yaml["webserv"]["cgi_file_links"].type.string - // && _yaml["webserv"]["cgi_file_links"].tag.match(rgx_y.yaml_tag_is_str) - // ) { - // _struct_composite.conf.w_srv_cgi_file_links = _yaml["webserv"]["cgi_file_links"].get!string; - // } + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "data_http"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_data_http = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_http"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_http = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "host"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_host = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_bin_subpath"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_bin_subpath = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_port"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_port = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_user"); + if (!(_init_string.empty)) { _struct_composite.conf.w_srv_cgi_user = _init_string; } + } + if ("data_root_url" in _yaml["webserv"] + && _yaml["webserv"]["data_root_url"].type.string + && _yaml["webserv"]["data_root_url"].tag.match(rgx_y.yaml_tag_is_str) + ) { + _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string; + _struct_composite.conf.w_srv_data_root_url_html = + _yaml["webserv"]["data_root_url"].get!string + ~ _struct_composite.conf.w_srv_data_root_part ~ "/" + ~ _manifested.src.language ~ "/" + ~ "html"; + } else { + _struct_composite.conf.w_srv_data_root_url = _struct_composite.conf.w_srv_data_root_part; + _struct_composite.conf.w_srv_data_root_url_html = + _struct_composite.conf.w_srv_data_root_part ~ "/" + ~ _manifested.src.language ~ "/" + ~ "html"; + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "webserv", "cgi_host"); + _struct_composite.conf.w_srv_cgi_host = (!(_init_string.empty)) ? _init_string : _struct_composite.conf.w_srv_host; + } + if ("cgi_bin_url" in _yaml["webserv"] + && _yaml["webserv"]["cgi_bin_url"].type.string + && _yaml["webserv"]["cgi_bin_url"].tag.match(rgx_y.yaml_tag_is_str) + ) { + _struct_composite.conf.w_srv_cgi_bin_url = _yaml["webserv"]["cgi_bin_url"].get!string; + } else { + _struct_composite.conf.w_srv_cgi_bin_url = + (_struct_composite.conf.w_srv_cgi_http.empty) ? _struct_composite.conf.w_srv_http :_struct_composite.conf.w_srv_cgi_http + ~ "://" + ~ (_struct_composite.conf.w_srv_cgi_host.empty) ? _struct_composite.conf.w_srv_cgi_host : _struct_composite.conf.w_srv_host + ~ _struct_composite.conf.w_srv_cgi_bin_subpath; + } + // if ("cgi_file_links" in _yaml["webserv"] + // && _yaml["webserv"]["cgi_file_links"].type.string + // && _yaml["webserv"]["cgi_file_links"].tag.match(rgx_y.yaml_tag_is_str) + // ) { + // _struct_composite.conf.w_srv_cgi_file_links = _yaml["webserv"]["cgi_file_links"].get!string; + // } } // make (in: conf, make, meta)? -if ("processing" in _yaml - && _yaml["processing"].type.sequence -) { - if (_yaml["processing"].type.mapping - && _yaml["processing"].tag.match(rgx_y.yaml_tag_is_map) - ) { - if ("concord_max" in _yaml["processing"] - && _yaml["processing"]["concord_max"].type.string - && _yaml["processing"]["concord_max"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.processing_concord_max = _yaml["processing"]["concord_max"].get!string; - } - } +{ + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "processing", "concord_max"); + if (!(_init_string.empty)) { _struct_composite.conf.processing_concord_max = _init_string; } } if ("flag" in _yaml && _yaml["flag"].type.sequence @@ -965,65 +839,36 @@ if ("flag" in _yaml if (_yaml["flag"].type.mapping && _yaml["flag"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("act0" in _yaml["flag"] - && _yaml["flag"]["act0"].type.string - && _yaml["flag"]["act0"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act0 = _yaml["flag"]["act0"].get!string; - } - if ("act1" in _yaml["flag"] - && _yaml["flag"]["act1"].type.string - && _yaml["flag"]["act1"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act1 = _yaml["flag"]["act1"].get!string; - } - if ("act2" in _yaml["flag"] - && _yaml["flag"]["act2"].type.string - && _yaml["flag"]["act2"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act2 = _yaml["flag"]["act2"].get!string; - } - if ("act3" in _yaml["flag"] - && _yaml["flag"]["act3"].type.string - && _yaml["flag"]["act3"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act3 = _yaml["flag"]["act3"].get!string; - } - if ("act4" in _yaml["flag"] - && _yaml["flag"]["act4"].type.string - && _yaml["flag"]["act4"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act4 = _yaml["flag"]["act4"].get!string; - } - if ("act5" in _yaml["flag"] - && _yaml["flag"]["act5"].type.string - && _yaml["flag"]["act5"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act5 = _yaml["flag"]["act5"].get!string; - } - if ("act6" in _yaml["flag"] - && _yaml["flag"]["act6"].type.string - && _yaml["flag"]["act6"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act6 = _yaml["flag"]["act6"].get!string; - } - if ("act7" in _yaml["flag"] - && _yaml["flag"]["act7"].type.string - && _yaml["flag"]["act7"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act7 = _yaml["flag"]["act7"].get!string; - } - if ("act8" in _yaml["flag"] - && _yaml["flag"]["act8"].type.string - && _yaml["flag"]["act8"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act8 = _yaml["flag"]["act8"].get!string; - } - if ("act9" in _yaml["flag"] - && _yaml["flag"]["act9"].type.string - && _yaml["flag"]["act9"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.flag_act9 = _yaml["flag"]["act9"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act0"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act0 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act1"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act1 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act2"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act2 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act3"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act3 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act4"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act4 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act5"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act5 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act6"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act6 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act7"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act7 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act8"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act8 = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "flag", "act9"); + if (!(_init_string.empty)) { _struct_composite.conf.flag_act9 = _init_string; } } } } @@ -1089,20 +934,11 @@ string[] selected_papersize(string _sizes_str) { } string _set_papersize; if (_opt_action.latex_papersize.length > 0) { - _set_papersize - = _opt_action.latex_papersize; + _set_papersize = _opt_action.latex_papersize; } else { - _set_papersize - = (_cfg.default_papersize.empty) - ? "a4,letter.portrait" - : _cfg.default_papersize; - if ("papersize" in _yaml["default"] - && _yaml["default"]["papersize"].type.string - && _yaml["default"]["papersize"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _set_papersize - = _yaml["default"]["papersize"].get!string; - } + _set_papersize = (_cfg.default_papersize.empty) ? "a4,letter.portrait" : _cfg.default_papersize; + _init_string = _set_papersize; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "papersize"); + if (!(_init_string.empty)) { _set_papersize = _init_string; } } _struct_composite.conf.set_papersize = selected_papersize(_set_papersize); if ( @@ -1111,29 +947,18 @@ if ( && _yaml["default"].type.mapping && _yaml["default"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("text_wrap" in _yaml["default"] - && _yaml["default"]["text_wrap"].type.string - && _yaml["default"]["text_wrap"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.set_text_wrap = _yaml["default"]["text_wrap"].get!string; - } - if ("emphasis" in _yaml["default"] - && _yaml["default"]["emphasis"].type.string - && _yaml["default"]["emphasis"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.set_emphasis = _yaml["default"]["emphasis"].get!string; - } - if ("language" in _yaml["default"] - && _yaml["default"]["language"].type.string - && _yaml["default"]["language"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.set_language = _yaml["default"]["language"].get!string; - } - if ("digest" in _yaml["default"] - && _yaml["default"]["digest"].type.string - && _yaml["default"]["digest"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.set_digest = _yaml["default"]["digest"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "text_wrap"); + if (!(_init_string.empty)) { _struct_composite.conf.set_text_wrap = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "emphasis"); + if (!(_init_string.empty)) { _struct_composite.conf.set_emphasis = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "language"); + if (!(_init_string.empty)) { _struct_composite.conf.set_language = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "default", "digest"); + if (!(_init_string.empty)) { _struct_composite.conf.set_digest = _init_string; } } } if ("search" in _yaml @@ -1142,29 +967,18 @@ if ("search" in _yaml if (_yaml["search"].type.mapping && _yaml["search"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("flag" in _yaml["search"] - && _yaml["search"]["flag"].type.string - && _yaml["search"]["flag"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.search_flag = _yaml["search"]["flag"].get!string; - } - if ("action" in _yaml["search"] - && _yaml["search"]["action"].type.string - && _yaml["search"]["action"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.search_action = _yaml["search"]["action"].get!string; - } - if ("db" in _yaml["search"] - && _yaml["search"]["db"].type.string - && _yaml["search"]["db"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.search_db = _yaml["search"]["db"].get!string; - } - if ("title" in _yaml["search"] - && _yaml["search"]["title"].type.string - && _yaml["search"]["title"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.conf.search_title = _yaml["search"]["title"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "flag"); + if (!(_init_string.empty)) { _struct_composite.conf.search_flag = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "action"); + if (!(_init_string.empty)) { _struct_composite.conf.search_action = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "db"); + if (!(_init_string.empty)) { _struct_composite.conf.search_db = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "search", "title"); + if (!(_init_string.empty)) { _struct_composite.conf.search_title = _init_string; } } } } @@ -1174,6 +988,8 @@ if ("search" in _yaml #+NAME: yaml_objects_make #+BEGIN_SRC d +string _init_string; +int _init_int; /+ make ------------------------------------------------------------------- +/ if ("make" in _yaml && _yaml["make"].type.sequence @@ -1181,41 +997,24 @@ if ("make" in _yaml if (_yaml["make"].type.mapping && _yaml["make"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("doc_type" in _yaml["make"] - && _yaml["make"]["doc_type"].type.string - && _yaml["make"]["doc_type"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.doc_type = _yaml["make"]["doc_type"].get!string; - } - if ("breaks" in _yaml["make"] - && _yaml["make"]["breaks"].type.string - && _yaml["make"]["breaks"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.breaks = _yaml["make"]["breaks"].get!string; - } - if ("bold" in _yaml["make"] - && _yaml["make"]["bold"].type.string - && _yaml["make"]["bold"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.bold = _yaml["make"]["bold"].get!string; - } - if ("cover_image" in _yaml["make"] - && _yaml["make"]["cover_image"].type.string - && _yaml["make"]["cover_image"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.cover_image = _yaml["make"]["cover_image"].get!string; - } - if ("css" in _yaml["make"] - && _yaml["make"]["css"].type.string - && _yaml["make"]["css"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.css = _yaml["make"]["css"].get!string; - } - if ("emphasis" in _yaml["make"] - && _yaml["make"]["emphasis"].type.string - && _yaml["make"]["emphasis"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.make_str.emphasis = _yaml["make"]["emphasis"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "doc_type"); + if (!(_init_string.empty)) { _struct_composite.make_str.doc_type = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "breaks"); + if (!(_init_string.empty)) { _struct_composite.make_str.breaks = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "bold"); + if (!(_init_string.empty)) { _struct_composite.make_str.bold = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "cover_image"); + if (!(_init_string.empty)) { _struct_composite.make_str.cover_image = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "css"); + if (!(_init_string.empty)) { _struct_composite.make_str.css = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "make", "emphasis"); + if (!(_init_string.empty)) { _struct_composite.make_str.emphasis = _init_string; } } if ("footer" in _yaml["make"] && _yaml["make"]["footer"].type.string @@ -1307,16 +1106,9 @@ if ("make" in _yaml break; } } - if ("auto_num_depth" in _yaml["make"] - && _yaml["make"]["auto_num_depth"].type.string - && _yaml["make"]["auto_num_depth"].tag.match(rgx_y.yaml_tag_is_int) - ) { // not sure implemented for documents - _struct_composite.make_str.auto_num_depth = _yaml["make"]["auto_num_depth"].get!int; - } else if ("auto_num_depth" in _yaml["make"] - && _yaml["make"]["auto_num_depth"].type.string - && _yaml["make"]["auto_num_depth"].tag.match(rgx_y.yaml_tag_is_str) - ) { // not sure implemented for documents - _struct_composite.make_str.auto_num_depth = _yaml["make"]["auto_num_depth"].get!int; + { + _init_int = _get_yaml_node_int(_yaml, 99, "make", "auto_num_depth"); + if (!(_init_int == 99)) { _struct_composite.make_str.auto_num_depth = _init_int; } } if ("texpdf_font" in _yaml["make"] && _yaml["make"]["texpdf_font"].type.string @@ -1355,29 +1147,18 @@ if (_struct_composite.meta.creator_author.empty) { if (_yaml["creator"].type.mapping && _yaml["creator"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("author" in _yaml["creator"] - && _yaml["creator"]["author"].type.string - && _yaml["creator"]["author"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.creator_author = _yaml["creator"]["author"].get!string; - } - if ("email" in _yaml["creator"] - && _yaml["creator"]["email"].type.string - && _yaml["creator"]["email"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.creator_author_email = _yaml["creator"]["email"].get!string; - } - if ("illustrator" in _yaml["creator"] - && _yaml["creator"]["illustrator"].type.string - && _yaml["creator"]["illustrator"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.creator_illustrator = _yaml["creator"]["illustrator"].get!string; - } - if ("translator" in _yaml["creator"] - && _yaml["creator"]["translator"].type.string - && _yaml["creator"]["translator"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.creator_translator = _yaml["creator"]["translator"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "author"); + if (!(_init_string.empty)) { _struct_composite.meta.creator_author = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "email"); + if (!(_init_string.empty)) { _struct_composite.meta.creator_author_email = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "illustrator"); + if (!(_init_string.empty)) { _struct_composite.meta.creator_illustrator = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "creator", "translator"); + if (!(_init_string.empty)) { _struct_composite.meta.creator_translator = _init_string; } } } else if (_yaml["creator"].type.string && _yaml["creator"].tag.match(rgx_y.yaml_tag_is_str) @@ -1433,43 +1214,27 @@ if (_struct_composite.meta.title_main.empty) { ) { _struct_composite.meta.title_main = _yaml["title"]["title"].get!string; } - if ("edition" in _yaml["title"] - && _yaml["title"]["edition"].type.string - && _yaml["title"]["edition"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_edition = _yaml["title"]["edition"].get!string; - } - if ("full" in _yaml["title"] - && _yaml["title"]["full"].type.string - && _yaml["title"]["full"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_full = _yaml["title"]["full"].get!string; - } - if ("language" in _yaml["title"] - && _yaml["title"]["language"].type.string - && _yaml["title"]["language"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_language = _yaml["title"]["language"].get!string; - } - if ("note" in _yaml["title"] - && _yaml["title"]["note"].type.string - && _yaml["title"]["note"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_note = _yaml["title"]["note"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "edition"); + if (!(_init_string.empty)) { _struct_composite.meta.title_edition = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "full"); + if (!(_init_string.empty)) { _struct_composite.meta.title_full = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "language"); + if (!(_init_string.empty)) { _struct_composite.meta.title_language = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "note"); + if (!(_init_string.empty)) { _struct_composite.meta.title_note = _init_string; } } - if ("subtitle" in _yaml["title"] - && _yaml["title"]["subtitle"].type.string - && _yaml["title"]["subtitle"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_subtitle = _yaml["title"]["subtitle"].get!string; - } else if ("sub" in _yaml["title"] - && _yaml["title"]["sub"].type.string - && _yaml["title"]["sub"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.title_subtitle = _yaml["title"]["sub"].get!string; + if ("subtitle" in _yaml["title"]) { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "subtitle"); + if (!(_init_string.empty)) { _struct_composite.meta.title_subtitle = _init_string; } + } else if ("sub" in _yaml["title"]) { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "title", "sub"); + if (!(_init_string.empty)) { _struct_composite.meta.title_subtitle = _init_string; } } - } else if ( - _yaml["title"].type.string + } else if (_yaml["title"].type.string && _yaml["title"].tag.match(rgx_y.yaml_tag_is_str) ) { _struct_composite.meta.title_main = _yaml["title"].get!string; @@ -1494,23 +1259,15 @@ if ("classify" in _yaml if (_yaml["classify"].type.mapping && _yaml["classify"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("dewey" in _yaml["classify"] - && _yaml["classify"]["dewey"].type.string - && _yaml["classify"]["dewey"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.classify_dewey = _yaml["classify"]["dewey"].get!string; - } - if ("loc" in _yaml["classify"] - && _yaml["classify"]["loc"].type.string - && _yaml["classify"]["loc"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.classify_loc = _yaml["classify"]["loc"].get!string; - } - if ("keywords" in _yaml["classify"] - && _yaml["classify"]["keywords"].type.string - && _yaml["classify"]["keywords"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.classify_keywords = _yaml["classify"]["keywords"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "dewey"); + if (!(_init_string.empty)) { _struct_composite.meta.classify_dewey = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "loc"); + if (!(_init_string.empty)) { _struct_composite.meta.classify_loc = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "classify", "keywords"); + if (!(_init_string.empty)) { _struct_composite.meta.classify_keywords = _init_string; } } if ("topic_register" in _yaml["classify"] && _yaml["classify"]["topic_register"].type.string @@ -1564,47 +1321,27 @@ if ("date" in _yaml if (_yaml["date"].type.mapping && _yaml["date"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("added_to_site" in _yaml["date"] - && _yaml["date"]["added_to_site"].type.string - && _yaml["date"]["added_to_site"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_added_to_site = _yaml["date"]["added_to_site"].get!string; - } - if ("available" in _yaml["date"] - && _yaml["date"]["available"].type.string - && _yaml["date"]["available"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_available = _yaml["date"]["available"].get!string; - } - if ("created" in _yaml["date"] - && _yaml["date"]["created"].type.string - && _yaml["date"]["created"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_created = _yaml["date"]["created"].get!string; - } - if ("issued" in _yaml["date"] - && _yaml["date"]["issued"].type.string - && _yaml["date"]["issued"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_issued = _yaml["date"]["issued"].get!string; - } - if ("modified" in _yaml["date"] - && _yaml["date"]["modified"].type.string - && _yaml["date"]["modified"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_modified = _yaml["date"]["modified"].get!string; - } - if ("published" in _yaml["date"] - && _yaml["date"]["published"].type.string - && _yaml["date"]["published"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_published = _yaml["date"]["published"].get!string; - } - if ("valid" in _yaml["date"] - && _yaml["date"]["valid"].type.string - && _yaml["date"]["valid"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.date_valid = _yaml["date"]["valid"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "added_to_site"); + if (!(_init_string.empty)) { _struct_composite.meta.date_added_to_site = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "available"); + if (!(_init_string.empty)) { _struct_composite.meta.date_available = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "created"); + if (!(_init_string.empty)) { _struct_composite.meta.date_created = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "issued"); + if (!(_init_string.empty)) { _struct_composite.meta.date_issued = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "modified"); + if (!(_init_string.empty)) { _struct_composite.meta.date_modified = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "published"); + if (!(_init_string.empty)) { _struct_composite.meta.date_published = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "date", "valid"); + if (!(_init_string.empty)) { _struct_composite.meta.date_valid = _init_string; } } } } @@ -1620,23 +1357,15 @@ if ("notes" in _yaml if (_yaml["notes"].type.mapping && _yaml["notes"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("abstract" in _yaml["notes"] - && _yaml["notes"]["abstract"].type.string - && _yaml["notes"]["abstract"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.notes_abstract = _yaml["notes"]["abstract"].get!string; - } - if ("description" in _yaml["notes"] - && _yaml["notes"]["description"].type.string - && _yaml["notes"]["description"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.notes_description = _yaml["notes"]["description"].get!string; - } - if ("summary" in _yaml["notes"] - && _yaml["notes"]["summary"].type.string - && _yaml["notes"]["summary"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.notes_summary = _yaml["notes"]["summary"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "abstract"); + if (!(_init_string.empty)) { _struct_composite.meta.notes_abstract = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "description"); + if (!(_init_string.empty)) { _struct_composite.meta.notes_description = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "notes", "summary"); + if (!(_init_string.empty)) { _struct_composite.meta.notes_summary = _init_string; } } } } @@ -1646,29 +1375,18 @@ if ("original" in _yaml if (_yaml["original"].type.mapping && _yaml["original"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("language" in _yaml["original"] - && _yaml["original"]["language"].type.string - && _yaml["original"]["language"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.original_language = _yaml["original"]["language"].get!string; - } - if ("language_char" in _yaml["original"] - && _yaml["original"]["language_char"].type.string - && _yaml["original"]["language_char"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.original_language_char = _yaml["original"]["language_char"].get!string; - } - if ("source" in _yaml["original"] - && _yaml["original"]["source"].type.string - && _yaml["original"]["source"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.original_source = _yaml["original"]["source"].get!string; - } - if ("title" in _yaml["original"] - && _yaml["original"]["title"].type.string - && _yaml["original"]["title"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.original_title = _yaml["original"]["title"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "language"); + if (!(_init_string.empty)) { _struct_composite.meta.original_language = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "language_char"); + if (!(_init_string.empty)) { _struct_composite.meta.original_language_char = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "source"); + if (!(_init_string.empty)) { _struct_composite.meta.original_source = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "original", "title"); + if (!(_init_string.empty)) { _struct_composite.meta.original_title = _init_string; } } } } @@ -1683,59 +1401,34 @@ if ("rights" in _yaml if (_yaml["rights"].type.mapping && _yaml["rights"].tag.match(rgx_y.yaml_tag_is_map) ) { - if ("copyright" in _yaml["rights"] - && _yaml["rights"]["copyright"].type.string - && _yaml["rights"]["copyright"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright = check_input_markup(_yaml["rights"]["copyright"].get!string); - } - if ("copyright_text" in _yaml["rights"] - && _yaml["rights"]["copyright_text"].type.string - && _yaml["rights"]["copyright_text"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_text = _yaml["rights"]["copyright_text"].get!string; - } - if ("copyright_audio" in _yaml["rights"] - && _yaml["rights"]["copyright_audio"].type.string - && _yaml["rights"]["copyright_audio"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_audio = _yaml["rights"]["copyright_audio"].get!string; - } - if ("copyright_cover" in _yaml["rights"] - && _yaml["rights"]["copyright_cover"].type.string - && _yaml["rights"]["copyright_cover"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_cover = _yaml["rights"]["copyright_cover"].get!string; - } - if ("copyright_illustrations" in _yaml["rights"] - && _yaml["rights"]["copyright_illustrations"].type.string - && _yaml["rights"]["copyright_illustrations"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_illustrations = _yaml["rights"]["copyright_illustrations"].get!string; - } - if ("copyright_photographs" in _yaml["rights"] - && _yaml["rights"]["copyright_photographs"].type.string - && _yaml["rights"]["copyright_photographs"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_photographs = _yaml["rights"]["copyright_photographs"].get!string; - } - if ("copyright_translation" in _yaml["rights"] - && _yaml["rights"]["copyright_translation"].type.string - && _yaml["rights"]["copyright_translation"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_translation = _yaml["rights"]["copyright_translation"].get!string; - } - if ("copyright_video" in _yaml["rights"] - && _yaml["rights"]["copyright_video"].type.string - && _yaml["rights"]["copyright_video"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_copyright_video = _yaml["rights"]["copyright_video"].get!string; + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright", true); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_text"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_text = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_audio"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_audio = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_cover"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_cover = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_illustrations"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_illustrations = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_photographs"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_photographs = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_translation"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_translation = _init_string; } + } { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "copyright_video"); + if (!(_init_string.empty)) { _struct_composite.meta.rights_copyright_video = _init_string; } } - if ("license" in _yaml["rights"] - && _yaml["rights"]["license"].type.string - && _yaml["rights"]["license"].tag.match(rgx_y.yaml_tag_is_str) - ) { - _struct_composite.meta.rights_license = check_input_markup(_yaml["rights"]["license"].get!string); + { + _init_string = ""; _init_string = _get_yaml_node_string(_yaml, _init_string, "rights", "license", true); + if (!(_init_string.empty)) { _struct_composite.meta.rights_license = _init_string; } } } } @@ -2427,12 +2120,12 @@ template configParseYAMLreturnSpineStruct() { sisudoc.meta.conf_make_meta_structs, sisudoc.meta.conf_make_meta_json; mixin contentYAMLtoSpineStruct; - @system auto configParseYAMLreturnSpineStruct(T,CCm,M,O,Cfg)( - T _document_struct, - CCm _make_and_meta_struct, - M _manifested, - O _opt_action, - Cfg _cfg + @system ConfComposite configParseYAMLreturnSpineStruct(T,M,O,Cfg)( + T _document_struct, + ConfComposite _make_and_meta_struct, + M _manifested, + O _opt_action, + Cfg _cfg ){ Node _yaml; if (_document_struct.content.length > 0) { @@ -2465,7 +2158,7 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() { std.exception, std.regex, std.stdio, - std.traits, + // std.traits, std.typecons, std.utf, std.conv : to; @@ -2481,12 +2174,12 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() { static auto rgx = RgxI(); mixin spineRgxYamlTags; static auto rgx_y = RgxYaml(); - @system auto docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct(CCm,Src,M,O,Cfg)( - Src header_src, - CCm _make_and_meta_struct, - M _manifested, - O _opt_action, - Cfg _cfg, + @system ConfComposite docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct(Src,M,O,Cfg)( + Src header_src, + ConfComposite _make_and_meta_struct, + M _manifested, + O _opt_action, + Cfg _cfg, ) { Node _yaml; try { diff --git a/org/meta_debugs.org b/org/meta_debugs.org index fcf8e3c..b5948eb 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:debugs: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/nix-develop-dlang-shared.org b/org/nix-develop-dlang-shared.org new file mode 100644 index 0000000..b1611a4 --- /dev/null +++ b/org/nix-develop-dlang-shared.org @@ -0,0 +1,568 @@ +-*- mode: org -*- +#+TITLE: dlang related shared versions +#+DESCRIPTION: dlang +#+FILETAGS: :dlang:develop:shared: +#+AUTHOR: Ralph Amissah +#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah +#+LANGUAGE: en +#+STARTUP: content hideblocks hidestars noindent entitiespretty +#+PROPERTY: header-args :noweb yes +#+PROPERTY: header-args+ :exports code +#+PROPERTY: header-args+ :results no +#+PROPERTY: header-args+ :cache no +#+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes +#+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t + +* nix +** direnv +*** version SET + +#+NAME: direnv-version +#+BEGIN_SRC org +<<direnv_version_3_0_6>> +#+END_SRC + +#+NAME: direnv-hash +#+BEGIN_SRC org +<<direnv_hash_3_0_6>> +#+END_SRC + +*** versions + +**** 3.0.6 + +#+NAME: direnv_version_3_0_6 +#+BEGIN_SRC org +3.0.6 +#+END_SRC + +#+NAME: direnv_hash_3_0_6 +#+BEGIN_SRC org +sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= +#+END_SRC + +**** 3.0.4 + +#+NAME: direnv_version_3_0_4 +#+BEGIN_SRC org +3.0.4 +#+END_SRC + +#+NAME: direnv_hash_3_0_4 +#+BEGIN_SRC org +sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= +#+END_SRC + +**** 3.0.0 + +#+NAME: direnv_version_3_0_0 +#+BEGIN_SRC org +3.0.0 +#+END_SRC + +#+NAME: direnv_hash_3_0_0 +#+BEGIN_SRC org +sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= +#+END_SRC + +**** 2.4.0 + +#+NAME: direnv_version_2_4_0 +#+BEGIN_SRC org +2.4.0 +#+END_SRC + +#+NAME: direnv_hash_2_4_0 +#+BEGIN_SRC org +sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= +#+END_SRC + +* dlang +** ldc +*** version SET +**** version & sha256 nix composite + +#+NAME: ldc-version-info +#+BEGIN_SRC org +version = "<<ldc-version>>"; +sha256 = "<<ldc-hash>>"; +#+END_SRC + +**** select version SET OK ✓ + +#+NAME: ldc-version +#+BEGIN_SRC org +<<ldc_version_1_40_0>> +#+END_SRC + +#+NAME: ldc-hash +#+BEGIN_SRC org +<<ldc_hash_1_40_0>> +#+END_SRC + +#+NAME: ldc-llvm-set +#+BEGIN_SRC org +<<ldc_llvm_set_1_40_0>> +#+END_SRC + +*** versions +**** 1.40 OK ✓ +***** 1.40.0 OK ✓ + + - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.40.0-beta6.tar.gz + - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz + +#+NAME: ldc_version_1_40_0 +#+BEGIN_SRC nix +1.40.0 +#+END_SRC + +#+NAME: ldc_hash_1_40_0 +#+BEGIN_SRC nix +sha256-LT85DlAebecPpBUgZP0ayKTVrTUqN6DMJVEWTatLOxY= +#+END_SRC + +#+NAME: ldc_llvm_set_1_40_0 +#+BEGIN_SRC nix +llvm_19 +#+END_SRC + +**** 1.39 OK ✓ +***** 1.39.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.39.0.tar.gz +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz + +#+NAME: ldc_version_1_39_0 +#+BEGIN_SRC nix +1.39.0 +#+END_SRC + +#+NAME: ldc_hash_1_39_0 +#+BEGIN_SRC nix +sha256-ZiG0ATsY6Asu2nus3Y404fvqIwtKYoHl1JRUDU5A6mo= +#+END_SRC + +#+NAME: ldc_llvm_set_1_39_0 +#+BEGIN_SRC nix +llvm_18 +#+END_SRC + +**** =< 1.32 +***** 1.32.2 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.32.1.tar.gz + +#+NAME: ldc_version_1_32_2 +#+BEGIN_SRC nix +1.32.2 +#+END_SRC + +#+NAME: ldc_hash_1_32_2 +#+BEGIN_SRC nix +sha256-v6Sq7nQyChJohDyI4inzObLfCVOkvLT87VLr4N2hzZU= +#+END_SRC + +***** 1.32.1 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.32.1.tar.gz + +#+NAME: ldc_version_1_32_1 +#+BEGIN_SRC nix +1.32.1 +#+END_SRC + +#+NAME: ldc_hash_1_32_1 +#+BEGIN_SRC nix +sha256-s1U7+qiVJDF+zSHrLGPG6g+acIChYnXkb9p+OrNX6g8= +#+END_SRC + +***** 1.32.0 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.32.0.tar.gz + +#+NAME: ldc_version_1_32_0 +#+BEGIN_SRC nix +1.32.0 +#+END_SRC + +#+NAME: ldc_hash_1_32_0 +#+BEGIN_SRC nix +sha256-xO4L+RtBbdVkE1PZsme2pIYAxJnHgr6xEtLkYOMpvqw= +#+END_SRC + +***** 1.31.0 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.31.0.tar.gz + +#+NAME: ldc_version_1_31_0 +#+BEGIN_SRC nix +1.31.0 +#+END_SRC + +#+NAME: ldc_hash_1_31_0 +#+BEGIN_SRC nix +sha256-8cjs6eHjWAbDRBvyT75mbN3Y7vN1WSwZzY/uRwHNVFg= +#+END_SRC + +***** 1.30.0 + +- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.30.0.tar.gz + +#+NAME: ldc_version_1_30_0 +#+BEGIN_SRC nix +1.30.0 +#+END_SRC + +#+NAME: ldc_hash_1_30_0 +#+BEGIN_SRC nix +sha256-/bs3bwgkLZF5IqaiKnc5gCF/r6MQBG/F1kWUkK8j2s0= +#+END_SRC + +** dmd +*** version SET + +#+NAME: dmd-version +#+BEGIN_SRC org +<<dmd_version_2_110_0>> +#+END_SRC + +#+NAME: dmd-hash +#+BEGIN_SRC org +<<dmd_hash_2_110_0>> +#+END_SRC + +#+NAME: phobos-hash +#+BEGIN_SRC org +<<phobos_hash_2_110_0>> +#+END_SRC + +*** versions +**** 2.110.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.110.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.110.0.tar.gz + +#+NAME: dmd_version_2_110_0 +#+BEGIN_SRC nix +2.110.0 +#+END_SRC + +#+NAME: phobos_hash_2_110_0 +#+BEGIN_SRC nix +sha256-CmJpcHM+sIsaYBlpALCFoQFG+93s8gUyWmM0tYqjXkk= +#+END_SRC + +#+NAME: dmd_hash_2_110_0 +#+BEGIN_SRC nix +sha256-icXp9xWF2AI2gp7z/lQFAChmXfQePe9b5pbpQ9Mn19Y= +#+END_SRC + +**** 2.109.1 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.1.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.109.1.tar.gz + +#+NAME: dmd_version_2_109_1 +#+BEGIN_SRC nix +2.109.1 +#+END_SRC + +#+NAME: phobos_hash_2_109_1 +#+BEGIN_SRC nix +sha256-73I0k7tCBwe5tl4K6uMs3/nT2JTZ2SppFYzmokS4W5Y= +#+END_SRC + +#+NAME: dmd_hash_2_109_1 +#+BEGIN_SRC nix +sha256-3nCDPZnb4eQZmhYYxcH6qOmsP8or0KYuzAa5g/C9xdU= +#+END_SRC + +**** 2.109.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.109.0.tar.gz + +#+NAME: dmd_version_2_109_0 +#+BEGIN_SRC nix +2.109.0 +#+END_SRC + +#+NAME: dmd_hash_2_109_0 +#+BEGIN_SRC nix +sha256-unAZgyZyT6qomlj6pdlOx4h1SKuDjutl1/0FM9AhBWc= +#+END_SRC + +#+NAME: phobos_hash_2_109_0 +#+BEGIN_SRC nix +sha256-b91FeluFqhmjHd1wwkyq98QzIlwjE646xNj2n6hP3aM= +#+END_SRC + +**** 2.108.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.108.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.108.0.tar.gz + +#+NAME: dmd_version_2_108_0 +#+BEGIN_SRC nix +2.108.0 +#+END_SRC + +#+NAME: dmd_hash_2_108_0 +#+BEGIN_SRC nix +sha256-tlWcFgKtXzfqMMkOq4ezhZHdYCXFckjN5+m6jO4VH0U= +#+END_SRC + +#+NAME: phobos_hash_2_108_0 +#+BEGIN_SRC nix +sha256-uU8S4rABOfhpKh+MvSbclkbdf0hrsuKF8SIpWMnPpfU= +#+END_SRC + +**** 2.107.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.107.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.107.0.tar.gz + +#+NAME: dmd_version_2_107_0 +#+BEGIN_SRC nix +2.107.0 +#+END_SRC + +#+NAME: dmd_hash_2_107_0 +#+BEGIN_SRC nix +<<sha256-blank>> +#+END_SRC + +#+NAME: phobos_hash_2_107_0 +#+BEGIN_SRC nix +<<sha256-blank>> +#+END_SRC + +**** 2.106.1 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.106.1.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.106.1.tar.gz + +#+NAME: dmd_version_2_106_1 +#+BEGIN_SRC nix +2.106.1 +#+END_SRC + +#+NAME: dmd_hash_2_106_1 +#+BEGIN_SRC nix +sha256-vjYa/Pxrz7J2htXT+fa+xaeen/Vxne++lELbHTSXBK8= +#+END_SRC + +#+NAME: phobos_hash_2_106_1 +#+BEGIN_SRC nix +sha256-yRL9ub3u4mREG9PVxBvgQ/LDXD57RadPTZ2h08qyh/s= +#+END_SRC + +#+NAME: dmd_version +#+BEGIN_SRC nix +<<dmd_version_2_104_0>> +#+END_SRC + +#+NAME: dmd_hash +#+BEGIN_SRC nix +<<dmd_hash_2_104_0>> +#+END_SRC + +#+NAME: phobos_hash +#+BEGIN_SRC nix +<<phobos_hash_2_104_0>> +#+END_SRC + +** dub +*** version SET + +#+NAME: dub-version +#+HEADER: :noweb yes +#+BEGIN_SRC org +<<dub_version_1_38_1>> +#+END_SRC + +#+NAME: dub-hash +#+BEGIN_SRC org +<<dub_hash_1_38_1>> +#+END_SRC + +*** versions +**** 1.38 OK ✓ +***** 1.38.1 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.38.1.tar.gz + +#+NAME: dub_version_1_38_1 +#+BEGIN_SRC nix +1.38.1 +#+END_SRC + +#+NAME: dub_hash_1_38_1 +#+BEGIN_SRC nix +sha256-8Lr/0sx4SKwU1aNOxZArta0RXpDM+EWl29ZsPDdPWFo= +#+END_SRC + +**** 1.36 OK ✓ +***** 1.36.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.36.0.tar.gz + +#+NAME: dub_version_1_36_0 +#+BEGIN_SRC nix +1.36.0 +#+END_SRC + +#+NAME: dub_hash_1_36_0 +#+BEGIN_SRC nix +sha256-S8pls9zxbGAQTwqYf4bDT2q7Ow12S8bBsJE5UmsACBs= +#+END_SRC + +**** 1.35 OK ✓ +***** 1.35.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.35.0.tar.gz + +#+NAME: dub_version_1_35_0 +#+BEGIN_SRC nix +1.35.0 +#+END_SRC + +#+NAME: dub_hash_1_35_0 +#+BEGIN_SRC nix +sha256-hC46XKE6lLLMLGMGl4vDnLDBQy6P/Z7o3ayDJj0Sois= +#+END_SRC + +**** 1.34 OK ✓ +***** 1.34.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.34.0.tar.gz + +#+NAME: dub_version_1_34_0 +#+BEGIN_SRC nix +1.34.0 +#+END_SRC + +#+NAME: dub_hash_1_34_0 +#+BEGIN_SRC nix +sha256-hC46XKE6lLLMLGMGl4vDnLDBQy6P/Z7o3ayDJj0Sois= +#+END_SRC + +**** 1.33 OK ✓ +***** 1.33.1 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.1.tar.gz + +#+NAME: dub_version_1_33_1 +#+BEGIN_SRC nix +1.33.1 +#+END_SRC + +#+NAME: dub_hash_1_33_1 +#+BEGIN_SRC nix +sha256-QFgUsO04VRXBDjGI5QQs7u9XrexG7/V34TMgJP1D8yA= +#+END_SRC + +***** 1.33.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.0.tar.gz + +#+NAME: dub_version_1_33_0 +#+BEGIN_SRC nix +1.33.0 +#+END_SRC + +#+NAME: dub_hash_1_33_0 +#+BEGIN_SRC nix +sha256-4Mha7WF6cg3DIccfpvOnheuvgfziv/7wo8iFsPXO4yY= +#+END_SRC + +**** 1.32 OK ✓ +***** 1.32.1 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.32.1.tar.gz + +#+NAME: dub_version_1_32_1 +#+BEGIN_SRC nix +1.32.1 +#+END_SRC + +#+NAME: dub_hash_1_32_1 +#+BEGIN_SRC nix +sha256-5pW3Fu3PQ1ZLJnsuh7fPpEBNbVQgGfFyiuMrAVOJKQA= +#+END_SRC + +** dtools + +- https://github.com/dlang/tools + +*** version SET + +#+NAME: dtools-version +#+BEGIN_SRC org +<<dtools_version_2_103_1>> +#+END_SRC + +#+NAME: dtools-hash +#+BEGIN_SRC org +<<dtools_hash_2_103_1>> +#+END_SRC + +*** versions +**** 2.103.1 OK ✓ + +- https://github.com/dlang/tools/releases/tag/v2.103.1 + +#+NAME: dtools_version_2_103_1 +#+BEGIN_SRC nix +2.103.1 +#+END_SRC + +#+NAME: dtools_hash_2_103_1 +#+BEGIN_SRC nix +sha256-XM4gUxcarQCOBR8W/o0iWAI54PyLDkH6CsDce22Cnu4= +#+END_SRC + +**** 2.102.2 + +- https://github.com/dlang/tools/releases/tag/v2.102.2 + +#+NAME: dtools_version_2_102_2 +#+BEGIN_SRC nix +2.102.2 +#+END_SRC + +#+NAME: dtools_hash_2_102_2 +#+BEGIN_SRC nix +sha256-XM4gUxcarQCOBR8W/o0iWAI54PyLDkH6CsDce22Cnu4= +#+END_SRC + +**** 2.095.1 + +- https://github.com/dlang/tools/releases/tag/v2.095.1 + +#+NAME: dtools_version_2_095_1 +#+BEGIN_SRC nix +2.095.1 +#+END_SRC + +#+NAME: dtools_hash_2_095_1 +#+BEGIN_SRC nix +sha256:0rdfk3mh3fjrb0h8pr8skwlq6ac9hdl1fkrkdl7n1fa2806b740b +#+END_SRC + +** sha256 blank_hash + +#+NAME: blank_hash +#+BEGIN_SRC nix +sha256-0000000000000000000000000000000000000000000= +#+END_SRC + +#+NAME: assumed_hash +#+BEGIN_SRC nix +sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= +#+END_SRC + +* __END__ diff --git a/org/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org index 073e1e2..665c448 100644 --- a/org/nixpkgs_overlays_d_related.org +++ b/org/nixpkgs_overlays_d_related.org @@ -45,7 +45,7 @@ ,#+FILETAGS: :dlang:build:tools: ,#+AUTHOR: Ralph Amissah ,#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -,#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +,#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah ,#+LANGUAGE: en ,#+STARTUP: content hideblocks hidestars noindent entitiespretty @@ -191,7 +191,7 @@ nix flake update && nix flake check --show-trace && nix flake info && echo "" && ** .gitignore #+HEADER: :tangle-NO "../nix-overlays/.gitignore" -#+BEGIN_SRC sh +#+BEGIN_SRC gitignore # git ls-files --others --exclude-from=.git/info/exclude # git check-ignore -v flake.lock # git clean -ix @@ -234,7 +234,7 @@ tmp/** *** nixDevEnv.sh (.envrc) #+HEADER: :tangle-NO "../nix-overlays/nixDevEnv.sh" -#+BEGIN_SRC sh +#+BEGIN_SRC shell if [ -f .envrc-local ]; then source_env_if_exists .envrc-local || source .envrc-local fi @@ -246,7 +246,7 @@ fi *** .envrc-local #+HEADER: :tangle-NO "../nix-overlays/.envrc-local" -#+BEGIN_SRC sh +#+BEGIN_SRC shell #if [[ !( -f ./nix-flakes.org) && -f ../dlang-nix-flakes.org ]]; then # # for editing purpose link to the .org file that creates ./dlang-nix-flakes/ content # ln -s ../dlang-nix-flakes.org ./nix-flakes.org @@ -267,11 +267,11 @@ fi - ${NixDirEnvVersion} #+HEADER: :tangle-NO "../nix-overlays/.envrc-nix" -#+BEGIN_SRC sh +#+BEGIN_SRC shell NIX_ENFORCE_PURITY=1 # - https://github.com/nix-community/nix-direnv -NixDirEnvVersion="<<direnv-version>>" -NixDirEnvSHA="<<direnv-sha>>" +NixDirEnvVersion="<<direnv_version>>" +NixDirEnvSHA="<<direnv_hash>>" if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}" fi @@ -291,54 +291,7 @@ use flake . #use flake .#default #+END_SRC -*** 3.0.6 - -#+NAME: direnv-version -#+BEGIN_SRC sh -3.0.6 -#+END_SRC - -#+NAME: direnv-sha -#+BEGIN_SRC sh -sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= -#+END_SRC - -*** 3.0.4 - -#+BEGIN_SRC sh -3.0.4 -#+END_SRC - -#+BEGIN_SRC sh -sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= -#+END_SRC - -*** 3.0.0 - -#+BEGIN_SRC sh -3.0.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= -#+END_SRC - -*** 2.4.0 - -#+BEGIN_SRC sh -2.4.0 -#+END_SRC - -#+BEGIN_SRC sh -sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= -#+END_SRC - -#+NAME: direnv-sha_ -#+BEGIN_SRC sh -sha256-0000000000000000000000000000000000000000000= -#+END_SRC - -#+BEGIN_SRC sh +#+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 @@ -828,75 +781,6 @@ hashes = { }; #+END_SRC -*** versions SET -**** selected version SET OK ✓ -***** version & sha256 nix composite - -#+NAME: ldc_version_info -#+BEGIN_SRC nix -version = "<<ldc_version>>"; -sha256 = "<<ldc_hash>>"; -#+END_SRC - -***** select version SET OK ✓ - -#+NAME: ldc_version -#+BEGIN_SRC nix -<<ldc_version_1_40_0>> -#+END_SRC - -#+NAME: ldc_hash -#+BEGIN_SRC nix -<<ldc_hash_1_40_0>> -#+END_SRC - -#+NAME: ldc_llvm_set -#+BEGIN_SRC nix -<<ldc_llvm_set_1_40_0>> -#+END_SRC - -**** 1.40 OK ✓ -***** 1.40.0 OK ✓ - - - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.40.0-beta6.tar.gz - - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz - -#+NAME: ldc_version_1_40_0 -#+BEGIN_SRC nix -1.40.0 -#+END_SRC - -#+NAME: ldc_hash_1_40_0 -#+BEGIN_SRC nix -sha256-LT85DlAebecPpBUgZP0ayKTVrTUqN6DMJVEWTatLOxY= -#+END_SRC - -#+NAME: ldc_llvm_set_1_40_0 -#+BEGIN_SRC nix -llvm_19 -#+END_SRC - -**** 1.39 OK ✓ -***** 1.39.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.39.0.tar.gz -- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz - -#+NAME: ldc_version_1_39_0 -#+BEGIN_SRC nix -1.39.0 -#+END_SRC - -#+NAME: ldc_hash_1_39_0 -#+BEGIN_SRC nix -sha256-ZiG0ATsY6Asu2nus3Y404fvqIwtKYoHl1JRUDU5A6mo= -#+END_SRC - -#+NAME: ldc_llvm_set_1_39_0 -#+BEGIN_SRC nix -llvm_18 -#+END_SRC - ** dmd OK ✓ *** info **** links @@ -1276,189 +1160,6 @@ stdenv.mkDerivation { } #+END_SRC -*** versions SET -**** selected version SET OK ✓ - -#+NAME: dmd_version -#+BEGIN_SRC nix -<<dmd_version_2_109_1>> -#+END_SRC - -#+NAME: dmd_hash -#+BEGIN_SRC nix -<<dmd_hash_2_109_1>> -#+END_SRC - -#+NAME: phobos_hash -#+BEGIN_SRC nix -<<phobos_hash_2_109_1>> -#+END_SRC - -**** 2.109.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.1.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.109.1.tar.gz - -#+NAME: dmd_version_2_109_1 -#+BEGIN_SRC nix -2.109.1 -#+END_SRC - -#+NAME: phobos_hash_2_109_1 -#+BEGIN_SRC nix -sha256-73I0k7tCBwe5tl4K6uMs3/nT2JTZ2SppFYzmokS4W5Y= -#+END_SRC - -#+NAME: dmd_hash_2_109_1 -#+BEGIN_SRC nix -sha256-3nCDPZnb4eQZmhYYxcH6qOmsP8or0KYuzAa5g/C9xdU= -#+END_SRC - -**** 2.109.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.109.0.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.109.0.tar.gz - -#+NAME: dmd_version_2_109_0 -#+BEGIN_SRC nix -2.109.0 -#+END_SRC - -#+NAME: dmd_hash_2_109_0 -#+BEGIN_SRC nix -sha256-unAZgyZyT6qomlj6pdlOx4h1SKuDjutl1/0FM9AhBWc= -#+END_SRC - -#+NAME: phobos_hash_2_109_0 -#+BEGIN_SRC nix -sha256-b91FeluFqhmjHd1wwkyq98QzIlwjE646xNj2n6hP3aM= -#+END_SRC - -**** 2.108.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.108.0.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.108.0.tar.gz - -#+NAME: dmd_version_2_108_0 -#+BEGIN_SRC nix -2.108.0 -#+END_SRC - -#+NAME: dmd_hash_2_108_0 -#+BEGIN_SRC nix -sha256-tlWcFgKtXzfqMMkOq4ezhZHdYCXFckjN5+m6jO4VH0U= -#+END_SRC - -#+NAME: phobos_hash_2_108_0 -#+BEGIN_SRC nix -sha256-uU8S4rABOfhpKh+MvSbclkbdf0hrsuKF8SIpWMnPpfU= -#+END_SRC - -**** 2.107.0 - skip (asleep here apparently) - -- asleep apparently - -#+NAME: dmd_version_2_107_0 -#+BEGIN_SRC nix -2.107.0 -#+END_SRC - -#+NAME: dmd_hash_2_107_0 -#+BEGIN_SRC nix -<<sha256-blank>> -#+END_SRC - -#+NAME: phobos_hash_2_107_0 -#+BEGIN_SRC nix -<<sha256-blank>> -#+END_SRC - -**** 2.106.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.106.1.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.106.1.tar.gz - -#+NAME: dmd_version_2_106_1 -#+BEGIN_SRC nix -2.106.1 -#+END_SRC - -#+NAME: dmd_hash_2_106_1 -#+BEGIN_SRC nix -sha256-vjYa/Pxrz7J2htXT+fa+xaeen/Vxne++lELbHTSXBK8= -#+END_SRC - -#+NAME: phobos_hash_2_106_1 -#+BEGIN_SRC nix -sha256-yRL9ub3u4mREG9PVxBvgQ/LDXD57RadPTZ2h08qyh/s= -#+END_SRC - -**** 2.104.0 KO ✗ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.104.0.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.104.0.tar.gz - -#+NAME: dmd_version_2_104_0 -#+BEGIN_SRC nix -2.104.0 -#+END_SRC - -#+NAME: dmd_hash_2_104_0 -#+BEGIN_SRC nix -sha256-yv+uW6cYAId2HK/YSPxsR9Xt0o3LWa97z8KyzjFik6s= -#+END_SRC - -#+NAME: phobos_hash_2_104_0 -#+BEGIN_SRC nix -sha256-cWp36Gd/lh3gy21bf9z0/RqzlJmf6ypmx72aMeakcec= -#+END_SRC - -**** 2.102.2 KO ✗ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.102.2.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.102.2.tar.gz - -#+NAME: dmd_version_2_102_2 -#+BEGIN_SRC nix -2.102.2 -#+END_SRC - -#+NAME: dmd_hash_2_102_2 -#+BEGIN_SRC nix -sha256-der9nb31hJ+K1aJZdzIgs8+eRgVVsH97QnYEnVbKUws= -#+END_SRC - -#+NAME: phobos_hash_2_102_2 -#+BEGIN_SRC nix -sha256-SracmUm2aY/LDCyDqYuVS39pCbwO8UCL3TSB0CVHpHE= -#+END_SRC - -**** 2.100.2 KO ✗ - -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.100.2.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/druntime/archive/refs/tags/v2.100.2.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.100.2.tar.gz - -#+NAME: dmd_version_2_100_2 -#+BEGIN_SRC nix -2.100.2 -#+END_SRC - -#+NAME: dmd_hash_2_100_2 -#+BEGIN_SRC nix -sha256-o4+G3ARXIGObYHtHooYZKr+Al6kHpiwpMIog3i4BlDM= -#+END_SRC - -#+NAME: druntime_hash_2_100_2 -#+BEGIN_SRC nix -sha256-qXvY1ECN4mPwOGgOE1FWwvxoRvlSww3tGLWgBdhzAKo= -#+END_SRC - -#+NAME: phobos_hash_2_100_2 -#+BEGIN_SRC nix -sha256-kTHRaAKG7cAGb4IE/NGHWaZ8t7ZceKj03l6E8wLzJzs= -#+END_SRC - ** dub OK *** info **** links @@ -1599,199 +1300,6 @@ ldc dmd #+END_SRC -*** versions SET -**** selected version SET - -#+NAME: dub_version -#+BEGIN_SRC nix -<<dub_version_1_38_1>> -#+END_SRC - -#+NAME: dub_hash -#+BEGIN_SRC nix -<<dub_hash_1_38_1>> -#+END_SRC - -**** 1.38 OK ✓ -***** 1.38.1 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.38.1.tar.gz - -#+NAME: dub_version_1_38_1 -#+BEGIN_SRC nix -1.38.1 -#+END_SRC - -#+NAME: dub_hash_1_38_1 -#+BEGIN_SRC nix -sha256-8Lr/0sx4SKwU1aNOxZArta0RXpDM+EWl29ZsPDdPWFo= -#+END_SRC - -**** 1.36 OK ✓ -***** 1.36.0 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.36.0.tar.gz - -#+NAME: dub_version_1_36_0 -#+BEGIN_SRC nix -1.36.0 -#+END_SRC - -#+NAME: dub_hash_1_36_0 -#+BEGIN_SRC nix -sha256-S8pls9zxbGAQTwqYf4bDT2q7Ow12S8bBsJE5UmsACBs= -#+END_SRC - -**** 1.35 OK ✓ -***** 1.35.0 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.35.0.tar.gz - -#+NAME: dub_version_1_35_0 -#+BEGIN_SRC nix -1.35.0 -#+END_SRC - -#+NAME: dub_hash_1_35_0 -#+BEGIN_SRC nix -sha256-hC46XKE6lLLMLGMGl4vDnLDBQy6P/Z7o3ayDJj0Sois= -#+END_SRC - -**** 1.34 OK ✓ -***** 1.34.0 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.34.0.tar.gz - -#+NAME: dub_version_1_34_0 -#+BEGIN_SRC nix -1.34.0 -#+END_SRC - -#+NAME: dub_hash_1_34_0 -#+BEGIN_SRC nix -sha256-hC46XKE6lLLMLGMGl4vDnLDBQy6P/Z7o3ayDJj0Sois= -#+END_SRC - -**** 1.33 OK ✓ -***** 1.33.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.1.tar.gz - -#+NAME: dub_version_1_33_1 -#+BEGIN_SRC nix -1.33.1 -#+END_SRC - -#+NAME: dub_hash_1_33_1 -#+BEGIN_SRC nix -sha256-QFgUsO04VRXBDjGI5QQs7u9XrexG7/V34TMgJP1D8yA= -#+END_SRC - -**** 1.33.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.0.tar.gz - -#+NAME: dub_version_1_33_0 -#+BEGIN_SRC nix -1.33.0 -#+END_SRC - -#+NAME: dub_hash_1_33_0 -#+BEGIN_SRC nix -sha256-4Mha7WF6cg3DIccfpvOnheuvgfziv/7wo8iFsPXO4yY= -#+END_SRC - -**** 1.32.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.32.1.tar.gz - -#+NAME: dub_version_1_32_1 -#+BEGIN_SRC nix -1.32.1 -#+END_SRC - -#+NAME: dub_hash_1_32_1 -#+BEGIN_SRC nix -sha256-5pW3Fu3PQ1ZLJnsuh7fPpEBNbVQgGfFyiuMrAVOJKQA= -#+END_SRC - -- ISSUES from 1.31.0 continuing - -**** 1.31.1 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.31.1.tar.gz - -#+NAME: dub_version_1_31_1 -#+BEGIN_SRC nix -1.31.1 -#+END_SRC - -#+NAME: dub_hash_1_31_1 -#+BEGIN_SRC nix -sha256-dp64D51ypowXS1+EYKRXh5hpa3rMmiotvKO2FW+i92w= -#+END_SRC - -- ISSUES from 1.31.0 continuing - -**** 1.31.0 OK ✓ NOTE - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.31.0.tar.gz - -behavior change in dub requiring the setting of pwd in buildPhase - -#+NAME: dub_version_1_31_0 -#+BEGIN_SRC nix -1.31.0 -#+END_SRC - -#+NAME: dub_hash_1_31_0 -#+BEGIN_SRC nix -sha256-Ki8HJOfWFM1tF86s7Ng3STgC/uu5acVTP0Dj87M0l54= -#+END_SRC - -- ISSUES from 1.31.0 continuing -**** 1.30.0 OK ✓ - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.30.0.tar.gz - -#+NAME: dub_version_1_30_0 -#+BEGIN_SRC nix -1.30.0 -#+END_SRC - -#+NAME: dub_hash_1_30_0 -#+BEGIN_SRC nix -sha256-iVl7bjblvIxvrUX7Phq6h4AIAmZjNVkGYYFA1hhsE7c= -#+END_SRC - -**** 1.29.1 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.29.1.tar.gz - -#+NAME: dub_version_1_29_1 -#+BEGIN_SRC nix -1.29.1 -#+END_SRC - -#+NAME: dub_hash_1_29_1 -#+BEGIN_SRC nix -sha256-XDV9p1bDhRL6gX+nizzjoErNJm8NnQK5O8wNnizloss= -#+END_SRC - -**** 1.28.0 - -- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.28.0.tar.gz - -#+NAME: dub_version_1_28_0 -#+BEGIN_SRC nix -1.28.0 -#+END_SRC - -#+NAME: dub_hash_1_28_0 -#+BEGIN_SRC nix -sha256-GOeaQyu8Y/DxZEAJPdlGH9ie/ZRTqvAw2jjvM3dESbg= -#+END_SRC - ** dtools OK ✓ *** info **** links @@ -1868,77 +1376,89 @@ stdenv.mkDerivation rec { } #+END_SRC -*** versions SET - -- https://github.com/dlang/tools - -**** selected version SET OK ✓ +** versions SET +*** direnv +***** select version SET OK ✓ -#+NAME: dtools_version -#+BEGIN_SRC nix -<<dtools_version_2_103_1>> +#+NAME: direnv_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-version()>> #+END_SRC -#+NAME: dtools_hash -#+BEGIN_SRC nix -<<dtools_hash_2_103_1>> +#+NAME: direnv_hash +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-hash()>> #+END_SRC -**** 2.103.1 OK ✓ +*** ldc +***** version & sha256 nix composite -- https://github.com/dlang/tools/releases/tag/v2.103.1 +#+NAME: ldc_version_info +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version-info()>> +#+END_SRC -#+NAME: dtools_version_2_103_1 -#+BEGIN_SRC nix -2.103.1 +***** select version SET OK ✓ + +#+NAME: ldc_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version()>> #+END_SRC -#+NAME: dtools_hash_2_103_1 -#+BEGIN_SRC nix -sha256-XM4gUxcarQCOBR8W/o0iWAI54PyLDkH6CsDce22Cnu4= +#+NAME: ldc_hash +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-hash()>> #+END_SRC -**** 2.102.2 +#+NAME: ldc_llvm_set +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-llvm-set()>> +#+END_SRC -- https://github.com/dlang/tools/releases/tag/v2.102.2 +*** dmd -#+NAME: dtools_version_2_102_2 -#+BEGIN_SRC nix -2.102.2 +#+NAME: dmd_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dmd-version()>> #+END_SRC -#+NAME: dtools_hash_2_102_2 -#+BEGIN_SRC nix -sha256-XM4gUxcarQCOBR8W/o0iWAI54PyLDkH6CsDce22Cnu4= +#+NAME: dmd_hash +#+BEGIN_SRC org +<<./nix-develop-dlang-shared.org:dmd-hash()>> #+END_SRC -**** 2.095.1 current nixpkgs 20-03-17 OK ✓ +#+NAME: phobos_hash +#+BEGIN_SRC org +<<./nix-develop-dlang-shared.org:phobos-hash()>> +#+END_SRC -- https://github.com/dlang/tools/releases/tag/v2.095.1 +*** dub -#+NAME: dtools_version_2_095_1 -#+BEGIN_SRC nix -2.095.1 +#+NAME: dub_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dub-version()>> #+END_SRC -#+NAME: dtools_hash_2_095_1 +#+NAME: dub_hash #+BEGIN_SRC nix -sha256:0rdfk3mh3fjrb0h8pr8skwlq6ac9hdl1fkrkdl7n1fa2806b740b +<<./nix-develop-dlang-shared.org:dub-hash()>> #+END_SRC -** sha256 blank_hash +*** dtools -#+NAME: sha256-blank -#+BEGIN_SRC nix -sha256-0000000000000000000000000000000000000000000= +#+NAME: dtools_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-version()>> #+END_SRC -#+NAME: blank_hash -#+BEGIN_SRC nix -sha256-0000000000000000000000000000000000000000000= +#+NAME: dtools_hash +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-hash()>> #+END_SRC -#+NAME: assumed_hash -#+BEGIN_SRC nix -sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -#+END_SRC +* __END__ diff --git a/org/ocda.org b/org/ocda.org index dca0098..148edf8 100644 --- a/org/ocda.org +++ b/org/ocda.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -75,7 +75,7 @@ mixin docAbstractionFunctions; #+HEADER: :noweb yes #+BEGIN_SRC d <<docAbstractionInit>> -<<docAbstractionInitSubstitutions>> +<<docAbstractionInitSubstitutionsDebug>> <<docAbstractionMainLoopSrcByLine>> <<docAbstractionPostMainLoop>> <<docAbstractionReturnsStruct>> @@ -109,8 +109,8 @@ scope(exit) { anchor_tag = ""; } mixin spineNode; -auto node_para_int_ = node_metadata_para_int; -auto node_para_str_ = node_metadata_para_str; +int[string] node_para_int_ = node_metadata_para_int; +string[string] node_para_str_ = node_metadata_para_str; ObjGenericComposite comp_obj_; line_occur = [ "heading" : 0, @@ -221,7 +221,7 @@ int cnt1 = 1; int cnt2 = 1; int cnt3 = 1; *** abstraction init substitutions -#+NAME: docAbstractionInitSubstitutions +#+NAME: docAbstractionInitSubstitutionsDebug #+HEADER: :noweb yes #+BEGIN_SRC d debug (substitutions) { @@ -255,7 +255,7 @@ debug (substitutions) { #+NAME: docAbstractionMainLoopSrcByLine #+HEADER: :noweb yes #+BEGIN_SRC d -auto loopMarkupSrcByLine( +_loopMarkupSrcByLineStruct loopMarkupSrcByLine( char[][] markup_sourcefile_content, string[string] an_object, uint[string] pith, @@ -364,7 +364,7 @@ auto loopMarkupSrcByLine( ._doc_header_and_make_substitutions_(conf_make_meta) ._doc_header_and_make_substitutions_fontface_(conf_make_meta); { - auto _get = line.txt_by_line_block_quote(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_quote(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -377,7 +377,7 @@ auto loopMarkupSrcByLine( ._doc_header_and_make_substitutions_fontface_(conf_make_meta) .replaceAll(rgx.para_delimiter, mkup.br_line_spaced ~ "$1"); { - auto _get = line.txt_by_line_block_group(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_group(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -393,7 +393,7 @@ auto loopMarkupSrcByLine( .replaceAll(rgx.spaces_keep, (m.captures[1]).translate([ ' ' : mkup.nbsp ])); } { - auto _get = line.txt_by_line_block_block(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_block(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -402,7 +402,7 @@ auto loopMarkupSrcByLine( continue; } else if (pith["block_is"] == eN.blk_is.poem) { { - auto _get = line.txt_by_line_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg); + ST_txt_by_line_block_poem _get = line.txt_by_line_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg); { an_object = _get.this_object; pith = _get.pith; @@ -436,7 +436,7 @@ auto loopMarkupSrcByLine( object_number_poem["start"] = obj_cite_digits.object_number.to!string; } { - auto _get = line.txt_by_line_block_start(pith, dochas, object_number_poem); + ST_txt_by_line_block_start _get = line.txt_by_line_block_start(pith, dochas, object_number_poem); { pith = _get.pith; dochas = _get.dochas; @@ -466,7 +466,7 @@ auto loopMarkupSrcByLine( || line.matchFirst(rgx.book_index_item_open) || pith["section"] == eN.sect.book_index) { { // book_index - auto _get = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action); + ST_flow_book_index _get = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action); { an_object = _get.this_object; pith = _get.pith; @@ -488,7 +488,7 @@ auto loopMarkupSrcByLine( comp_obj_comment.text = an_object[an_object_key].strip; the_document_body_section ~= comp_obj_comment; { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -505,7 +505,7 @@ auto loopMarkupSrcByLine( && (pith["make_headings"] == eN.bi.off)) { // heading found { - auto _get = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith); + ST_flow_heading_found _get = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith); { heading_match_str = _get.heading_match_str; heading_match_rgx = _get.heading_match_rgx; @@ -520,7 +520,7 @@ auto loopMarkupSrcByLine( ) { // heading make set { - auto _get = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith); + ST_flow_heading_make_set _get = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith); { line = _get.line; an_object = _get.this_object; @@ -558,7 +558,7 @@ auto loopMarkupSrcByLine( ._doc_header_and_make_substitutions_(conf_make_meta) ._doc_header_and_make_substitutions_fontface_(conf_make_meta); { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; @@ -587,7 +587,7 @@ auto loopMarkupSrcByLine( } else if (pith["block_state"] == eN.blk_state.closing) { // line empty, with blocks flag { - auto _get = line.flow_block_flag_line_empty_( + ST_flow_block_flag_line_empty _get = line.flow_block_flag_line_empty_( an_object, bookindex_extract_hash, the_document_body_section, @@ -703,7 +703,7 @@ auto loopMarkupSrcByLine( _anchor_tag = obj_cite_digits.identifier; // (incrementally build toc) table of contents here! { - auto _get = obj_im.flow_table_of_contents_gather_headings( + ST_flow_table_of_contents_gather_headings _get = obj_im.flow_table_of_contents_gather_headings( an_object, conf_make_meta, tag_in_seg, @@ -724,7 +724,7 @@ auto loopMarkupSrcByLine( if (an_object["lev_markup_number"].to!int <= 4) { segnames["epub"] ~= tag_in_seg["seg_lv1to4"]; } - auto comp_obj_ = node_construct.node_emitter_heading( + ObjGenericComposite comp_obj_ = node_construct.node_emitter_heading( an_object, tag_in_seg, lev_anchor_tag, @@ -745,7 +745,7 @@ auto loopMarkupSrcByLine( the_document_body_section ~= comp_obj_; debug(objectrelated1) { writeln(line); } // check { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -766,7 +766,7 @@ auto loopMarkupSrcByLine( an_object["bookindex_nugget"] = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; bookindex_unordered_hashes = bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, tag_in_seg); an_object["is"] = "para"; - auto comp_obj_ = node_construct.node_location_emitter( + ObjGenericComposite comp_obj_ = node_construct.node_location_emitter( content_non_header, tag_in_seg, lev_anchor_tag, @@ -798,7 +798,7 @@ auto loopMarkupSrcByLine( the_document_body_section ~= comp_obj_; tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -872,7 +872,7 @@ auto loopMarkupSrcByLine( return ret; } { // loopMarkupSrcByLine - auto _doc_by_line = loopMarkupSrcByLine(markup_sourcefile_content, an_object, pith); + _loopMarkupSrcByLineStruct _doc_by_line = loopMarkupSrcByLine(markup_sourcefile_content, an_object, pith); the_document_toc_section = _doc_by_line.toc; the_document_body_section = _doc_by_line.body; the_document_glossary_section = _doc_by_line.glossary; @@ -1534,7 +1534,7 @@ struct DocHas_ { return tag_assoc; } } -auto doc_has() { +DocHas_ doc_has() { return DocHas_(); } // the doc to be returned diff --git a/org/ocda_functions.org b/org/ocda_functions.org index 070b842..baae83e 100644 --- a/org/ocda_functions.org +++ b/org/ocda_functions.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -1571,6 +1571,62 @@ ST_txt_by_line_block_start txt_by_line_block_start()( pith["block_is"] = eN.blk_is.table; pith["block_state"] = eN.blk_state.on; pith["block_delim"] = eN.blk_delim.curly_special; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_code_open)) { + dochas["codeblock"]++; + an_object["lang"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : ""; + debug(codequotemarks) { writefln( "* [code quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + } else if (auto m = line.matchFirst(rgx.block_quotemarks_poem_open)) { + dochas["poem"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + object_number_poem["start"] = obj_cite_digits.object_number.to!string; + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + pith["verse_new"] = eN.bi.on; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_group_open)) { + dochas["group"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(group) { writefln( "* [group quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_block_open)) { + dochas["block"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(block) { writefln( "* [block quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_quote_open)) { + dochas["quote"]++; + an_object["syntax"] = ""; + an_object["attrib"] = m["attrib"].to!string; + an_object["lang"] = m["lang"].to!string; + debug(quote) { writefln( "* [quote quotemarks] %s", line); // quote (quotemarks) open + } + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_table_open)) { // quotemarks table open + debug(table) { writefln( "* [table quotemarks] %s", line); } + dochas["table"] ++; + an_object["table_head"] = m["attrib"].to!string; + an_object["block_type"] = "quotemarks"; + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; } else if (auto m = line.matchFirst(rgx.block_tic_code_open)) { dochas["codeblock"]++; an_object["lang"] = ""; @@ -1654,6 +1710,17 @@ ST_txt_by_line_block_generic txt_by_line_block_group()( debug(group) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(group) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(group) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(group) { writeln(line); } @@ -1692,6 +1759,17 @@ ST_txt_by_line_block_generic txt_by_line_block_block()( debug(block) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(block) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(block) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(block) { writeln(line); } @@ -1816,6 +1894,94 @@ ST_txt_by_line_block_poem txt_by_line_block_poem(CMM)( ++cntr; } } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (auto m = line.matchFirst(rgx.block_quotemarks_close)) { + an_object[an_object_key] = "verse"; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + if (processing.length > 0) { + an_object[an_object_key] = processing["verse"]; + } + if (an_object.length > 0) { + debug(poem) { writeln(__LINE__); writeln(obj_cite_digits.object_number, line); } + processing.remove("verse"); + an_object["is"] = "verse"; + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_number_poem["end"] = obj_cite_digits.object_number.to!string; + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + processing["verse"] ~= line ~= "\n"; + if (pith["verse_new"] == eN.bi.on) { + obj_cite_digits = ocn_emit(pith["ocn"]); + pith["verse_new"] = eN.bi.off; + } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { + processing["verse"] = processing["verse"].stripRight; + pith["verse_new"] = eN.bi.on; + verse_line = eN.bi.off; + } + if (pith["verse_new"] == eN.bi.on) { + verse_line = 1; + an_object[an_object_key] = processing["verse"]; + debug(poem) { writefln( + "* %s tic\n%s", + obj_cite_digits.object_number, + an_object[an_object_key] + ); + } + processing.remove("verse"); + an_object["is"] = "verse"; + auto comp_obj_location + = node_construct.node_location_emitter( + content_non_header, + tag_in_seg, + lev_anchor_tag, + tag_assoc, + obj_cite_digits, + cntr, + heading_ptr-1, + an_object["is"] + ); + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (auto m = line.matchFirst(rgx.block_tic_close)) { an_object[an_object_key] = "verse"; @@ -1934,6 +2100,19 @@ ST_txt_by_line_block_generic txt_by_line_block_code()( debug(codecurly) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key] + .replaceFirst(rgx.newline_eol_delimiter_only, "") + .stripRight; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(codetic) { writeln(line); } @@ -2002,6 +2181,16 @@ ST_txt_by_line_block_generic txt_by_line_block_code()( debug(table) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(table) { writeln(line); } + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(table) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(table) { writeln(line); } @@ -2045,6 +2234,17 @@ ST_txt_by_line_block_generic txt_by_line_block_quote()( debug(quote) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(quote) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(quote) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(quote) { writeln(line); } @@ -3899,7 +4099,7 @@ ST_the_section build_the_glossary_section( } } else { // para { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; @@ -4206,7 +4406,7 @@ ST_the_section build_the_blurb_section(Opt) ( tag_assoc[comp_obj_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_.tags.segment_anchor_tag_epub; } else if (!(line.empty)) { { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; diff --git a/org/ocda_obj_setter.org b/org/ocda_obj_setter.org index 576c693..f37df13 100644 --- a/org/ocda_obj_setter.org +++ b/org/ocda_obj_setter.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -437,6 +437,7 @@ static auto eN() { tic, curly_special, tic_special, + quotemarks, } } return _e(); diff --git a/org/out_curate_metadata.org b/org/out_curate_metadata.org index 40a47e7..f01229a 100644 --- a/org/out_curate_metadata.org +++ b/org/out_curate_metadata.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/out_latex.org b/org/out_latex.org index 9685554..9767286 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:latex:pdf: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -2050,7 +2050,7 @@ if (paper_set.is_portrait) { ***** (a4, a5, b4, letter, legal) * (portrait & landscape) -#+BEGIN_SRC sh +#+BEGIN_SRC shell $SpineBIN/spine --verbose --latex --set-papersize="a4,letter.portrait,b4.portrait" --output="$SpineOUT" $SpinePOD/* #+END_SRC diff --git a/org/out_metadata.org b/org/out_metadata.org index 52a2481..92f3eda 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:metadata: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/out_odt.org b/org/out_odt.org index 4344473..75ea565 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:xml:odt: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 991c4ad..b9ab903 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:db:sql:sqlite: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -81,11 +81,8 @@ long _metadata_tid_lastrowid; #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteHubBuildTablesAndPopulate() { - void SQLiteHubBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); + void SQLiteHubBuildTablesAndPopulate(D)(D doc) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -93,20 +90,19 @@ template SQLiteHubBuildTablesAndPopulate() { } catch (FileException ex) { } } template SQLiteDbStatementComposite() { - void SQLiteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDbStatementComposite(Db,D)( + Db db, + D doc ) { <<sqlite_db_statement_composite_collection>> - if (doc_matters.opt.action.vox_gt0) { + if (doc.matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file); } } } try { auto db = Database(pth_sqlite.sqlite_file); - SQLiteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDbStatementComposite!()(db, doc); } catch (FileException e) { writeln("Failed (FileException): ", e.msg, " ", pth_sqlite.sqlite_file); @@ -141,24 +137,20 @@ template SQLiteHubBuildTablesAndPopulate() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteHubDiscreteBuildTablesAndPopulate() { - void SQLiteHubDiscreteBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); - auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); // doc_matters.db_path + void SQLiteHubDiscreteBuildTablesAndPopulate(D)(D doc) { + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); + auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc.matters.output_path, doc.matters.src.language); // doc.matters.db_path if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { pth_sqlite.base.mkdirRecurse; } catch (FileException ex) { } } - auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename)); + auto db = Database(pth_sqlite.sqlite_file(doc.matters.src.filename)); template SQLiteDiscreteDbStatementComposite() { - void SQLiteDiscreteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDiscreteDbStatementComposite(Db,D)( + Db db, + D doc ) { try { <<sqlite_db_statement_composite_discrete>> @@ -185,12 +177,12 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { import core.runtime; core.runtime.Runtime.terminate(); } - if (doc_matters.opt.action.vox_gt0) { - writeln(" ", pth_sqlite.sqlite_file(doc_matters.src.filename)); + if (doc.matters.opt.action.vox_gt0) { + writeln(" ", pth_sqlite.sqlite_file(doc.matters.src.filename)); } } } - SQLiteDiscreteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDiscreteDbStatementComposite!()(db, doc); } } #+END_SRC @@ -245,9 +237,7 @@ template SQLinsertDelimiter() { } } template SQLiteFormatAndLoadObject() { - auto SQLiteFormatAndLoadObject(M)( - M doc_matters, - ) { + auto SQLiteFormatAndLoadObject(M)(M doc_matters) { mixin spineRgxOut; mixin spineRgxXHTML; struct sqlite_format_and_load_objects { @@ -313,9 +303,7 @@ template SQLiteTablesReCreate() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteDeleteDocument() { - string SQLiteDeleteDocument(M)( - M doc_matters, - ) { + string SQLiteDeleteDocument(M)(M doc_matters) { <<sqlite_formatted_delete_format>> <<sqlite_formatted_delete_sql>> <<sqlite_formatted_delete_values>> @@ -330,9 +318,7 @@ template SQLiteDeleteDocument() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertMetadata() { - string SQLiteInsertMetadata(M)( - M doc_matters, - ) { + string SQLiteInsertMetadata(M)(M doc_matters) { <<sqlite_formatted_insertions_doc_matters_metadata_format>> <<sqlite_formatted_insertions_doc_matters_metadata_sql>> <<sqlite_formatted_insertions_doc_matters_metadata_sql_values>> @@ -348,9 +334,7 @@ template SQLiteInsertMetadata() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertMetadataTopics() { - string SQLiteInsertMetadataTopics(M)( - M doc_matters, - ) { + string SQLiteInsertMetadataTopics(M)(M doc_matters) { <<sqlite_formatted_insertions_topic_register_loop>> <<sqlite_formatted_insertions_topic_register_format>> <<sqlite_formatted_insertions_topic_register_sql>> @@ -368,12 +352,9 @@ template SQLiteInsertMetadataTopics() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertDocObjectsLoop() { - string SQLiteInsertDocObjectsLoop(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); + string SQLiteInsertDocObjectsLoop(D)(D doc) { + string _uid = SQLinsertDelimiter!()(doc.matters.src.doc_uid); + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); string insertDocObjectsRow(O)(O obj) { <<sqlite_formatted_insertions_doc_objects_format>> <<sqlite_formatted_insertions_doc_objects_sql>> @@ -525,8 +506,8 @@ template SQLiteDbDrop() { #+NAME: sqlite_db_statement_composite_collection #+BEGIN_SRC d string _db_statement; -if ((doc_matters.opt.action.sqlite_db_create)) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); +if ((doc.matters.opt.action.sqlite_db_create)) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -534,27 +515,27 @@ if ((doc_matters.opt.action.sqlite_db_create)) { } catch (FileException ex) { } } _db_statement ~= SQLiteTablesReCreate!()(); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "TABLE RE-CREATE"); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "TABLE RE-CREATE"); _db_statement = []; } -if (doc_matters.opt.action.sqlite_delete) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); +if (doc.matters.opt.action.sqlite_delete) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; } -if (doc_matters.opt.action.sqlite_update) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); +if (doc.matters.opt.action.sqlite_update) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaData"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaData"); _db_statement = []; - /+ get tid (lastrowid or max) for use in doc_objects table +/ - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT DocObjects"); + /+ get tid (lastrowid or max) for use in doc.objects table +/ + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT DocObjects"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaDataTopics"); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaDataTopics"); _db_statement = []; } db.close; @@ -567,10 +548,10 @@ db.close; { string _db_statement; _db_statement ~= SQLiteTablesReCreate!()(); - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "table CREATE Tables, INSERT DocObjects"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "table CREATE Tables, INSERT DocObjects"); } db.close; #+END_SRC @@ -1534,23 +1515,23 @@ string[string] table(M,O)( #+NAME: sqlite_objects_loop #+BEGIN_SRC d -auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc_matters); +auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc.matters); string[string] obj_txt; string doc_text; string[] _insert_doc_objects; -foreach (part; doc_matters.has.keys_seq.sql) { - foreach (obj; doc_abstraction[part]) { +foreach (part; doc.matters.has.keys_seq.sql) { + foreach (obj; doc.abstraction[part]) { switch (obj.metainfo.is_of_part) { case "frontmatter": assert(part == "head", part); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1559,7 +1540,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1576,14 +1557,14 @@ foreach (part; doc_matters.has.keys_seq.sql) { writeln(__LINE__, ": ", obj.text); } } - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "para": - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1593,28 +1574,28 @@ foreach (part; doc_matters.has.keys_seq.sql) { case "block": switch (obj.metainfo.is_a) { case "quote": - obj_txt = format_and_sqlite_load.quote(doc_matters, obj); + obj_txt = format_and_sqlite_load.quote(doc.matters, obj); break; case "group": - obj_txt = format_and_sqlite_load.group(doc_matters, obj); + obj_txt = format_and_sqlite_load.group(doc.matters, obj); break; case "block": - obj_txt = format_and_sqlite_load.block(doc_matters, obj); + obj_txt = format_and_sqlite_load.block(doc.matters, obj); break; case "poem": // double check on keeping both poem & verse break; case "verse": - obj_txt = format_and_sqlite_load.verse(doc_matters, obj); + obj_txt = format_and_sqlite_load.verse(doc.matters, obj); break; case "code": - obj_txt = format_and_sqlite_load.code(doc_matters, obj); + obj_txt = format_and_sqlite_load.code(doc.matters, obj); break; case "table": - obj_txt = format_and_sqlite_load.table(doc_matters, obj); + obj_txt = format_and_sqlite_load.table(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1623,7 +1604,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1636,23 +1617,23 @@ foreach (part; doc_matters.has.keys_seq.sql) { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "glossary": assert(part == "glossary", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bibliography": assert(part == "bibliography", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bookindex": assert(part == "bookindex", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "blurb": assert(part == "blurb", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1661,7 +1642,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1672,7 +1653,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from @@ -1681,9 +1662,9 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; } if (obj.metainfo.is_a == "heading") { - if (doc_matters.opt.action.show_sqlite) { + if (doc.matters.opt.action.show_sqlite) { if (obj.metainfo.heading_lev_markup == 0) { - writeln(doc_matters.src.filename); + writeln(doc.matters.src.filename); } writeln( "markup: ", obj.metainfo.heading_lev_markup, diff --git a/org/out_src_pod.org b/org/out_src_pod.org index c16280e..e72d332 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:source:pod: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -533,7 +533,7 @@ void zipArchiveDigest(M,F,D)(M doc_matters, F fn_pod, D _digests) { *** pod/{pods/} #+NAME: pod_gitignore -#+BEGIN_SRC sh +#+BEGIN_SRC shell # git ls-files --others --exclude-from=.git/info/exclude ,* !.gitignore @@ -611,7 +611,7 @@ tmp/** *** document pod structure #+NAME: pod_gitignore -#+BEGIN_SRC sh +#+BEGIN_SRC shell # git ls-files --others --exclude-from=.git/info/exclude ,* !.gitignore @@ -641,7 +641,7 @@ tmp/** *** pod po4a structure #+NAME: pod_gitignore -#+BEGIN_SRC sh +#+BEGIN_SRC shell # git ls-files --others --exclude-from=.git/info/exclude ,* !.gitignore diff --git a/org/out_xmls.org b/org/out_xmls.org index c3b9aab..8d0b475 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:xml: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -20,7 +20,7 @@ #+NAME: year #+BEGIN_SRC text -2024 +2025 #+END_SRC * xml offspring (xhtml html epub) @@ -1766,10 +1766,7 @@ module sisudoc.io_out.html; template outputHTML() { <<output_imports_xml>> mixin outputXHTMLs; - void scroll(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void scroll(D)(D doc) { <<output_html_scroll_0>> <<output_html_scroll_loop_parts>> <<output_html_scroll_is_frontmatter>> @@ -1778,10 +1775,7 @@ template outputHTML() { <<output_html_scroll_close_is_case>> } <<output_html_scroll_scroll_write_output>> - void seg(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void seg(D)(D doc) { <<output_html_seg_0>> <<output_html_seg_loop_parts>> <<output_html_seg_is_heading>> @@ -1808,7 +1802,7 @@ auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); string[] doc_html; -string[] doc; +string[] doc_out; string suffix = ".html"; string previous_section = ""; string delimit = ""; @@ -1818,8 +1812,8 @@ string delimit = ""; #+NAME: output_html_scroll_loop_parts #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.scroll) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.scroll) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); switch (obj.metainfo.is_of_part) { @@ -1834,14 +1828,14 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "toc": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1850,7 +1844,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1868,14 +1862,14 @@ case "body": assert(section == "body" || "head"); case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "para": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1885,28 +1879,28 @@ case "body": assert(section == "body" || "head"); case "block": switch (obj.metainfo.is_a) { case "quote": - doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc.matters); break; case "group": - doc_html ~= xhtml_format.group_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.group_scroll(_txt, obj, doc.matters); break; case "block": - doc_html ~= xhtml_format.block_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.block_scroll(_txt, obj, doc.matters); break; case "poem": break; case "verse": - doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc.matters, suffix); break; case "code": - doc_html ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html ~= xhtml_format.table(_txt, obj, doc.matters); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1915,7 +1909,7 @@ case "body": assert(section == "body" || "head"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1934,29 +1928,29 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "endnote": assert(section == "endnotes"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "glossary": assert(section == "glossary"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bibliography": assert(section == "bibliography"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bookindex": assert(section == "bookindex"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "blurb": assert(section == "blurb"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "tail": assert(section == "tail"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1965,7 +1959,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1976,7 +1970,7 @@ case "comment": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -1992,23 +1986,23 @@ default: } } } -doc = xhtml_format.html_head(doc_matters, "scroll") +doc_out = xhtml_format.html_head(doc.matters, "scroll") ~ doc_html ~ xhtml_format.dom_close -~ xhtml_format.tail(doc_matters); -scroll_write_output(doc, doc_matters); +~ xhtml_format.tail(doc.matters); +scroll_write_output(doc_out, doc.matters); #+END_SRC *** write output file #+NAME: output_html_scroll_scroll_write_output #+BEGIN_SRC d -@trusted void scroll_write_output(D,M)( - D doc, +@trusted void scroll_write_output(O,M)( + O doc_out, M doc_matters, ) { debug(asserts) { - static assert(is(typeof(doc) == string[])); + static assert(is(typeof(doc_out) == string[])); } auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { @@ -2017,7 +2011,7 @@ scroll_write_output(doc, doc_matters); } { auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); - foreach (o; doc) { + foreach (o; doc_out) { f.writeln(o); } } @@ -2054,7 +2048,6 @@ static auto rgx_xhtml = RgxXHTML(); auto xhtml_format = outputXHTMLs(); string[][string] doc_html; string[][string] doc_html_endnotes; -string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string previous_seg_filename = ""; @@ -2067,8 +2060,8 @@ string delimit = ""; #+NAME: output_html_seg_loop_parts #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); #+END_SRC @@ -2102,33 +2095,33 @@ if (obj.metainfo.is_a == "heading") { top_level_headings[3] = ""; goto default; default: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); top_level_headings[obj.metainfo.heading_lev_markup] = t[0]; break; } break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg"); - auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.html_head(doc.matters, "seg"); + auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc.matters); doc_html[segment_filename] ~= navigation_bar.toc_pre_next; previous_seg_filename = segment_filename; foreach (top_level_heading; top_level_headings) { doc_html[segment_filename] ~= top_level_heading; } - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; - doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc.matters); doc_html_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -2136,7 +2129,7 @@ if (obj.metainfo.is_a == "heading") { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -2163,12 +2156,12 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2177,7 +2170,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2195,13 +2188,13 @@ case "body": assert(section == "body"); case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2211,24 +2204,24 @@ case "body": assert(section == "body"); case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "code": - doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); doc_html_endnotes[segment_filename] ~= ""; break; default: @@ -2240,7 +2233,7 @@ case "body": assert(section == "body"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; } else { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2249,7 +2242,7 @@ case "body": assert(section == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2268,37 +2261,37 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2307,7 +2300,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2318,7 +2311,7 @@ case "comment": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -2333,7 +2326,7 @@ default: } } } -seg_write_output(doc_html, doc_html_endnotes, doc_matters); +seg_write_output(doc_html, doc_html_endnotes, doc.matters); #+END_SRC *** write output files @@ -2418,9 +2411,7 @@ void css(M)(M doc_matters) { #+NAME: copy_html_images #+BEGIN_SRC d -@trusted void images_cp(M)( // @system - M doc_matters, -) { +@trusted void images_cp(M)(M doc_matters) { // @system { /+ (copy html images) +/ auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); if (!exists(pth_html.image)) { @@ -2562,10 +2553,10 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> #+NAME: output_epub3_constructs_oebps_content #+HEADER: :noweb yes #+BEGIN_SRC d -string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { +string epub3_oebps_content(D,P)(D doc, P parts) { auto xhtml_format = outputXHTMLs(); - auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language); - string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! + auto pth_epub3 = spinePathsEPUB!()(doc.matters.output_path, doc.matters.src.language); + string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc.matters! string content = format(q"┃<?xml version="1.0" encoding="utf-8"?> <<epub3_package_version>> <metadata @@ -2589,25 +2580,25 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { <item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" /> ┃", _uuid, - xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_main), - (doc_matters.conf_make_meta.meta.title_sub.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_sub), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - doc_matters.src.language, // language, fix (needed in dochead metadata) - (doc_matters.conf_make_meta.meta.date_published.empty) - ? "" : xhtml_format.special_characters_date(doc_matters.conf_make_meta.meta.date_published), - (doc_matters.conf_make_meta.meta.rights_copyright.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright), + xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_main), + (doc.matters.conf_make_meta.meta.title_sub.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_sub), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + doc.matters.src.language, // language, fix (needed in dochead metadata) + (doc.matters.conf_make_meta.meta.date_published.empty) + ? "" : xhtml_format.special_characters_date(doc.matters.conf_make_meta.meta.date_published), + (doc.matters.conf_make_meta.meta.rights_copyright.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.rights_copyright), _uuid, _uuid, (pth_epub3.fn_oebps_css).chompPrefix("OEBPS/"), ); content ~= parts["manifest_documents"]; // TODO sort jpg & png - foreach (image; doc_matters.srcs.image_list) { + foreach (image; doc.matters.srcs.image_list) { content ~= format(q"┃ <item id="%s" href="%s/%s" media-type="image/%s" /> ┃", image.baseName.stripExtension, @@ -2625,8 +2616,8 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { content ~= " " ~ "</guide>" ~ "\n "; content ~= "" ~ "</package>"; debug(epubmanifest) { - foreach (section; doc_matters.has.keys_seq.seg) { // TODO - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { // TODO + foreach (obj; doc.abstraction[section]) { if (obj.metainfo.is_a == "heading") { if (obj.metainfo.heading_lev_markup == 4) { writefln( @@ -2658,7 +2649,7 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { #+NAME: output_epub3_constructs_oebps_toc_nav_xhtml #+BEGIN_SRC d -string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { +string epub3_oebps_toc_nav_xhtml(D)(D doc) { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); static auto rgx = RgxO(); @@ -2677,12 +2668,12 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { </header> <nav epub:type="toc" id="toc"> ┃", - (doc_matters.conf_make_meta.meta.title_full).special_characters_text, + (doc.matters.conf_make_meta.meta.title_full).special_characters_text, ); string _toc_nav_tail = ""; - // writeln(doc_matters.has.keys_seq.seg); // DEBUG line - foreach (sect; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[sect]) { + // writeln(doc.matters.has.keys_seq.seg); // DEBUG line + foreach (sect; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[sect]) { if ((sect == "head") && (obj.metainfo.is_a == "heading")) { toc = toc_head; } @@ -2738,7 +2729,7 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { } break; } - if (doc_matters.has.keys_seq.seg[doc_matters.has.keys_seq.seg.length - 2] == sect) { + if (doc.matters.has.keys_seq.seg[doc.matters.has.keys_seq.seg.length - 2] == sect) { // writeln(n, ": ", sect, ": ", _txt, " - ", obj.metainfo.dom_structure_collapsed_tags_status); // DEBUG // read last heading (heading prior to closing) and determine what those instructions imply still need to be done // CLOSE // DomTags { 0 none, 1 open, 2 close, 3 close_and_open, 4 open_still, } @@ -2778,16 +2769,12 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { #+NAME: output_epub3_xhtml_seg_output #+BEGIN_SRC d -@system void outputEPub3(D,I)( - const D doc_abstraction, - I doc_matters, -) { +@system void outputEPub3(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); - string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string[string] oepbs_content_parts; @@ -2810,8 +2797,8 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { #+NAME: output_epub3_xhtml_seg_output_loop #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); #+END_SRC @@ -2845,8 +2832,8 @@ if (obj.metainfo.is_a == "heading") { goto default; default: epubWrite.doc_parts ~= obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= t[0]; epubWrite.doc_epub3_endnotes[obj.tags.segment_anchor_tag_epub] ~= t[1]; break; @@ -2854,19 +2841,19 @@ if (obj.metainfo.is_a == "heading") { break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -2874,7 +2861,7 @@ if (obj.metainfo.is_a == "heading") { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -2901,13 +2888,13 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2916,7 +2903,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2934,13 +2921,13 @@ case "body": assert(section == "body"); case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2950,37 +2937,37 @@ case "body": assert(section == "body"); case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "code": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); epubWrite.doc_epub3_endnotes[segment_filename] ~= ""; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2989,7 +2976,7 @@ case "body": assert(section == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -3008,37 +2995,37 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -3047,7 +3034,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -3064,7 +3051,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -3133,9 +3120,9 @@ if (obj.metainfo.is_a == "heading") { /+ epub specific documents +/ epubWrite.mimetypes = epub3_mimetypes; epubWrite.meta_inf_container_xml = epub3_container_xml; - epubWrite.oebps_toc_nav_xhtml = doc_abstraction.epub3_oebps_toc_nav_xhtml(doc_matters); - epubWrite.oebps_content_opf = doc_abstraction.epub3_oebps_content(doc_matters, oepbs_content_parts); - epubWrite.epub3_write_output_files(doc_matters); + epubWrite.oebps_toc_nav_xhtml = doc.epub3_oebps_toc_nav_xhtml; + epubWrite.oebps_content_opf = doc.epub3_oebps_content(oepbs_content_parts); + epubWrite.epub3_write_output_files(doc.matters); } #+END_SRC diff --git a/org/out_xmls_css.org b/org/out_xmls_css.org index 4e099de..1ba12d0 100644 --- a/org/out_xmls_css.org +++ b/org/out_xmls_css.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:xmls:css: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/out_zip.org b/org/out_zip.org index 7b4b365..5bd503b 100644 --- a/org/out_zip.org +++ b/org/out_zip.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:zip: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/output_hub.org b/org/output_hub.org index 541cc44..c87c757 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:output:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -32,15 +32,12 @@ module sisudoc.io_out.hub; @safe: template outputHub() { <<output_imports>> - @system void outputHub(D,I)( - const D doc_abstraction, - I doc_matters - ) { + @system void outputHub(D)(D doc) { mixin Msg; - auto msg = Msg!()(doc_matters); + auto msg = Msg!()(doc.matters); enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff } - void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) { - auto msg = Msg!()(doc_matters); + void Scheduled(D)(int sched, D doc) { + auto msg = Msg!()(doc.matters); <<output_scheduled_task_source_or_pod>> <<output_scheduled_task_epub>> <<output_scheduled_task_html_meta>> @@ -51,15 +48,15 @@ template outputHub() { <<output_scheduled_task_odt>> <<output_scheduled_task_sqlite>> } - if (doc_matters.opt.action.vox_gt0) { writeln(doc_matters.src.filename_base); } - if (!(doc_matters.opt.action.parallelise_subprocesses)) { - foreach(schedule; doc_matters.opt.action.output_task_scheduler) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + if (doc.matters.opt.action.vox_gt0) { writeln(doc.matters.src.filename_base); } + if (!(doc.matters.opt.action.parallelise_subprocesses)) { + foreach(schedule; doc.matters.opt.action.output_task_scheduler) { + Scheduled!()(schedule, doc); } } else { import std.parallelism; - foreach(schedule; parallel(doc_matters.opt.action.output_task_scheduler)) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + foreach(schedule; parallel(doc.matters.opt.action.output_task_scheduler)) { + Scheduled!()(schedule, doc); } } <<output_shared_sqlite_db>> @@ -134,11 +131,11 @@ import sisudoc.io_out, #+BEGIN_SRC d if (sched == outTask.source_or_pod) { msg.v("spine (doc reform) source processing... "); - if (doc_matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } + if (doc.matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } import sisudoc.io_out.source_pod; - spinePod!()(doc_matters); - if (doc_matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } - if (doc_matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } + spinePod!()(doc.matters); + if (doc.matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } + if (doc.matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } } #+END_SRC @@ -149,7 +146,7 @@ if (sched == outTask.source_or_pod) { if (sched == outTask.epub) { msg.v("epub3 processing... "); import sisudoc.io_out.epub3; - doc_abstraction.outputEPub3!()(doc_matters); + doc.outputEPub3!(); msg.vv("epub3 done"); } #+END_SRC @@ -160,7 +157,7 @@ if (sched == outTask.epub) { #+NAME: output_scheduled_task_html_meta #+BEGIN_SRC d if (sched == outTask.html_stuff) { - outputMetadata!()(doc_matters); + outputMetadata!()(doc.matters); msg.vv("html metadata done"); } #+END_SRC @@ -172,7 +169,7 @@ if (sched == outTask.html_stuff) { if (sched == outTask.html_scroll) { msg.v("html scroll processing... "); import sisudoc.io_out.html; - outputHTML!().scroll(doc_abstraction, doc_matters); + outputHTML!().scroll(doc); msg.vv("html scroll done"); } #+END_SRC @@ -184,7 +181,7 @@ if (sched == outTask.html_scroll) { if (sched == outTask.html_seg) { msg.v("html seg processing... "); import sisudoc.io_out.html; - outputHTML!().seg(doc_abstraction, doc_matters); + outputHTML!().seg(doc); msg.vv("html seg done"); } #+END_SRC @@ -195,8 +192,8 @@ if (sched == outTask.html_seg) { #+BEGIN_SRC d if (sched == outTask.html_stuff) { import sisudoc.io_out.html; - outputHTML!().css(doc_matters); - outputHTML!().images_cp(doc_matters); + outputHTML!().css(doc.matters); + outputHTML!().images_cp(doc.matters); msg.vv("html css & images done"); } #+END_SRC @@ -218,17 +215,17 @@ if (sched == outTask.latex) { msg.v("latex processing... (available for downstream processing & pdf output"); import sisudoc.io_out.latex; import std.file; - if ((isValidPath(doc_matters.output_path ~ "/latex/sty")) - && (!(exists(doc_matters.output_path ~ "/latex/sty"))) + if ((isValidPath(doc.matters.output_path ~ "/latex/sty")) + && (!(exists(doc.matters.output_path ~ "/latex/sty"))) ) { outputLaTeXstyInit!()( - doc_matters.output_path, - doc_matters.opt.action.generated_by, - doc_matters.generator_program.name_version_and_compiler, - doc_matters.generator_program.time_output_generated, + doc.matters.output_path, + doc.matters.opt.action.generated_by, + doc.matters.generator_program.name_version_and_compiler, + doc.matters.generator_program.time_output_generated, ); } - outputLaTeX!()(doc_abstraction, doc_matters); + outputLaTeX!()(doc.abstraction, doc.matters); msg.vv("latex done"); } #+END_SRC @@ -240,7 +237,7 @@ if (sched == outTask.latex) { if (sched == outTask.odt) { msg.v("odf:odt processing... "); import sisudoc.io_out.odt; - outputODT!()(doc_abstraction, doc_matters); + outputODT!()(doc.abstraction, doc.matters); msg.vv("odf:odt done"); } #+END_SRC @@ -252,7 +249,7 @@ if (sched == outTask.odt) { if (sched == outTask.sqlite) { msg.v("sqlite processing... "); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubDiscreteBuildTablesAndPopulate!(); msg.vv("sqlite done"); } #+END_SRC @@ -263,15 +260,15 @@ if (sched == outTask.sqlite) { #+NAME: output_shared_sqlite_db #+BEGIN_SRC d -if (doc_matters.opt.action.sqlite_update) { +if (doc.matters.opt.action.sqlite_update) { msg.v("sqlite update processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite update done"); -} else if (doc_matters.opt.action.sqlite_delete) { +} else if (doc.matters.opt.action.sqlite_delete) { msg.v("sqlite delete processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite delete done"); } #+END_SRC diff --git a/org/output_show.org b/org/output_show.org index 53e2d77..6f54451 100644 --- a/org/output_show.org +++ b/org/output_show.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -28,10 +28,8 @@ module sisudoc.meta.metadoc_show_summary; @safe: template spineMetaDocSummary() { - void spineMetaDocSummary(S,T)( - const S doc_abstraction, - T doc_matters, - ) { + void spineMetaDocSummary(D)(D doc) { + auto doc_matters = doc.matters; <<metadoc_show_summary_imports>> <<metadoc_show_imports_shared>> mixin InternalMarkup; @@ -55,7 +53,7 @@ string[string] check = [ "last_object_number_book_index" : "0", ]; foreach (k; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[k]) { + foreach (obj; doc.abstraction[k]) { if (obj.metainfo.is_of_part != "empty") { if (!empty(obj.metainfo.object_number)) { if (k == "body") { @@ -92,9 +90,9 @@ writefln( doc_matters.src.language, markup.repeat_character_by_number_provided("-", char_repeat_number), "- toc arr length:", - to!int(doc_abstraction["toc"].length), - "- doc_abstraction arr length:", - to!int(doc_abstraction["body"].length), + to!int(doc.abstraction["toc"].length), + "- doc.abstraction arr length:", + to!int(doc.abstraction["body"].length), " doc body last obj on.#:", to!int(check["last_object_number_body"]), " - number of tables:", @@ -110,26 +108,26 @@ writefln( " - number of images:", doc_matters.has.images, "- endnotes length:", // subtract headings - (doc_abstraction["endnotes"].length > 2) - ? (to!int(doc_abstraction["endnotes"].length - 2)) + (doc.abstraction["endnotes"].length > 2) + ? (to!int(doc.abstraction["endnotes"].length - 2)) : 0, "- glossary length:", - (doc_abstraction["glossary"].length > 1) - ? (to!int(doc_abstraction["glossary"].length)) + (doc.abstraction["glossary"].length > 1) + ? (to!int(doc.abstraction["glossary"].length)) : 0, "- biblio length:", - (doc_abstraction["bibliography"].length > 1) - ? (to!int(doc_abstraction["bibliography"].length)) + (doc.abstraction["bibliography"].length > 1) + ? (to!int(doc.abstraction["bibliography"].length)) : 0, "- bookindex length:", - (doc_abstraction["bookindex"].length > 1) - ? (to!int(doc_abstraction["bookindex"].length)) + (doc.abstraction["bookindex"].length > 1) + ? (to!int(doc.abstraction["bookindex"].length)) : 0, " book idx last obj on.#:", to!int(check["last_object_number_book_index"]), "- blurb length:", - (doc_abstraction["blurb"].length > 1) - ? (to!int(doc_abstraction["blurb"].length)) + (doc.abstraction["blurb"].length > 1) + ? (to!int(doc.abstraction["blurb"].length)) : 0, "* last obj on.#:", to!int(check["last_object_number"]), @@ -252,9 +250,7 @@ writefln( #+HEADER: :noweb yes #+BEGIN_SRC d template spineShowConfig() { - void spineShowConfig(T)( - T doc_matters, - ) { + void spineShowConfig(T)(T doc_matters) { <<metadoc_show_summary_imports>> <<metadoc_show_imports_shared>> mixin InternalMarkup; @@ -348,9 +344,7 @@ writefln( module sisudoc.meta.metadoc_show_make; @safe: template spineShowMake() { - void spineShowMake(T)( - T doc_matters, - ) { + void spineShowMake(T)(T doc_matters) { <<metadoc_show_summary_imports>> <<metadoc_show_imports_shared>> mixin InternalMarkup; @@ -422,9 +416,7 @@ writefln( module sisudoc.meta.metadoc_show_metadata; @safe: template spineShowMetaData() { - void spineShowMetaData(T)( - T doc_matters, - ) { + void spineShowMetaData(T)(T doc_matters) { <<metadoc_show_summary_imports>> <<metadoc_show_imports_shared>> mixin InternalMarkup; diff --git a/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org b/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org index 28ead23..b536386 100644 --- a/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org +++ b/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes @@ -29,7 +29,7 @@ - Author: Ralph Amissah [ralph.amissah@gmail.com] - - Copyright: (C) 2015 - 2024 Ralph Amissah, All Rights Reserved. + - Copyright: (C) 2015 - 2025 Ralph Amissah, All Rights Reserved. - License: AGPL 3 or later: @@ -98,7 +98,7 @@ #+NAME: spine_project_version_part_minor #+BEGIN_SRC org -17 +18 #+END_SRC *** patch diff --git a/org/spine.org b/org/spine.org index d185adb..51c649c 100644 --- a/org/spine.org +++ b/org/spine.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -1282,7 +1282,7 @@ enforce( *** 1. _document abstraction_ [#A] - return tuple of: - - doc_abstraction (the document) + - doc.abstraction (the document) - doc_matters #+NAME: spine_each_file_do_abstraction @@ -1292,11 +1292,8 @@ if ((_opt_action.debug_do) ) { writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } -auto t = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); -static assert(t.length==2); -auto doc_abstraction = t[dAM.abstraction]; -auto doc_matters = t[dAM.matters]; -if ((doc_matters.opt.action.debug_do) +auto doc = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); +if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_stages) ) { writeln("- stepX complete for [", manifest.src.filename, "]"); @@ -1323,9 +1320,9 @@ if ((doc_matters.opt.action.debug_do) #+NAME: spine_each_file_do_debugs_checkdoc_0 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.show_summary) { +if (doc.matters.opt.action.show_summary) { import sisudoc.meta.metadoc_show_summary; - spineMetaDocSummary!()(doc_abstraction, doc_matters); + spineMetaDocSummary!()(doc); } #+END_SRC @@ -1335,9 +1332,9 @@ if (doc_matters.opt.action.show_summary) { #+NAME: spine_each_file_do_debugs_checkdoc_1 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.show_metadata) { +if (doc.matters.opt.action.show_metadata) { import sisudoc.meta.metadoc_show_metadata; - spineShowMetaData!()(doc_matters); + spineShowMetaData!()(doc.matters); } #+END_SRC @@ -1347,9 +1344,9 @@ if (doc_matters.opt.action.show_metadata) { #+NAME: spine_each_file_do_debugs_checkdoc_2 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.show_make) { +if (doc.matters.opt.action.show_make) { import sisudoc.meta.metadoc_show_make; - spineShowMake!()(doc_matters); + spineShowMake!()(doc.matters); } #+END_SRC @@ -1359,9 +1356,9 @@ if (doc_matters.opt.action.show_make) { #+NAME: spine_each_file_do_debugs_checkdoc_3 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.show_config) { +if (doc.matters.opt.action.show_config) { import sisudoc.meta.metadoc_show_config; - spineShowConfig!()(doc_matters); + spineShowConfig!()(doc.matters); } #+END_SRC @@ -1370,17 +1367,17 @@ if (doc_matters.opt.action.show_config) { #+NAME: spine_each_file_do_debugs_checkdoc_4 #+BEGIN_SRC d -if (doc_matters.opt.action.curate) { - auto _hvst = spineMetaDocCurate!()(doc_matters, hvst); +if (doc.matters.opt.action.curate) { + auto _hvst = spineMetaDocCurate!()(doc.matters, hvst); if ( _hvst.title.length > 0 && _hvst.author_surname_fn.length > 0 ) { hvst.curates ~= _hvst; } else { - if ((doc_matters.opt.action.debug_do) + if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_curate) - || (doc_matters.opt.action.vox_gt2) + || (doc.matters.opt.action.vox_gt2) ) { writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc); } @@ -1394,8 +1391,8 @@ if (doc_matters.opt.action.curate) { #+NAME: spine_each_file_do_debugs_checkdoc_5 #+BEGIN_SRC d /+ ↓ debugs +/ -if (doc_matters.opt.action.debug_do) { - spineDebugs!()(doc_abstraction, doc_matters); +if (doc.matters.opt.action.debug_do) { + spineDebugs!()(doc.abstraction, doc.matters); } #+END_SRC @@ -1413,16 +1410,12 @@ if (!(_opt_action.skip_output)) { #+NAME: spine_each_file_do_selected_output #+BEGIN_SRC d /+ ↓ output hub +/ -if (!(doc_matters.opt.action.skip_output)) { - if ((_opt_action.debug_do) - || (_opt_action.debug_do_stages) - ) { +if (!(doc.matters.opt.action.skip_output)) { + if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } - doc_abstraction.outputHub!()(doc_matters); - if ((_opt_action.debug_do) - || (_opt_action.debug_do_stages) - ) { + doc.outputHub!(); + if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("- step5 complete for [", manifest.src.filename, "]"); } } @@ -1467,13 +1460,13 @@ template spineAbstraction() { <<spine_metadoc_mixin>> enum makeMeta { make, meta } enum docAbst { doc_abstract_obj, doc_has } - @system auto spineAbstraction(E,P,O,Cfg,M,S)( - E _env, - P program_info, - O _opt_action, - Cfg _cfg, - M _manifest, - S _make_and_meta_struct + @system auto spineAbstraction(E,P,O,Cfg,M)( + E _env, + P program_info, + O _opt_action, + Cfg _cfg, + M _manifest, + ConfComposite _make_and_meta_struct ){ <<spine_conf_files_in_yaml>> <<spine_each_file_do_read_and_split_dr_markup_file_content_into_header_and_body>> @@ -1489,8 +1482,19 @@ template spineAbstraction() { } auto doc_matters = ST_DocumentMatters(); <<spine_each_file_do_document_matters_msg_step4_end>> - auto t = tuple(doc_abstraction, doc_matters); - return t; + auto theDOC() { + struct ST_DOC { + const auto abstraction() { + return doc_abstraction; + } + auto matters() { + return doc_matters; + } + } + return ST_DOC(); + } + auto the_doc = theDOC(); + return the_doc; } } #+END_SRC @@ -1589,12 +1593,12 @@ if ((_opt_action.debug_do) - prepare the document abstraction used in downstream processing - _return tuple of_: - - document abstraction (_the_document_ or doc_abstraction) + - document abstraction (_the_document_ or doc.abstraction) - document abstraction keys - (head, toc, body, endnotes, glossary, bibliography, bookindex, blurb, tail) - - (transfer to _doc_matters_) - - segnames for html epub (transfer to _doc_matters_) - - image list (transfer to _doc_matters_) + - (transfer to _doc.matters_) + - segnames for html epub (transfer to _doc.matters_) + - image list (transfer to _doc.matters_) #+NAME: spine_each_file_do_document_abstraction #+BEGIN_SRC d @@ -1632,7 +1636,7 @@ if ((_opt_action.debug_do) if ((_opt_action.debug_do) || (_opt_action.debug_do_stages) ) { - writeln("step4 commence → (doc_matters) [", _manifest.src.filename, "]"); + writeln("step4 commence → (doc.matters) [", _manifest.src.filename, "]"); } #+END_SRC @@ -1691,7 +1695,7 @@ auto generated_time() { #+NAME: spine_each_file_do_document_matters_2_meta #+BEGIN_SRC d -auto conf_make_meta() { +ConfComposite conf_make_meta() { return _make_and_meta_struct; } auto doc_digest() { diff --git a/org/spine_info.org b/org/spine_info.org index f5013a7..a2078fe 100644 --- a/org/spine_info.org +++ b/org/spine_info.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:info: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -122,7 +122,7 @@ ,#+FILETAGS: :spine:build:tools: ,#+AUTHOR: Ralph Amissah ,#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -,#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +,#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah ,#+LANGUAGE: en ,#+STARTUP: content hideblocks hidestars noindent entitiespretty ,#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t @@ -240,7 +240,7 @@ author: name: "Ralph Amissah" email: ralph.amissah@gmail.com -copyright: "(C) 2015 - 2024 Ralph Amissah, All Rights Reserved." +copyright: "(C) 2015 - 2025 Ralph Amissah, All Rights Reserved." license: - "project code: AGPL 3 or later" @@ -975,7 +975,7 @@ webserv: - Author: Ralph Amissah [ralph.amissah@gmail.com] -- Copyright: (C) 2015 - 2024 Ralph Amissah +- Copyright: (C) 2015 - 2025 Ralph Amissah #+END_SRC *** license @@ -1155,14 +1155,14 @@ webserv: * CHANGELOG :changelog: -#+BEGIN_SRC sh +#+BEGIN_SRC shell CHL="CHANGELOG" git log --pretty=format:'-_-%+s %+as %ae%+h%d%+b' --no-merges \ | sed "/^\\s*$/d" | sed "s/^\([ ]\)*\*/\1-/" | sed "s/ \+$//" | sed "s/^-_-$//" \ > ${CHL} #+END_SRC -#+BEGIN_SRC sh +#+BEGIN_SRC shell git log --pretty=format:"-_-_%+s %+as %ae%+h%d%+b" --no-merges \ > ${CHL} && sed -i '/^$/d; s/^\([ ]\)*\*/\1-/; s/ \+$//; s/^-_-_//' ${CHL} #+END_SRC diff --git a/org/spine_markup_sample.org b/org/spine_markup_sample.org index 288d2ec..d0381ac 100644 --- a/org/spine_markup_sample.org +++ b/org/spine_markup_sample.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:build:tools: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -333,7 +333,7 @@ date: modified: "2020-04-11" rights: - copyright: "Copyright (C) Ralph Amissah 2007, 2024" + copyright: "Copyright (C) Ralph Amissah 2007, 2025" license: "AGPL 3 (part of SiSU Spine documentation)" classify: diff --git a/org/util_spine_markup_conversion_from_sisu.org b/org/util_spine_markup_conversion_from_sisu.org index 99852b0..56f79dd 100644 --- a/org/util_spine_markup_conversion_from_sisu.org +++ b/org/util_spine_markup_conversion_from_sisu.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:info: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code diff --git a/org/util_spine_syntax_highlighting_emacs.org b/org/util_spine_syntax_highlighting_emacs.org index 00f82a6..7272faf 100644 --- a/org/util_spine_syntax_highlighting_emacs.org +++ b/org/util_spine_syntax_highlighting_emacs.org @@ -1,10 +1,10 @@ -*- mode: org -*- -#+TITLE: sisudoc spine (doc_reform) information files +#+TITLE: sisudoc spine (doc_reform) emacs syntax highlighting #+DESCRIPTION: documents - structuring, various output representations & search #+FILETAGS: :spine:info: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -21,7 +21,7 @@ ** README -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/README" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/README" #+BEGIN_SRC elisp ; put this into your .emacs file, then use the mode file: @@ -31,7 +31,7 @@ ** autoload sisuspine-mode-autoloads.el -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el" #+BEGIN_SRC elisp (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) (autoload 'sisu-spine-mode "sisu-spine-mode" "\ @@ -47,17 +47,18 @@ and search. ** mode sisu-spine-mode.el -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/sisu-spine-mode.el" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/sisu-spine-mode.el" #+BEGIN_SRC elisp ;;; sisu-spine-mode.el --- Major mode for SiSU (spine parser) markup text -;; Copyright (C) 2011, 2024 Free Software Foundation, Inc. +;; Copyright (C) 2011, 2025 Free Software Foundation, Inc. ;; Author: Ralph Amissah & Ambrose Kofi Laing ;; Maintainer: Ralph Amissah <ralph.amissah@gmail.com> ;; Keywords: text, syntax, processes, tools ;; Version: 8.0.0 -;; URL: https://www.sisudoc.org/ +;; URL: https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el +;; https://sisudoc.org/ ;; originally looked at (based on) doc-mode, with kind permission of the author ;; Author: SUN, Tong <suntong001@users.sf.net>, (c)2001-6, all right reserved ;; Version: $Date: 2006/01/19 03:13:41 $ $Revision: 1.14 $ @@ -199,6 +200,14 @@ and search. (cons "^```[ ]+poem$\\|^```$" 'sisu-general-font-lock-red2) (cons "^```[ ]+alt$\\|^```$" 'sisu-general-font-lock-red2) ;;grouped text --------- + ;(cons "^'''[ ]code\\(.\\|\n\\)+?\n'''\n" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+code.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+table.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+group$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+block$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+poem$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+alt$\\|^'''$" 'sisu-general-font-lock-red2) + ;;grouped text --------- (cons "^group{\\|^}group" 'sisu-general-font-lock-red2) (cons "^block{\\|^}block" 'sisu-general-font-lock-red2) (cons "^code{\\|^}code" 'sisu-general-font-lock-red2) diff --git a/org/util_spine_syntax_highlighting_vim.org b/org/util_spine_syntax_highlighting_vim.org index bd9aa6d..b66b67d 100644 --- a/org/util_spine_syntax_highlighting_vim.org +++ b/org/util_spine_syntax_highlighting_vim.org @@ -1,10 +1,10 @@ -*- mode: org -*- -#+TITLE: sisudoc spine (doc_reform) information files +#+TITLE: sisudoc spine (doc_reform) vim syntax highlighting & colorschemes #+DESCRIPTION: documents - structuring, various output representations & search #+FILETAGS: :spine:info: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -20,21 +20,21 @@ * Vim Syntax highlighting ** filetype -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/filetype.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/filetype.vim" #+BEGIN_SRC text " SiSU filetype file if exists("did_load_filetypes") finish endif augroup filetypedetect - au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu - au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu + au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu-spine + au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu-spine augroup END #+END_SRC ** debian vim addon manager -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/vim-sisu.yaml" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/vim-sisu.yaml" #+BEGIN_SRC text #vim-addons: debian vim-addon-manager addon: sisu @@ -45,326 +45,827 @@ files: - syntax/sisu.vim #+END_SRC +** markup syntax +*** sisu.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/syntax/sisu.vim" +#+BEGIN_SRC text +" SiSU Vim syntax file +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" Last Change: 2017-06-22 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save +#+END_SRC + +*** sisu-spine.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim" +#+BEGIN_SRC text +" SiSU Vim syntax file (sisu-spine) +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" sisu-spine Markup: sisu-spine +" Last Change: 2017-06-22, 2025-02-21 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim> +" <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+table" end="^'''\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\(block\|group\|poem\|alt\)" end="^'''\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\box\(\.[a-z]\+\)\?" end="^'''\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^'''\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^'''\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^'''\s\+quote" end="^'''\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save +#+END_SRC + ** color files *** def.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/def.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/def.vim" #+BEGIN_SRC text -" Vim color file -" Name: def -" Maintainer: Ralph Amissah <ralph@amissah.com> -" Last Change: 2013-02-14 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/def.vim;hb=HEAD> -" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +"%% Vim color file +" Name: def +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def.vim> +" <https://sisudoc.org/> +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults " (with occasional other colors selected from 256 color palate) " .Xdefaults tweaking to make identical to def (256) provided, " along with an alternative possibility using colors beyond " 256 color palate -:hi clear -if exists("syntax_on") - syntax reset -endif -:set t_Co=256 -:set background=dark -:let colors_name = "def" -" ------- -" terminal def -" ------- -:hi Normal ctermbg=0 ctermfg=7 -":hi Cursor ctermbg=5 ctermfg=0 -:hi lCursor cterm=reverse -:hi StatusLine cterm=bold,reverse -:hi StatusLineNC cterm=reverse -:hi Search cterm=none ctermbg=57 ctermfg=0 -:hi IncSearch cterm=none ctermbg=154 ctermfg=0 -:hi SpecialKey ctermfg=4 -:hi Visual cterm=reverse -:hi VisualNOS cterm=bold,underline -:hi MoreMsg ctermfg=2 -:hi ModeMsg cterm=bold -:hi Question ctermfg=2 -:hi Title cterm=bold ctermfg=3 -:hi NonText cterm=bold ctermfg=4 -:hi LineNr cterm=bold ctermbg=0 ctermfg=0* -:hi CursorLineNr cterm=bold ctermbg=166 ctermfg=0 -:hi Directory ctermfg=4 -:hi WildMenu ctermbg=3 ctermfg=0 -:hi VertSplit cterm=reverse -:hi Folded cterm=none ctermbg=0 ctermfg=8 -:hi FoldColumn ctermbg=7 ctermfg=4 -:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 -:hi DiffChange cterm=none ctermbg=7 ctermfg=0 -:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 -:hi DiffText cterm=none ctermbg=6 ctermfg=0 -:hi String cterm=none ctermfg=3 -:hi Comment cterm=none ctermbg=0 ctermfg=4 -:hi Constant ctermfg=1 -:hi Special ctermfg=6 -:hi Identifier ctermfg=6 -:hi Statement ctermfg=2 -:hi Operator ctermfg=2 -:hi PreProc ctermfg=1 -:hi Type cterm=bold ctermfg=3 -:hi Delimiter cterm=none ctermfg=2 -:hi Ignore cterm=bold ctermfg=7 -:hi Todo ctermbg=3 ctermfg=0 -:hi Underlined cterm=underline -:hi Include ctermfg=1 -:hi Define ctermfg=3 -:hi Function ctermfg=6 -:hi Structure ctermfg=2 -:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 -:hi CursorLine cterm=bold -:hi CursorColumn ctermbg=17 -:hi ColorColumn ctermbg=17 -:hi SpellBad cterm=underline ctermbg=0 ctermfg=5 -:hi SpellCap cterm=underline ctermbg=0 ctermfg=5 -:hi SpellLocal cterm=underline ctermbg=0 ctermfg=5 -:hi SpellRare cterm=underline ctermbg=0 ctermfg=5 -:hi TrailingWhitespace ctermbg=1 -:hi ExtraWhitespace ctermbg=1 -:hi WarningMsg ctermfg=1 -:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 -:hi Error cterm=bold ctermbg=1 ctermfg=7 -" ------- -" gui def -" ------- -:hi Normal guibg=#000000 guifg=#D3D3D3 -:hi Cursor guibg=#CC9966 guifg=#000000 -:hi lCursor gui=reverse -:hi StatusLine gui=bold,reverse -:hi StatusLineNC gui=reverse -:hi Search gui=none guibg=#5F00FF guifg=#000000 -:hi IncSearch gui=none guibg=#AFFF00 guifg=#000000 -:hi SpecialKey guifg=#5971AD -:hi Visual gui=reverse -:hi VisualNOS gui=bold,underline -:hi MoreMsg guifg=#4E9A06 -:hi ModeMsg gui=bold -:hi Question guifg=#4E9A06 -:hi Title gui=bold guifg=#C4A000 -:hi NonText gui=bold guifg=#5971AD -:hi LineNr gui=bold guibg=#000000 guifg=#808080 -:hi CursorLineNr gui=bold guibg=#D75F00 guifg=#000000 -:hi Directory guifg=#5971AD -:hi WildMenu guibg=#C4A000 guifg=#000000 -:hi VertSplit gui=reverse -:hi Folded gui=none guibg=#000000 guifg=#808080 -:hi FoldColumn guibg=#D3D3D3 guifg=#5971AD -:hi DiffAdd gui=none guibg=#4E9A06 guifg=#000000 -:hi DiffChange gui=none guibg=#D3D3D3 guifg=#000000 -:hi DiffDelete gui=none guibg=#D3D3D3 guifg=#000000 -:hi DiffText gui=none guibg=#06989A guifg=#000000 -:hi String gui=none guifg=#C4A000 -:hi Comment gui=none guibg=#000000 guifg=#5971AD -:hi Constant guifg=#CC0000 -:hi Special guifg=#06989A -:hi Identifier guifg=#06989A -:hi Statement guifg=#4E9A06 -:hi Operator guifg=#4E9A06 -:hi PreProc guifg=#CC0000 -:hi Type gui=bold guifg=#C4A000 -:hi Delimiter gui=none guifg=#4E9A06 -:hi Ignore gui=bold guifg=#D3D3D3 -:hi Todo guibg=#C4A000 guifg=#000000 -:hi Underlined gui=underline -:hi Include guifg=#CC0000 -:hi Define guifg=#C4A000 -:hi Function guifg=#06989A -:hi Structure guifg=#4E9A06 -:hi MatchParen gui=bold guibg=#5971AD guifg=#D3D3D3 -:hi CursorLine gui=bold -:hi CursorColumn guibg=#00005F -:hi ColorColumn guibg=#00005F -:hi SpellBad gui=underline guibg=#000000 guifg=#75507B -:hi SpellCap gui=underline guibg=#000000 guifg=#75507B -:hi SpellLocal gui=underline guibg=#000000 guifg=#75507B -:hi SpellRare gui=underline guibg=#000000 guifg=#75507B -:hi TrailingWhitespace guibg=#080000 -:hi ExtraWhitespace guibg=#CC0000 -:hi WarningMsg guifg=#CC0000 -:hi ErrorMsg gui=bold guibg=#CC0000 guifg=#D3D3D3 -:hi Error gui=bold guibg=#CC0000 guifg=#D3D3D3 -" ------- -"256 color .Xdefaults vim: cterm giu -"<https://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim> -"<https://guns.github.com/xterm-color-table.vim/images/xterm-color-table-with-visible-rgb.png> -" ------- -" 256 color .Xdefaults vim: cterm giu def -" ------- -" 16 color standard altered 256 altered beyond 256 -" black/dark grey -" 0 [ 0:#000000] #000000 -" 8 [ 8:#808080] [59:#5F5F5F] #555555 -" red -" 1 [ 1:#800000] 160:#DF0000 #CC0000 -" 9 [ 9:#FF0000] #EF2929 -" green -" 2 [ 2:#008000] 112:#87DF00 #4E9A06 -" 10 [10:#00FF00] 154:#AFFF00 #8AE234 -" yellow/orange -" 3 [ 3:#808000] 178:#DFAF00 #C4A000 -" 11 [11:#FFFF00] 184:#DFDF00 #FC9E4F -" blue -" 4 [ 4:#000080] 24:#005F87 #5971AD -" 12 [12:#0000FF] 73:#5FAFAF #729FCF -" magenta -" 5 [ 5:#800080] 90:#870087 #75507B -" 13 [13:#FF00FF] 126:#AF0087 #AD7FA8 -" cyan -" 6 [ 6:#008080] 37:#00AFAF #06989A -" 14 [14:#00FFFF] 87:#5FFFFF #34E2E2 -" white -" 7 [ 7:#C0C0C0] #D3D3D3 -" 15 [15:#FFFFFF] #EEEEEE -" -------- -" .Xdefaults (rxvt urxvt setting beyond 256 colors, vim colorscheme "def" gui settings) -" (vim colorscheme "def" cterm matches "def" gui if .Xdefaults set thus) -" -------- -" ! black -" Rxvt.color0 : #000000 -" Rxvt.color8 : #555555 -" ! red -" Rxvt.color1 : #CC0000 -" Rxvt.color9 : #EF2929 -" ! green -" Rxvt.color2 : #4E9A06 -" Rxvt.color10 : #8AE234 -" ! yellow -" Rxvt.color3 : #C4A000 -" Rxvt.color11 : #FCE94F -" ! blue -" Rxvt.color4 : #5971AD -" Rxvt.color12 : #729FCF -" ! magenta -" Rxvt.color5 : #75507B -" Rxvt.color13 : #AD7FA8 -" ! cyan -" Rxvt.color6 : #06989A -" Rxvt.color14 : #34E2E2 -" ! white -" Rxvt.color7 : #D3D7CF -" Rxvt.color15 : #EEEEEE -" -------- -" .Xdefaults 256 (rxvt urxvt setting, vim colorscheme "def256" cterm & gui settings) -" (vim colorscheme "def" cterm matches "def256" if .Xdefaults set thus) -" -------- -" ! black -" Rxvt.color0 : #000000 -" Rxvt.color8 : #808080 -" ! red -" Rxvt.color1 : #DF0000 -" Rxvt.color9 : #FF0000 -" ! green -" Rxvt.color2 : #87DF00 -" Rxvt.color10 : #AFFF00 -" ! yellow -" Rxvt.color3 : #DFAF00 -" Rxvt.color11 : #FFFF00 -" ! blue -" Rxvt.color4 : #5F87DF -" Rxvt.color12 : #87DFFF -" ! magenta -" Rxvt.color5 : #8700DF -" Rxvt.color13 : #87DFFF -" ! cyan -" Rxvt.color6 : #00DFDF -" Rxvt.color14 : #5F5FDF -" ! white -" Rxvt.color7 : #C0C0C0 -" Rxvt.color15 : #FFFFFF +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "def" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=236 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=bold ctermfg=59 ctermbg=16 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=231 ctermbg=236 "bg:233,59,242,67 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=67 ctermbg=16 "fg:248,59,242,3,2,67 +" hi Folded cterm=none ctermfg=59 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=4 +: hi Constant ctermfg=1 +: hi Special ctermfg=6 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=2 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=4 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=1 "fg:2,5,140 +: hi Type ctermfg=3 "fg:67,2 +: hi Include ctermfg=1 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline "ctermul=166 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +" ------- +" gui def +" ------- +: hi Normal guifg=#D3D3D3 guibg=#000000 +: hi Cursor guifg=#000000 guibg=#CC9966 +: hi lCursor gui=reverse +: hi CursorLine gui=bold +: hi CursorLineNr gui=bold guifg=#000000 guibg=#D75F00 +: hi CursorColumn guibg=#00005F +: hi LineNr gui=bold guifg=#808080 guibg=#000000 +: hi StatusLine gui=bold,reverse +: hi StatusLineNC gui=reverse +: hi Search gui=none guifg=#000000 guibg=#5F00FF +: hi IncSearch gui=none guifg=#000000 guibg=#AFFF00 +: hi SpecialKey guifg=#5971AD +: hi Visual gui=reverse +: hi VisualNOS gui=bold,underline +: hi MoreMsg guifg=#4E9A06 +: hi ModeMsg gui=bold +: hi Question guifg=#4E9A06 +: hi Title gui=bold guifg=#C4A000 +: hi NonText gui=bold guifg=#5971AD +: hi Directory guifg=#5971AD +: hi WildMenu guifg=#000000 guibg=#C4A000 +: hi VertSplit gui=reverse +: hi Folded gui=none guifg=#808080 guibg=#000000 +: hi FoldColumn guifg=#5971AD guibg=#D3D3D3 +: hi DiffAdd gui=none guifg=#000000 guibg=#4E9A06 +: hi DiffChange gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffDelete gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffText gui=none guifg=#000000 guibg=#06989A +: hi String gui=none guifg=#C4A000 +: hi Comment gui=none guifg=#5971AD guibg=#000000 +: hi Constant guifg=#CC0000 +: hi Special guifg=#06989A +: hi Identifier guifg=#06989A +: hi Statement guifg=#4E9A06 +: hi Operator guifg=#4E9A06 +: hi PreProc guifg=#CC0000 +: hi Type gui=bold guifg=#C4A000 +: hi Delimiter gui=none guifg=#4E9A06 +: hi Ignore gui=bold guifg=#D3D3D3 +: hi Todo guifg=#000000 guibg=#C4A000 +: hi Underlined gui=underline +: hi Include guifg=#CC0000 +: hi Define guifg=#C4A000 +: hi Function guifg=#06989A +: hi Structure guifg=#4E9A06 +: hi MatchParen gui=bold guifg=#D3D3D3 guibg=#5971AD +: hi ColorColumn guibg=#00005F +: hi SpellBad gui=underline guifg=#75507B guibg=#000000 +: hi SpellCap gui=underline guifg=#75507B guibg=#000000 +: hi SpellLocal gui=underline guifg=#75507B guibg=#000000 +: hi SpellRare gui=underline guifg=#75507B guibg=#000000 +: hi TrailingWhitespace guibg=#080000 +: hi ExtraWhitespace guibg=#CC0000 +: hi WarningMsg guifg=#CC0000 +: hi ErrorMsg gui=bold guifg=#D3D3D3 guibg=#CC0000 +: hi Error gui=bold guifg=#D3D3D3 guibg=#CC0000 #+END_SRC *** slate.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/slate.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/slate.vim" #+BEGIN_SRC text "%% SiSU Vim color file -" Name: Slate -" Maintainer: Ralph Amissah <ralph@amissah.com> -" Last Change: 2013-02-09 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/slate.vim;hb=HEAD> -" Notes: cterm now uses frugal-sisu 8 colors for term -" (for gui originally looked at desert Hans Fugal <hans@fugal.net> -" <https://hans.fugal.net/vim/colors/desert.vim> (April/May 2003)) -:set background=dark -:hi clear -if exists("syntax_on") - syntax reset -endif -:let colors_name = "slate" -" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white -:hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white -:hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey -:hi lCursor term=reverse cterm=reverse -:hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black -:hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 -:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat -:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green -:hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen -:hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki -:hi VisualNOS term=bold,underline cterm=bold,underline -:hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen -:hi ModeMsg term=bold cterm=bold guifg=goldenrod -:hi Question term=standout ctermfg=2 guifg=springgreen -:hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold -:hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue -:hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 -:hi Directory term=bold ctermfg=4 -:hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black -:hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 -:hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 -:hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 -:hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white -:hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white -:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white -:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black -:hi String cterm=none ctermfg=3 guifg=SkyBlue -:hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 -:hi Constant term=underline ctermfg=1 guifg=#ffa0a0 -:hi Special term=bold ctermfg=6 guifg=darkkhaki -:hi Identifier term=underline ctermfg=6 guifg=salmon -:hi Statement term=bold ctermfg=6 guifg=CornflowerBlue -:hi Operator term=bold ctermfg=1 guifg=red -:hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red -:hi Type term=underline ctermfg=2 guifg=CornflowerBlue -:hi Delimiter term=none cterm=none ctermfg=1 -:hi Ignore cterm=bold ctermfg=7 guifg=grey40 -:hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered -:hi Underlined term=underline cterm=underline -:hi Include ctermfg=1 guifg=red -:hi Define ctermfg=3 gui=bold guifg=gold -:hi Function ctermfg=6 guifg=navajowhite -:hi Structure ctermfg=2 guifg=green -:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 -:hi CursorLine cterm=bold,underline guibg=black -:hi CursorColumn cterm=bold guibg=black -:hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white -:hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 -:hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white -:hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 -:hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon -:hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white -:hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white -:hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black -:hi Red ctermbg=black ctermfg=red guibg=black guifg=red -:hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta -:hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue -:hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan -:hi Green ctermbg=black ctermfg=green guibg=black guifg=green -:hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow -:hi White ctermbg=black ctermfg=white guibg=black guifg=white +" Name: Slate +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-09, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/slate.vim> +" <https://sisudoc.org/> +" <https://sisudoc.org/> +" Notes: cterm now uses frugal-sisu 8 colors for term +" (for gui originally looked at desert Hans Fugal <hans@fugal.net> +" <http://hans.fugal.net/vim/colors/desert.vim> (April/May 2003)) +: hi clear +: if exists("syntax_on") +: syntax reset +: endif +: let colors_name = "slate" +: set background=dark +" ------- +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +" ------- +: hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white +: hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey +: hi lCursor term=reverse cterm=reverse +: hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black +: hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat +: hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green +: hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen +: hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki +: hi VisualNOS term=bold,underline cterm=bold,underline +: hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen +: hi ModeMsg term=bold cterm=bold guifg=goldenrod +: hi Question term=standout ctermfg=2 guifg=springgreen +: hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold +: hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue +: hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 +: hi Directory term=bold ctermfg=4 +: hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black +: hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 +: hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 +: hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white +: hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white +: hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white +: hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black +: hi String cterm=none ctermfg=3 guifg=SkyBlue +: hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 +: hi Constant term=underline ctermfg=1 guifg=#ffa0a0 +: hi Special term=bold ctermfg=6 guifg=darkkhaki +: hi Identifier term=underline ctermfg=6 guifg=salmon +: hi Statement term=bold ctermfg=6 guifg=CornflowerBlue +: hi Operator term=bold ctermfg=1 guifg=red +: hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red +: hi Type term=underline ctermfg=2 guifg=CornflowerBlue +: hi Delimiter term=none cterm=none ctermfg=1 +: hi Ignore cterm=bold ctermfg=7 guifg=grey40 +: hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered +: hi Underlined term=underline cterm=underline +: hi Include ctermfg=1 guifg=red +: hi Define ctermfg=3 gui=bold guifg=gold +: hi Function ctermfg=6 guifg=navajowhite +: hi Structure ctermfg=2 guifg=green +: hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +: hi CursorLine cterm=bold,underline guibg=black +: hi CursorColumn cterm=bold guibg=black +: hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon +: hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: if &diff +: highlight! link DiffText MatchParen +: endif +: hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black +: hi Red ctermbg=black ctermfg=red guibg=black guifg=red +: hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta +: hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue +: hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan +: hi Green ctermbg=black ctermfg=green guibg=black guifg=green +: hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow +: hi White ctermbg=black ctermfg=white guibg=black guifg=white #+END_SRC *** def-sisu.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/def-sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/def-sisu.vim" #+BEGIN_SRC text " Vim color file " Name: def-sisu " Maintainer: Ralph Amissah <ralph@amissah.com> " Last Change: 2013-02-14 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/def-sisu.vim;hb=HEAD> +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def-sisu.vim> +" <https://sisudoc.org/> " Note: primarily 16 color cterm improved by tweaking of .Xdefaults " (with occasional other colors selected from 256 color palate) " .Xdefaults tweaking to make identical to def (256) provided, @@ -585,15 +1086,184 @@ endif " Rxvt.color15 : #FFFFFF #+END_SRC +*** redo.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/redo.vim" +#+BEGIN_SRC text +"%% Vim color file +" Name: redo +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <> +" Note: this is a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "redo" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=242 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn ctermfg=231 ctermbg=236 "bg:233,59,236 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=248 ctermbg=0 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=172 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=4 "ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +#+END_SRC + +*** shift.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/shift.vim" +#+BEGIN_SRC text +"%% Vim color file +" Name: shift +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-09 +" URL: <> +" Note: this is a shift in redo which as a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "shift" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=7 ctermbg=236 "bg:233,59 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=242 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=4 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=6 ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +#+END_SRC + *** frugal-cterm.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim" #+BEGIN_SRC text " Vim color file " Name: frugal-cterm-sisu " Maintainer: Ralph Amissah <ralph@amissah.com> " Last Change: 2013-02-09 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim;hb=HEAD> +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim> +" <https://sisudoc.org/> " Note: 8 color cterm, related colorschemes 8 & sparse :set background=dark :hi clear @@ -657,9 +1327,240 @@ endif :hi Error cterm=bold ctermbg=1 ctermfg=7 #+END_SRC -** ftplugin sisu.vim +** ftplugin sisu.vim & spine.vim (for the same files) +*** sisu.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/ftplugin/sisu.vim" +#+BEGIN_SRC text +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah <ralph@amissah.com> +" SiSU Markup: SiSU (sisu-3.3) 2012-08-18 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype off +":filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map <silent> <C-m> :if &guioptions =~# 'm' <Bar> + \set guioptions-=m <Bar> + \set guioptions-=T <Bar> + \else <Bar> + \set guioptions+=m <Bar> + \set guioptions-=T <Bar> + \endif<CR> +:set paste +""% statusline +"set statusline= " +"set fillchars=stl:―,stlnc:—,vert:│,fold:۰,diff:· +"" [ buffer number ] +"set statusline +=%#Normal#[ " +"set statusline +=%#Identifier#%n " buffer number +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ file name (& modified?) ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Statement#%<%F%* " full path +""set statusline +=%#Statement#%<%t " full path +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ column : line number / number of lines in file, percentage of file ] [%v:%l/%L\ %p%%] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Identifier#%v " column & line +"set statusline +=%#Normal#: " +"set statusline +=%#Identifier#%l " column & line +"set statusline +=%#SpecialKey#/%L\ " total lines +"set statusline +=%#Identifier#%p " percentage of file +"set statusline +=%#SpecialKey#%% " +"set statusline +=%#Normal#] " " +"" [ file format : file type ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#SpecialKey#%{&fenc} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%{&ff} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%y " file type +"set statusline +=%#Normal#] " +"" [ character under cursor ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#String#0x%04B " character under cursor +"set statusline +=%#Normal#]\ " +"" [ syntastic ] +"set statusline +=%#warningmsg# +"set statusline +=%{SyntasticStatuslineFlag()}\ " +""set statusline+=%* +"" Status line background +"set statusline +=%#Folded#\ " +"" misc +"set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map <leader>paste :set invpaste<cr> +"% wrap/formatting paragraph according to the current 'textwidth' with ^\ (control-\): +:imap <C-\> <C-O>gqap +:nmap <C-\> gqap +:vmap <C-\> gq +"% save file, go to next file in buffer +:map <leader>nf :w <enter> :n <enter> +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map <leader>ls :vs<cr> :Explore<cr> +:map <leader>dir :vs<cr> :Explore<cr> +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap <Down> gj +:nnoremap <Up> gk +:vnoremap <Down> gj +:vnoremap <Up> gk +:inoremap <Down> <C-o>gj +:inoremap <Up> <C-o>gk +"% search and replace +:map <leader>rd :.,$s///c "search and replace down +:map <leader>rg :%s///c "search and replace whole file +:map <leader>rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map <leader>e :e <c-r>=expand("%:p:h") . "/" <cr> +:map <leader>pwd :exe 'cd ' . expand ("%:p:h")<cr> +"% searchhighlight t93: Toggle search highlight <C-n> +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap <silent> <C-n> :silent call ToggleHLSearched()<cr> +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map <leader>fs :set foldmethod=expr foldcolumn=2 foldlevel=0 <cr> +:map <leader>ff :F<cr> +:map <leader>fe :F<cr> zE +"% foldtoggle Fold Toggle mapped to <space> +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap <space> :call ToggleFold()<cr> +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake(<q-args>) +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% linenumbering, on, relative, off +:map <Leader>nn :set <c-r>={'00':'','01':'r','10':'nor'}[&rnu.&nu]<CR>nu<CR> +"% cursorline +:map <leader>cu :if &cursorcolumn <Bar> + \set nocursorline nocursorcolumn <Bar> + \else <Bar> + \set cursorline cursorcolumn <Bar> + \endif<cr> +:map <leader>cu- :set nocursorline nocursorcolumn<cr> +:map <leader>cu+ :set cursorline cursorcolumn<cr> +#+END_SRC + +*** sisu-spine.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/ftplugin/sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim" #+BEGIN_SRC text "%% SiSU Vim ftplugin " SiSU Maintainer: Ralph Amissah <ralph@amissah.com> @@ -890,7 +1791,7 @@ endif ** templates *** sst.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/sst.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/sst.tpl" #+BEGIN_SRC text # SiSU 8.0 @@ -926,7 +1827,7 @@ make: *** ssm.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/ssm.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/ssm.tpl" #+BEGIN_SRC text # SiSU 8.0 master @@ -962,7 +1863,7 @@ make: *** ssm.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/ssi.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/ssi.tpl" #+BEGIN_SRC text # SiSU 8.0 insert 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..c683d1e 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: @@ -253,7 +253,7 @@ template spineRawMarkupContent() { ) { char[][] contents_insert; int code_block_status = 0; - enum codeBlock { off, curly, tic, } + enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; foreach (line; markup_sourcefile_insert_content) { @@ -265,11 +265,19 @@ template spineRawMarkupContent() { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents_insert ~= line; + } else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents_insert ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents_insert ~= line; + } else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents_insert ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents_insert ~= line; @@ -328,7 +336,7 @@ template spineRawMarkupContent() { import std.algorithm; char[][] contents; int code_block_status = 0; - enum codeBlock { off, curly, tic, } + enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; char[][] contents_insert; @@ -343,11 +351,19 @@ template spineRawMarkupContent() { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents ~= line; + } else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents ~= line; + } else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents ~= line; diff --git a/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..610d6b8 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: @@ -95,10 +95,10 @@ template outputEPub3() { </rootfiles>┃") ~ "\n</container>\n"; return o; } - string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { + string epub3_oebps_content(D,P)(D doc, P parts) { auto xhtml_format = outputXHTMLs(); - auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language); - string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! + auto pth_epub3 = spinePathsEPUB!()(doc.matters.output_path, doc.matters.src.language); + string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc.matters! string content = format(q"┃<?xml version="1.0" encoding="utf-8"?> <package version="3.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="uid" prefix="rendition: http://www.idpf.org/vocab/rendition/#"> <metadata @@ -122,25 +122,25 @@ template outputEPub3() { <item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" /> ┃", _uuid, - xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_main), - (doc_matters.conf_make_meta.meta.title_sub.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_sub), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - doc_matters.src.language, // language, fix (needed in dochead metadata) - (doc_matters.conf_make_meta.meta.date_published.empty) - ? "" : xhtml_format.special_characters_date(doc_matters.conf_make_meta.meta.date_published), - (doc_matters.conf_make_meta.meta.rights_copyright.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright), + xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_main), + (doc.matters.conf_make_meta.meta.title_sub.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_sub), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + doc.matters.src.language, // language, fix (needed in dochead metadata) + (doc.matters.conf_make_meta.meta.date_published.empty) + ? "" : xhtml_format.special_characters_date(doc.matters.conf_make_meta.meta.date_published), + (doc.matters.conf_make_meta.meta.rights_copyright.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.rights_copyright), _uuid, _uuid, (pth_epub3.fn_oebps_css).chompPrefix("OEBPS/"), ); content ~= parts["manifest_documents"]; // TODO sort jpg & png - foreach (image; doc_matters.srcs.image_list) { + foreach (image; doc.matters.srcs.image_list) { content ~= format(q"┃ <item id="%s" href="%s/%s" media-type="image/%s" /> ┃", image.baseName.stripExtension, @@ -158,8 +158,8 @@ template outputEPub3() { content ~= " " ~ "</guide>" ~ "\n "; content ~= "" ~ "</package>"; debug(epubmanifest) { - foreach (section; doc_matters.has.keys_seq.seg) { // TODO - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { // TODO + foreach (obj; doc.abstraction[section]) { if (obj.metainfo.is_a == "heading") { if (obj.metainfo.heading_lev_markup == 4) { writefln( @@ -183,7 +183,7 @@ template outputEPub3() { } return content; } - string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { + string epub3_oebps_toc_nav_xhtml(D)(D doc) { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); static auto rgx = RgxO(); @@ -202,12 +202,12 @@ template outputEPub3() { </header> <nav epub:type="toc" id="toc"> ┃", - (doc_matters.conf_make_meta.meta.title_full).special_characters_text, + (doc.matters.conf_make_meta.meta.title_full).special_characters_text, ); string _toc_nav_tail = ""; - // writeln(doc_matters.has.keys_seq.seg); // DEBUG line - foreach (sect; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[sect]) { + // writeln(doc.matters.has.keys_seq.seg); // DEBUG line + foreach (sect; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[sect]) { if ((sect == "head") && (obj.metainfo.is_a == "heading")) { toc = toc_head; } @@ -263,7 +263,7 @@ template outputEPub3() { } break; } - if (doc_matters.has.keys_seq.seg[doc_matters.has.keys_seq.seg.length - 2] == sect) { + if (doc.matters.has.keys_seq.seg[doc.matters.has.keys_seq.seg.length - 2] == sect) { // writeln(n, ": ", sect, ": ", _txt, " - ", obj.metainfo.dom_structure_collapsed_tags_status); // DEBUG // read last heading (heading prior to closing) and determine what those instructions imply still need to be done // CLOSE // DomTags { 0 none, 1 open, 2 close, 3 close_and_open, 4 open_still, } @@ -296,16 +296,12 @@ template outputEPub3() { toc ~= _toc_nav_tail; return toc; } - @system void outputEPub3(D,I)( - const D doc_abstraction, - I doc_matters, - ) { + @system void outputEPub3(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); - string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string[string] oepbs_content_parts; @@ -322,8 +318,8 @@ template outputEPub3() { string[] doc_parts; } auto epubWrite = writeOut(); - foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); if (obj.metainfo.is_a == "heading") { assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); @@ -351,8 +347,8 @@ template outputEPub3() { goto default; default: epubWrite.doc_parts ~= obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= t[0]; epubWrite.doc_epub3_endnotes[obj.tags.segment_anchor_tag_epub] ~= t[1]; break; @@ -360,19 +356,19 @@ template outputEPub3() { break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -380,7 +376,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -395,13 +391,13 @@ template outputEPub3() { case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -410,7 +406,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -422,13 +418,13 @@ template outputEPub3() { case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -438,37 +434,37 @@ template outputEPub3() { case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "code": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); epubWrite.doc_epub3_endnotes[segment_filename] ~= ""; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -477,7 +473,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -490,37 +486,37 @@ template outputEPub3() { case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -529,7 +525,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -540,7 +536,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -597,9 +593,9 @@ template outputEPub3() { /+ epub specific documents +/ epubWrite.mimetypes = epub3_mimetypes; epubWrite.meta_inf_container_xml = epub3_container_xml; - epubWrite.oebps_toc_nav_xhtml = doc_abstraction.epub3_oebps_toc_nav_xhtml(doc_matters); - epubWrite.oebps_content_opf = doc_abstraction.epub3_oebps_content(doc_matters, oepbs_content_parts); - epubWrite.epub3_write_output_files(doc_matters); + epubWrite.oebps_toc_nav_xhtml = doc.epub3_oebps_toc_nav_xhtml; + epubWrite.oebps_content_opf = doc.epub3_oebps_content(oepbs_content_parts); + epubWrite.epub3_write_output_files(doc.matters); } @system void epub3_write_output_files(W,M)( W epub_write, diff --git a/src/sisudoc/io_out/html.d b/src/sisudoc/io_out/html.d index d9aaa58..6d3129a 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: @@ -64,22 +64,19 @@ template outputHTML() { sisudoc.io_out.xmls, sisudoc.io_out.xmls_css; mixin outputXHTMLs; - void scroll(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void scroll(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); string[] doc_html; - string[] doc; + string[] doc_out; string suffix = ".html"; string previous_section = ""; string delimit = ""; - foreach (section; doc_matters.has.keys_seq.scroll) { - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.scroll) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); switch (obj.metainfo.is_of_part) { @@ -88,14 +85,14 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "toc": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -104,7 +101,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -116,14 +113,14 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "para": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -133,28 +130,28 @@ template outputHTML() { case "block": switch (obj.metainfo.is_a) { case "quote": - doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc.matters); break; case "group": - doc_html ~= xhtml_format.group_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.group_scroll(_txt, obj, doc.matters); break; case "block": - doc_html ~= xhtml_format.block_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.block_scroll(_txt, obj, doc.matters); break; case "poem": break; case "verse": - doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc.matters, suffix); break; case "code": - doc_html ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html ~= xhtml_format.table(_txt, obj, doc.matters); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -163,7 +160,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -176,29 +173,29 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "endnote": assert(section == "endnotes"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "glossary": assert(section == "glossary"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bibliography": assert(section == "bibliography"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bookindex": assert(section == "bookindex"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "blurb": assert(section == "blurb"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "tail": assert(section == "tail"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -207,7 +204,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -218,7 +215,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -228,18 +225,18 @@ template outputHTML() { } } } - doc = xhtml_format.html_head(doc_matters, "scroll") + doc_out = xhtml_format.html_head(doc.matters, "scroll") ~ doc_html ~ xhtml_format.dom_close - ~ xhtml_format.tail(doc_matters); - scroll_write_output(doc, doc_matters); + ~ xhtml_format.tail(doc.matters); + scroll_write_output(doc_out, doc.matters); } - @trusted void scroll_write_output(D,M)( - D doc, + @trusted void scroll_write_output(O,M)( + O doc_out, M doc_matters, ) { debug(asserts) { - static assert(is(typeof(doc) == string[])); + static assert(is(typeof(doc_out) == string[])); } auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { @@ -248,7 +245,7 @@ template outputHTML() { } { auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); - foreach (o; doc) { + foreach (o; doc_out) { f.writeln(o); } } @@ -271,10 +268,7 @@ template outputHTML() { writeln(" ", pth_html.fn_scroll(doc_matters.src.filename)); } } - void seg(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void seg(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; static auto rgx = RgxO(); @@ -282,15 +276,14 @@ template outputHTML() { auto xhtml_format = outputXHTMLs(); string[][string] doc_html; string[][string] doc_html_endnotes; - string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string previous_seg_filename = ""; string suffix = ".html"; string previous_section = ""; string delimit = ""; - foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); if (obj.metainfo.is_a == "heading") { @@ -318,33 +311,33 @@ template outputHTML() { top_level_headings[3] = ""; goto default; default: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); top_level_headings[obj.metainfo.heading_lev_markup] = t[0]; break; } break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg"); - auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.html_head(doc.matters, "seg"); + auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc.matters); doc_html[segment_filename] ~= navigation_bar.toc_pre_next; previous_seg_filename = segment_filename; foreach (top_level_heading; top_level_headings) { doc_html[segment_filename] ~= top_level_heading; } - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; - doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc.matters); doc_html_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -352,7 +345,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -367,12 +360,12 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -381,7 +374,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -393,13 +386,13 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -409,24 +402,24 @@ template outputHTML() { case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "code": - doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); doc_html_endnotes[segment_filename] ~= ""; break; default: @@ -438,7 +431,7 @@ template outputHTML() { doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; } else { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -447,7 +440,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -460,37 +453,37 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -499,7 +492,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -510,7 +503,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -519,7 +512,7 @@ template outputHTML() { } } } - seg_write_output(doc_html, doc_html_endnotes, doc_matters); + seg_write_output(doc_html, doc_html_endnotes, doc.matters); } @trusted void seg_write_output(D,E,M)( // @system? D doc_html, @@ -587,9 +580,7 @@ template outputHTML() { // Handle error } } - @trusted void images_cp(M)( // @system - M doc_matters, - ) { + @trusted void images_cp(M)(M doc_matters) { // @system { /+ (copy html images) +/ auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); if (!exists(pth_html.image)) { 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..8c41ce5 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: @@ -59,101 +59,98 @@ template outputHub() { sisudoc.io_out.xmls, sisudoc.io_out.create_zip_file, sisudoc.io_out.paths_output; - @system void outputHub(D,I)( - const D doc_abstraction, - I doc_matters - ) { + @system void outputHub(D)(D doc) { mixin Msg; - auto msg = Msg!()(doc_matters); + auto msg = Msg!()(doc.matters); enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff } - void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) { - auto msg = Msg!()(doc_matters); + void Scheduled(D)(int sched, D doc) { + auto msg = Msg!()(doc.matters); if (sched == outTask.source_or_pod) { msg.v("spine (doc reform) source processing... "); - if (doc_matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } + if (doc.matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } import sisudoc.io_out.source_pod; - spinePod!()(doc_matters); - if (doc_matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } - if (doc_matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } + spinePod!()(doc.matters); + if (doc.matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } + if (doc.matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } } if (sched == outTask.epub) { msg.v("epub3 processing... "); import sisudoc.io_out.epub3; - doc_abstraction.outputEPub3!()(doc_matters); + doc.outputEPub3!(); msg.vv("epub3 done"); } if (sched == outTask.html_stuff) { - outputMetadata!()(doc_matters); + outputMetadata!()(doc.matters); msg.vv("html metadata done"); } if (sched == outTask.html_scroll) { msg.v("html scroll processing... "); import sisudoc.io_out.html; - outputHTML!().scroll(doc_abstraction, doc_matters); + outputHTML!().scroll(doc); msg.vv("html scroll done"); } if (sched == outTask.html_seg) { msg.v("html seg processing... "); import sisudoc.io_out.html; - outputHTML!().seg(doc_abstraction, doc_matters); + outputHTML!().seg(doc); msg.vv("html seg done"); } if (sched == outTask.html_stuff) { import sisudoc.io_out.html; - outputHTML!().css(doc_matters); - outputHTML!().images_cp(doc_matters); + outputHTML!().css(doc.matters); + outputHTML!().images_cp(doc.matters); msg.vv("html css & images done"); } if (sched == outTask.latex) { msg.v("latex processing... (available for downstream processing & pdf output"); import sisudoc.io_out.latex; import std.file; - if ((isValidPath(doc_matters.output_path ~ "/latex/sty")) - && (!(exists(doc_matters.output_path ~ "/latex/sty"))) + if ((isValidPath(doc.matters.output_path ~ "/latex/sty")) + && (!(exists(doc.matters.output_path ~ "/latex/sty"))) ) { outputLaTeXstyInit!()( - doc_matters.output_path, - doc_matters.opt.action.generated_by, - doc_matters.generator_program.name_version_and_compiler, - doc_matters.generator_program.time_output_generated, + doc.matters.output_path, + doc.matters.opt.action.generated_by, + doc.matters.generator_program.name_version_and_compiler, + doc.matters.generator_program.time_output_generated, ); } - outputLaTeX!()(doc_abstraction, doc_matters); + outputLaTeX!()(doc.abstraction, doc.matters); msg.vv("latex done"); } if (sched == outTask.odt) { msg.v("odf:odt processing... "); import sisudoc.io_out.odt; - outputODT!()(doc_abstraction, doc_matters); + outputODT!()(doc.abstraction, doc.matters); msg.vv("odf:odt done"); } if (sched == outTask.sqlite) { msg.v("sqlite processing... "); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubDiscreteBuildTablesAndPopulate!(); msg.vv("sqlite done"); } } - if (doc_matters.opt.action.vox_gt0) { writeln(doc_matters.src.filename_base); } - if (!(doc_matters.opt.action.parallelise_subprocesses)) { - foreach(schedule; doc_matters.opt.action.output_task_scheduler) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + if (doc.matters.opt.action.vox_gt0) { writeln(doc.matters.src.filename_base); } + if (!(doc.matters.opt.action.parallelise_subprocesses)) { + foreach(schedule; doc.matters.opt.action.output_task_scheduler) { + Scheduled!()(schedule, doc); } } else { import std.parallelism; - foreach(schedule; parallel(doc_matters.opt.action.output_task_scheduler)) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + foreach(schedule; parallel(doc.matters.opt.action.output_task_scheduler)) { + Scheduled!()(schedule, doc); } } - if (doc_matters.opt.action.sqlite_update) { + if (doc.matters.opt.action.sqlite_update) { msg.v("sqlite update processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite update done"); - } else if (doc_matters.opt.action.sqlite_delete) { + } else if (doc.matters.opt.action.sqlite_delete) { msg.v("sqlite delete processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite delete done"); } } 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..8776c9f 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: @@ -66,11 +66,8 @@ static auto rgx_xhtml = RgxXHTML(); static auto mkup = InlineMarkup(); long _metadata_tid_lastrowid; template SQLiteHubBuildTablesAndPopulate() { - void SQLiteHubBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); + void SQLiteHubBuildTablesAndPopulate(D)(D doc) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -78,14 +75,13 @@ template SQLiteHubBuildTablesAndPopulate() { } catch (FileException ex) { } } template SQLiteDbStatementComposite() { - void SQLiteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDbStatementComposite(Db,D)( + Db db, + D doc ) { string _db_statement; - if ((doc_matters.opt.action.sqlite_db_create)) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); + if ((doc.matters.opt.action.sqlite_db_create)) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -93,38 +89,38 @@ template SQLiteHubBuildTablesAndPopulate() { } catch (FileException ex) { } } _db_statement ~= SQLiteTablesReCreate!()(); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "TABLE RE-CREATE"); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "TABLE RE-CREATE"); _db_statement = []; } - if (doc_matters.opt.action.sqlite_delete) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); + if (doc.matters.opt.action.sqlite_delete) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; } - if (doc_matters.opt.action.sqlite_update) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); + if (doc.matters.opt.action.sqlite_update) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaData"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaData"); _db_statement = []; - /+ get tid (lastrowid or max) for use in doc_objects table +/ - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT DocObjects"); + /+ get tid (lastrowid or max) for use in doc.objects table +/ + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT DocObjects"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaDataTopics"); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaDataTopics"); _db_statement = []; } db.close; - if (doc_matters.opt.action.vox_gt0) { + if (doc.matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file); } } } try { auto db = Database(pth_sqlite.sqlite_file); - SQLiteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDbStatementComposite!()(db, doc); } catch (FileException e) { writeln("Failed (FileException): ", e.msg, " ", pth_sqlite.sqlite_file); @@ -152,33 +148,29 @@ template SQLiteHubBuildTablesAndPopulate() { } } template SQLiteHubDiscreteBuildTablesAndPopulate() { - void SQLiteHubDiscreteBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); - auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); // doc_matters.db_path + void SQLiteHubDiscreteBuildTablesAndPopulate(D)(D doc) { + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); + auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc.matters.output_path, doc.matters.src.language); // doc.matters.db_path if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { pth_sqlite.base.mkdirRecurse; } catch (FileException ex) { } } - auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename)); + auto db = Database(pth_sqlite.sqlite_file(doc.matters.src.filename)); template SQLiteDiscreteDbStatementComposite() { - void SQLiteDiscreteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDiscreteDbStatementComposite(Db,D)( + Db db, + D doc ) { try { { string _db_statement; _db_statement ~= SQLiteTablesReCreate!()(); - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "table CREATE Tables, INSERT DocObjects"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "table CREATE Tables, INSERT DocObjects"); } db.close; } @@ -204,12 +196,12 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { import core.runtime; core.runtime.Runtime.terminate(); } - if (doc_matters.opt.action.vox_gt0) { - writeln(" ", pth_sqlite.sqlite_file(doc_matters.src.filename)); + if (doc.matters.opt.action.vox_gt0) { + writeln(" ", pth_sqlite.sqlite_file(doc.matters.src.filename)); } } } - SQLiteDiscreteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDiscreteDbStatementComposite!()(db, doc); } } template SQLiteDbRun() { @@ -251,9 +243,7 @@ template SQLinsertDelimiter() { } } template SQLiteFormatAndLoadObject() { - auto SQLiteFormatAndLoadObject(M)( - M doc_matters, - ) { + auto SQLiteFormatAndLoadObject(M)(M doc_matters) { mixin spineRgxOut; mixin spineRgxXHTML; struct sqlite_format_and_load_objects { @@ -1143,9 +1133,7 @@ template SQLiteTablesReCreate() { } } template SQLiteDeleteDocument() { - string SQLiteDeleteDocument(M)( - M doc_matters, - ) { + string SQLiteDeleteDocument(M)(M doc_matters) { string _uid = doc_matters.src.doc_uid; string _delete_uid = format(q"┃ DELETE FROM metadata_and_text @@ -1160,9 +1148,7 @@ template SQLiteDeleteDocument() { } } template SQLiteInsertMetadata() { - string SQLiteInsertMetadata(M)( - M doc_matters, - ) { + string SQLiteInsertMetadata(M)(M doc_matters) { string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); string _insert_metadata = format(q"┃ INSERT INTO metadata_and_text ( @@ -1276,9 +1262,7 @@ template SQLiteInsertMetadata() { } } template SQLiteInsertMetadataTopics() { - string SQLiteInsertMetadataTopics(M)( - M doc_matters, - ) { + string SQLiteInsertMetadataTopics(M)(M doc_matters) { string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); string[] _insert_topics; foreach (topic_line; doc_matters.conf_make_meta.meta.classify_topic_register_expanded_arr) { @@ -1301,12 +1285,9 @@ template SQLiteInsertMetadataTopics() { } } template SQLiteInsertDocObjectsLoop() { - string SQLiteInsertDocObjectsLoop(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); + string SQLiteInsertDocObjectsLoop(D)(D doc) { + string _uid = SQLinsertDelimiter!()(doc.matters.src.doc_uid); + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); string insertDocObjectsRow(O)(O obj) { string _insert_doc_objects_row = format(q"┃ INSERT INTO doc_objects ( @@ -1336,23 +1317,23 @@ template SQLiteInsertDocObjectsLoop() { ); return _insert_doc_objects_row; } - auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc_matters); + auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc.matters); string[string] obj_txt; string doc_text; string[] _insert_doc_objects; - foreach (part; doc_matters.has.keys_seq.sql) { - foreach (obj; doc_abstraction[part]) { + foreach (part; doc.matters.has.keys_seq.sql) { + foreach (obj; doc.abstraction[part]) { switch (obj.metainfo.is_of_part) { case "frontmatter": assert(part == "head", part); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1361,7 +1342,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1378,14 +1359,14 @@ template SQLiteInsertDocObjectsLoop() { writeln(__LINE__, ": ", obj.text); } } - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "para": - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1395,28 +1376,28 @@ template SQLiteInsertDocObjectsLoop() { case "block": switch (obj.metainfo.is_a) { case "quote": - obj_txt = format_and_sqlite_load.quote(doc_matters, obj); + obj_txt = format_and_sqlite_load.quote(doc.matters, obj); break; case "group": - obj_txt = format_and_sqlite_load.group(doc_matters, obj); + obj_txt = format_and_sqlite_load.group(doc.matters, obj); break; case "block": - obj_txt = format_and_sqlite_load.block(doc_matters, obj); + obj_txt = format_and_sqlite_load.block(doc.matters, obj); break; case "poem": // double check on keeping both poem & verse break; case "verse": - obj_txt = format_and_sqlite_load.verse(doc_matters, obj); + obj_txt = format_and_sqlite_load.verse(doc.matters, obj); break; case "code": - obj_txt = format_and_sqlite_load.code(doc_matters, obj); + obj_txt = format_and_sqlite_load.code(doc.matters, obj); break; case "table": - obj_txt = format_and_sqlite_load.table(doc_matters, obj); + obj_txt = format_and_sqlite_load.table(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1425,7 +1406,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1438,23 +1419,23 @@ template SQLiteInsertDocObjectsLoop() { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "glossary": assert(part == "glossary", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bibliography": assert(part == "bibliography", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bookindex": assert(part == "bookindex", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "blurb": assert(part == "blurb", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1463,7 +1444,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1474,7 +1455,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from @@ -1483,9 +1464,9 @@ template SQLiteInsertDocObjectsLoop() { break; } if (obj.metainfo.is_a == "heading") { - if (doc_matters.opt.action.show_sqlite) { + if (doc.matters.opt.action.show_sqlite) { if (obj.metainfo.heading_lev_markup == 0) { - writeln(doc_matters.src.filename); + writeln(doc.matters.src.filename); } writeln( "markup: ", obj.metainfo.heading_lev_markup, diff --git a/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..5c3694e 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); @@ -144,7 +144,7 @@ template spineAbstraction() { if ((_opt_action.debug_do) || (_opt_action.debug_do_stages) ) { - writeln("step4 commence → (doc_matters) [", _manifest.src.filename, "]"); + writeln("step4 commence → (doc.matters) [", _manifest.src.filename, "]"); } struct ST_DocumentMatters { auto generator_program() { @@ -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() { @@ -294,7 +294,18 @@ template spineAbstraction() { ) { writeln("- step4 complete for [", _manifest.src.filename, "]"); } - auto t = tuple(doc_abstraction, doc_matters); - return t; + auto theDOC() { + struct ST_DOC { + const auto abstraction() { + return doc_abstraction; + } + auto matters() { + return doc_matters; + } + } + return ST_DOC(); + } + auto the_doc = theDOC(); + return the_doc; } } 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..4aa49dc 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: @@ -99,8 +99,8 @@ template docAbstraction() { anchor_tag = ""; } mixin spineNode; - auto node_para_int_ = node_metadata_para_int; - auto node_para_str_ = node_metadata_para_str; + int[string] node_para_int_ = node_metadata_para_int; + string[string] node_para_str_ = node_metadata_para_str; ObjGenericComposite comp_obj_; line_occur = [ "heading" : 0, @@ -231,7 +231,7 @@ template docAbstraction() { writeln("substitution to make: ", conf_make_meta.make.italics[Substitute.markup]); } } - auto loopMarkupSrcByLine( + _loopMarkupSrcByLineStruct loopMarkupSrcByLine( char[][] markup_sourcefile_content, string[string] an_object, uint[string] pith, @@ -340,7 +340,7 @@ template docAbstraction() { ._doc_header_and_make_substitutions_(conf_make_meta) ._doc_header_and_make_substitutions_fontface_(conf_make_meta); { - auto _get = line.txt_by_line_block_quote(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_quote(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -353,7 +353,7 @@ template docAbstraction() { ._doc_header_and_make_substitutions_fontface_(conf_make_meta) .replaceAll(rgx.para_delimiter, mkup.br_line_spaced ~ "$1"); { - auto _get = line.txt_by_line_block_group(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_group(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -369,7 +369,7 @@ template docAbstraction() { .replaceAll(rgx.spaces_keep, (m.captures[1]).translate([ ' ' : mkup.nbsp ])); } { - auto _get = line.txt_by_line_block_block(an_object, pith); + ST_txt_by_line_block_generic _get = line.txt_by_line_block_block(an_object, pith); { an_object = _get.this_object; pith = _get.pith; @@ -378,7 +378,7 @@ template docAbstraction() { continue; } else if (pith["block_is"] == eN.blk_is.poem) { { - auto _get = line.txt_by_line_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg); + ST_txt_by_line_block_poem _get = line.txt_by_line_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg); { an_object = _get.this_object; pith = _get.pith; @@ -412,7 +412,7 @@ template docAbstraction() { object_number_poem["start"] = obj_cite_digits.object_number.to!string; } { - auto _get = line.txt_by_line_block_start(pith, dochas, object_number_poem); + ST_txt_by_line_block_start _get = line.txt_by_line_block_start(pith, dochas, object_number_poem); { pith = _get.pith; dochas = _get.dochas; @@ -442,7 +442,7 @@ template docAbstraction() { || line.matchFirst(rgx.book_index_item_open) || pith["section"] == eN.sect.book_index) { { // book_index - auto _get = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action); + ST_flow_book_index _get = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action); { an_object = _get.this_object; pith = _get.pith; @@ -464,7 +464,7 @@ template docAbstraction() { comp_obj_comment.text = an_object[an_object_key].strip; the_document_body_section ~= comp_obj_comment; { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -481,7 +481,7 @@ template docAbstraction() { && (pith["make_headings"] == eN.bi.off)) { // heading found { - auto _get = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith); + ST_flow_heading_found _get = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith); { heading_match_str = _get.heading_match_str; heading_match_rgx = _get.heading_match_rgx; @@ -496,7 +496,7 @@ template docAbstraction() { ) { // heading make set { - auto _get = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith); + ST_flow_heading_make_set _get = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith); { line = _get.line; an_object = _get.this_object; @@ -534,7 +534,7 @@ template docAbstraction() { ._doc_header_and_make_substitutions_(conf_make_meta) ._doc_header_and_make_substitutions_fontface_(conf_make_meta); { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; @@ -563,7 +563,7 @@ template docAbstraction() { } else if (pith["block_state"] == eN.blk_state.closing) { // line empty, with blocks flag { - auto _get = line.flow_block_flag_line_empty_( + ST_flow_block_flag_line_empty _get = line.flow_block_flag_line_empty_( an_object, bookindex_extract_hash, the_document_body_section, @@ -679,7 +679,7 @@ template docAbstraction() { _anchor_tag = obj_cite_digits.identifier; // (incrementally build toc) table of contents here! { - auto _get = obj_im.flow_table_of_contents_gather_headings( + ST_flow_table_of_contents_gather_headings _get = obj_im.flow_table_of_contents_gather_headings( an_object, conf_make_meta, tag_in_seg, @@ -700,7 +700,7 @@ template docAbstraction() { if (an_object["lev_markup_number"].to!int <= 4) { segnames["epub"] ~= tag_in_seg["seg_lv1to4"]; } - auto comp_obj_ = node_construct.node_emitter_heading( + ObjGenericComposite comp_obj_ = node_construct.node_emitter_heading( an_object, tag_in_seg, lev_anchor_tag, @@ -721,7 +721,7 @@ template docAbstraction() { the_document_body_section ~= comp_obj_; debug(objectrelated1) { writeln(line); } // check { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -742,7 +742,7 @@ template docAbstraction() { an_object["bookindex_nugget"] = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; bookindex_unordered_hashes = bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, tag_in_seg); an_object["is"] = "para"; - auto comp_obj_ = node_construct.node_location_emitter( + ObjGenericComposite comp_obj_ = node_construct.node_location_emitter( content_non_header, tag_in_seg, lev_anchor_tag, @@ -774,7 +774,7 @@ template docAbstraction() { the_document_body_section ~= comp_obj_; tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); { - auto _get = txt_by_line_common_reset_(line_occur, an_object, pith); + ST_txt_by_line_common_reset _get = txt_by_line_common_reset_(line_occur, an_object, pith); { line_occur = _get.line_occur; an_object = _get.this_object; @@ -848,7 +848,7 @@ template docAbstraction() { return ret; } { // loopMarkupSrcByLine - auto _doc_by_line = loopMarkupSrcByLine(markup_sourcefile_content, an_object, pith); + _loopMarkupSrcByLineStruct _doc_by_line = loopMarkupSrcByLine(markup_sourcefile_content, an_object, pith); the_document_toc_section = _doc_by_line.toc; the_document_body_section = _doc_by_line.body; the_document_glossary_section = _doc_by_line.glossary; @@ -1496,7 +1496,7 @@ template docAbstraction() { return tag_assoc; } } - auto doc_has() { + DocHas_ doc_has() { return DocHas_(); } // the doc to be returned diff --git a/src/sisudoc/meta/metadoc_from_src_functions.d b/src/sisudoc/meta/metadoc_from_src_functions.d index 953e75a..3ae10d1 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: @@ -453,6 +453,62 @@ template docAbstractionFunctions() { pith["block_is"] = eN.blk_is.table; pith["block_state"] = eN.blk_state.on; pith["block_delim"] = eN.blk_delim.curly_special; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_code_open)) { + dochas["codeblock"]++; + an_object["lang"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : ""; + debug(codequotemarks) { writefln( "* [code quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + } else if (auto m = line.matchFirst(rgx.block_quotemarks_poem_open)) { + dochas["poem"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + object_number_poem["start"] = obj_cite_digits.object_number.to!string; + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + pith["verse_new"] = eN.bi.on; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_group_open)) { + dochas["group"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(group) { writefln( "* [group quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_block_open)) { + dochas["block"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(block) { writefln( "* [block quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_quote_open)) { + dochas["quote"]++; + an_object["syntax"] = ""; + an_object["attrib"] = m["attrib"].to!string; + an_object["lang"] = m["lang"].to!string; + debug(quote) { writefln( "* [quote quotemarks] %s", line); // quote (quotemarks) open + } + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_table_open)) { // quotemarks table open + debug(table) { writefln( "* [table quotemarks] %s", line); } + dochas["table"] ++; + an_object["table_head"] = m["attrib"].to!string; + an_object["block_type"] = "quotemarks"; + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; } else if (auto m = line.matchFirst(rgx.block_tic_code_open)) { dochas["codeblock"]++; an_object["lang"] = ""; @@ -536,6 +592,17 @@ template docAbstractionFunctions() { debug(group) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(group) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(group) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(group) { writeln(line); } @@ -574,6 +641,17 @@ template docAbstractionFunctions() { debug(block) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(block) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(block) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(block) { writeln(line); } @@ -698,6 +776,94 @@ template docAbstractionFunctions() { ++cntr; } } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (auto m = line.matchFirst(rgx.block_quotemarks_close)) { + an_object[an_object_key] = "verse"; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + if (processing.length > 0) { + an_object[an_object_key] = processing["verse"]; + } + if (an_object.length > 0) { + debug(poem) { writeln(__LINE__); writeln(obj_cite_digits.object_number, line); } + processing.remove("verse"); + an_object["is"] = "verse"; + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_number_poem["end"] = obj_cite_digits.object_number.to!string; + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + processing["verse"] ~= line ~= "\n"; + if (pith["verse_new"] == eN.bi.on) { + obj_cite_digits = ocn_emit(pith["ocn"]); + pith["verse_new"] = eN.bi.off; + } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { + processing["verse"] = processing["verse"].stripRight; + pith["verse_new"] = eN.bi.on; + verse_line = eN.bi.off; + } + if (pith["verse_new"] == eN.bi.on) { + verse_line = 1; + an_object[an_object_key] = processing["verse"]; + debug(poem) { writefln( + "* %s tic\n%s", + obj_cite_digits.object_number, + an_object[an_object_key] + ); + } + processing.remove("verse"); + an_object["is"] = "verse"; + auto comp_obj_location + = node_construct.node_location_emitter( + content_non_header, + tag_in_seg, + lev_anchor_tag, + tag_assoc, + obj_cite_digits, + cntr, + heading_ptr-1, + an_object["is"] + ); + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (auto m = line.matchFirst(rgx.block_tic_close)) { an_object[an_object_key] = "verse"; @@ -816,6 +982,19 @@ template docAbstractionFunctions() { debug(codecurly) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key] + .replaceFirst(rgx.newline_eol_delimiter_only, "") + .stripRight; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(codetic) { writeln(line); } @@ -884,6 +1063,16 @@ template docAbstractionFunctions() { debug(table) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(table) { writeln(line); } + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(table) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(table) { writeln(line); } @@ -927,6 +1116,17 @@ template docAbstractionFunctions() { debug(quote) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(quote) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(quote) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(quote) { writeln(line); } @@ -3631,7 +3831,7 @@ template docAbstractionFunctions() { } } else { // para { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; @@ -3924,7 +4124,7 @@ template docAbstractionFunctions() { tag_assoc[comp_obj_.tags.segment_anchor_tag_epub]["seg_lv1to4"] = comp_obj_.tags.segment_anchor_tag_epub; } else if (!(line.empty)) { { - auto _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); + ST_flow_para_match _get = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur); { an_object = _get.this_object; an_object_key = _get.this_object_key; diff --git a/src/sisudoc/meta/metadoc_object_setter.d b/src/sisudoc/meta/metadoc_object_setter.d index 8b2daf0..e0e896e 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: @@ -420,6 +420,7 @@ template ObjectSetter() { tic, curly_special, tic_special, + quotemarks, } } return _e(); diff --git a/src/sisudoc/meta/metadoc_show_config.d b/src/sisudoc/meta/metadoc_show_config.d index 76a0394..7434506 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: @@ -139,9 +139,7 @@ template spineShowSiteConfig() { } } template spineShowConfig() { - void spineShowConfig(T)( - T doc_matters, - ) { + void spineShowConfig(T)(T doc_matters) { import sisudoc.meta.defaults, sisudoc.meta.rgx; diff --git a/src/sisudoc/meta/metadoc_show_make.d b/src/sisudoc/meta/metadoc_show_make.d index ddbb687..a5e5608 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: @@ -50,9 +50,7 @@ module sisudoc.meta.metadoc_show_make; @safe: template spineShowMake() { - void spineShowMake(T)( - T doc_matters, - ) { + void spineShowMake(T)(T doc_matters) { import sisudoc.meta.defaults, sisudoc.meta.rgx; diff --git a/src/sisudoc/meta/metadoc_show_metadata.d b/src/sisudoc/meta/metadoc_show_metadata.d index 31ff1ea..4a7a177 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: @@ -50,9 +50,7 @@ module sisudoc.meta.metadoc_show_metadata; @safe: template spineShowMetaData() { - void spineShowMetaData(T)( - T doc_matters, - ) { + void spineShowMetaData(T)(T doc_matters) { import sisudoc.meta.defaults, sisudoc.meta.rgx; diff --git a/src/sisudoc/meta/metadoc_show_summary.d b/src/sisudoc/meta/metadoc_show_summary.d index 92d476c..2ceb337 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: @@ -50,10 +50,8 @@ module sisudoc.meta.metadoc_show_summary; @safe: template spineMetaDocSummary() { - void spineMetaDocSummary(S,T)( - const S doc_abstraction, - T doc_matters, - ) { + void spineMetaDocSummary(D)(D doc) { + auto doc_matters = doc.matters; import sisudoc.meta.defaults, sisudoc.meta.rgx; @@ -85,7 +83,7 @@ template spineMetaDocSummary() { "last_object_number_book_index" : "0", ]; foreach (k; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[k]) { + foreach (obj; doc.abstraction[k]) { if (obj.metainfo.is_of_part != "empty") { if (!empty(obj.metainfo.object_number)) { if (k == "body") { @@ -116,9 +114,9 @@ template spineMetaDocSummary() { doc_matters.src.language, markup.repeat_character_by_number_provided("-", char_repeat_number), "- toc arr length:", - to!int(doc_abstraction["toc"].length), - "- doc_abstraction arr length:", - to!int(doc_abstraction["body"].length), + to!int(doc.abstraction["toc"].length), + "- doc.abstraction arr length:", + to!int(doc.abstraction["body"].length), " doc body last obj on.#:", to!int(check["last_object_number_body"]), " - number of tables:", @@ -134,26 +132,26 @@ template spineMetaDocSummary() { " - number of images:", doc_matters.has.images, "- endnotes length:", // subtract headings - (doc_abstraction["endnotes"].length > 2) - ? (to!int(doc_abstraction["endnotes"].length - 2)) + (doc.abstraction["endnotes"].length > 2) + ? (to!int(doc.abstraction["endnotes"].length - 2)) : 0, "- glossary length:", - (doc_abstraction["glossary"].length > 1) - ? (to!int(doc_abstraction["glossary"].length)) + (doc.abstraction["glossary"].length > 1) + ? (to!int(doc.abstraction["glossary"].length)) : 0, "- biblio length:", - (doc_abstraction["bibliography"].length > 1) - ? (to!int(doc_abstraction["bibliography"].length)) + (doc.abstraction["bibliography"].length > 1) + ? (to!int(doc.abstraction["bibliography"].length)) : 0, "- bookindex length:", - (doc_abstraction["bookindex"].length > 1) - ? (to!int(doc_abstraction["bookindex"].length)) + (doc.abstraction["bookindex"].length > 1) + ? (to!int(doc.abstraction["bookindex"].length)) : 0, " book idx last obj on.#:", to!int(check["last_object_number_book_index"]), "- blurb length:", - (doc_abstraction["blurb"].length > 1) - ? (to!int(doc_abstraction["blurb"].length)) + (doc.abstraction["blurb"].length > 1) + ? (to!int(doc.abstraction["blurb"].length)) : 0, "* last obj on.#:", to!int(check["last_object_number"]), 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..259ab82 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: @@ -108,8 +108,8 @@ static template spineRgxIn() { static para_attribs = ctRegex!(`^_(?:(?:[0-9])(?:_([0-9]))?|(?:[1-9])?[*]) `); static para_inline_link_anchor = ctRegex!(`\*[~](?P<anchor>[a-z0-9_.-]+)(?= |$)`,"i"); /+ blocked markup +/ - static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^`{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); - static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|`{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); + static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^[`']{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); + static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|[`']{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); /+ blocked markup tics +/ static block_tic_code_open = ctRegex!("^`{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); static block_tic_poem_open = ctRegex!("^`{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); @@ -118,6 +118,14 @@ static template spineRgxIn() { static block_tic_quote_open = ctRegex!("^`{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); static block_tic_table_open = ctRegex!("^`{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); // ctRegex!("^`{3} table(?:\(.*?\))?"); static block_tic_close = ctRegex!("^(`{3})$","m"); + /+ blocked markup tics +/ + static block_quotemarks_code_open = ctRegex!(`^'{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_poem_open = ctRegex!(`^'{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_group_open = ctRegex!(`^'{3} group(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_block_open = ctRegex!(`^'{3} block(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_quote_open = ctRegex!(`^'{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_table_open = ctRegex!(`^'{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); // ctRegex!("^'{3} table(?:\(.*?\))?"); + static block_quotemarks_close = ctRegex!(`^('{3})$`,"m"); /+ blocked markup curly +/ static block_curly_code_open = ctRegex!(`^(?:code(?:[.](?P<syntax>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`); static block_curly_code_close = ctRegex!(`^([}]code)`); 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..e6e163d 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: @@ -1059,66 +1059,59 @@ string program_name = "spine"; ) { writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } - auto t = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); - static assert(t.length==2); - auto doc_abstraction = t[dAM.abstraction]; - auto doc_matters = t[dAM.matters]; - if ((doc_matters.opt.action.debug_do) + auto doc = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); + if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_stages) ) { writeln("- stepX complete for [", manifest.src.filename, "]"); } /+ ↓ debugs +/ - if (doc_matters.opt.action.show_summary) { + if (doc.matters.opt.action.show_summary) { import sisudoc.meta.metadoc_show_summary; - spineMetaDocSummary!()(doc_abstraction, doc_matters); + spineMetaDocSummary!()(doc); } /+ ↓ debugs +/ - if (doc_matters.opt.action.show_metadata) { + if (doc.matters.opt.action.show_metadata) { import sisudoc.meta.metadoc_show_metadata; - spineShowMetaData!()(doc_matters); + spineShowMetaData!()(doc.matters); } /+ ↓ debugs +/ - if (doc_matters.opt.action.show_make) { + if (doc.matters.opt.action.show_make) { import sisudoc.meta.metadoc_show_make; - spineShowMake!()(doc_matters); + spineShowMake!()(doc.matters); } /+ ↓ debugs +/ - if (doc_matters.opt.action.show_config) { + if (doc.matters.opt.action.show_config) { import sisudoc.meta.metadoc_show_config; - spineShowConfig!()(doc_matters); + spineShowConfig!()(doc.matters); } - if (doc_matters.opt.action.curate) { - auto _hvst = spineMetaDocCurate!()(doc_matters, hvst); + if (doc.matters.opt.action.curate) { + auto _hvst = spineMetaDocCurate!()(doc.matters, hvst); if ( _hvst.title.length > 0 && _hvst.author_surname_fn.length > 0 ) { hvst.curates ~= _hvst; } else { - if ((doc_matters.opt.action.debug_do) + if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_curate) - || (doc_matters.opt.action.vox_gt2) + || (doc.matters.opt.action.vox_gt2) ) { writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc); } } } /+ ↓ debugs +/ - if (doc_matters.opt.action.debug_do) { - spineDebugs!()(doc_abstraction, doc_matters); + if (doc.matters.opt.action.debug_do) { + spineDebugs!()(doc.abstraction, doc.matters); } /+ ↓ output hub +/ - if (!(doc_matters.opt.action.skip_output)) { - if ((_opt_action.debug_do) - || (_opt_action.debug_do_stages) - ) { + if (!(doc.matters.opt.action.skip_output)) { + if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } - doc_abstraction.outputHub!()(doc_matters); - if ((_opt_action.debug_do) - || (_opt_action.debug_do_stages) - ) { + doc.outputHub!(); + if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("- step5 complete for [", manifest.src.filename, "]"); } } @@ -1165,66 +1158,59 @@ string program_name = "spine"; ) { writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } - auto t = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); - static assert(t.length==2); - auto doc_abstraction = t[dAM.abstraction]; - auto doc_matters = t[dAM.matters]; - if ((doc_matters.opt.action.debug_do) + auto doc = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); + if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_stages) ) { writeln("- stepX complete for [", manifest.src.filename, "]"); } /+ ↓ debugs +/ - if (doc_matters.opt.action.show_summary) { + if (doc.matters.opt.action.show_summary) { import sisudoc.meta.metadoc_show_summary; - spineMetaDocSummary!()(doc_abstraction, doc_matters); + spineMetaDocSummary!()(doc); } /+ ↓ debugs +/ - if (doc_matters.opt.action.show_metadata) { + if (doc.matters.opt.action.show_metadata) { import sisudoc.meta.metadoc_show_metadata; - spineShowMetaData!()(doc_matters); + spineShowMetaData!()(doc.matters); } /+ ↓ debugs +/ - if (doc_matters.opt.action.show_make) { + if (doc.matters.opt.action.show_make) { import sisudoc.meta.metadoc_show_make; - spineShowMake!()(doc_matters); + spineShowMake!()(doc.matters); } /+ ↓ debugs +/ - if (doc_matters.opt.action.show_config) { + if (doc.matters.opt.action.show_config) { import sisudoc.meta.metadoc_show_config; - spineShowConfig!()(doc_matters); + spineShowConfig!()(doc.matters); } - if (doc_matters.opt.action.curate) { - auto _hvst = spineMetaDocCurate!()(doc_matters, hvst); + if (doc.matters.opt.action.curate) { + auto _hvst = spineMetaDocCurate!()(doc.matters, hvst); if ( _hvst.title.length > 0 && _hvst.author_surname_fn.length > 0 ) { hvst.curates ~= _hvst; } else { - if ((doc_matters.opt.action.debug_do) + if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_curate) - || (doc_matters.opt.action.vox_gt2) + || (doc.matters.opt.action.vox_gt2) ) { writeln("WARNING curate: document header yaml does not contain information related to: title or author: ", _hvst.path_html_segtoc); } } } /+ ↓ debugs +/ - if (doc_matters.opt.action.debug_do) { - spineDebugs!()(doc_abstraction, doc_matters); + if (doc.matters.opt.action.debug_do) { + spineDebugs!()(doc.abstraction, doc.matters); } /+ ↓ output hub +/ - if (!(doc_matters.opt.action.skip_output)) { - if ((_opt_action.debug_do) - || (_opt_action.debug_do_stages) - ) { + if (!(doc.matters.opt.action.skip_output)) { + if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } - doc_abstraction.outputHub!()(doc_matters); - if ((_opt_action.debug_do) - || (_opt_action.debug_do_stages) - ) { + doc.outputHub!(); + if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("- step5 complete for [", manifest.src.filename, "]"); } } diff --git a/sundry/editor-syntax-etc/emacs/README b/sundry/editor-syntax-etc/emacs/README new file mode 100644 index 0000000..6dabf72 --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/README @@ -0,0 +1,4 @@ +; put this into your .emacs file, then use the mode file: + +(load-file "~/emacs/el/sisu-spine-mode.el") +(add-to-list 'auto-mode-alist '("\\.sst$" . sisu-spine-mode)) diff --git a/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el b/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el new file mode 100644 index 0000000..4cc6332 --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el @@ -0,0 +1,10 @@ +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) +(autoload 'sisu-spine-mode "sisu-spine-mode" "\ +Major mode for editing SiSU (spine) markup files. +SiSU (https://www.sisudoc.org/) document structuring, publishing +and search. + +\(fn)" t nil) +(add-to-list 'auto-mode-alist '("\\.sst\\'" . sisu-spine-mode)) +(add-to-list 'auto-mode-alist '("\\.ssm\\'" . sisu-spine-mode)) +(add-to-list 'auto-mode-alist '("\\.ssi\\'" . sisu-spine-mode)) diff --git a/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el b/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el new file mode 100644 index 0000000..f2e29ed --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el @@ -0,0 +1,502 @@ +;;; sisu-spine-mode.el --- Major mode for SiSU (spine parser) markup text + +;; Copyright (C) 2011, 2025 Free Software Foundation, Inc. + +;; Author: Ralph Amissah & Ambrose Kofi Laing +;; Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +;; Keywords: text, syntax, processes, tools +;; Version: 8.0.0 +;; URL: https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el +;; https://sisudoc.org/ +;; originally looked at (based on) doc-mode, with kind permission of the author +;; Author: SUN, Tong <suntong001@users.sf.net>, (c)2001-6, all right reserved +;; Version: $Date: 2006/01/19 03:13:41 $ $Revision: 1.14 $ +;; Home URL: https://xpt.sourceforge.net/ +;; with contributions from Kevin Ryde and Stefan Monnier + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <https://www.gnu.org/licenses/>. + +;; Viva Software Libre! +;; Support the free software movement! +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; Commentary: + +;; SiSU (https://www.sisudoc.org/) is a document structuring and +;; publishing framework. This package provides an Emacs major mode +;; for SiSU markup, as used by the spine parser (in D) which has a different +;; header (based on yaml) from the original sisu parser (in Ruby) which has +;; bespoke headers. + +;; When this package is installed, files ending in ".sst" are automatically +;; associated with sisu-spine-mode. If a file doesn't have a +;; .sst extension, add a first line: +;; # -*- sisuSpine -*- + +;; The documentation for the "Structure Of The Hierarchy Text" can be +;; found in the sisustring for the sisu-spine-mode function. + +;;; Code: + +;; Variables: + +(defgroup sisu-faces nil + "AsciiSisu highlighting" + :group 'sisus) + +;; == Colors +; color n is more prominent than color n+1 + +(defface sisu-title-1-face + `((((class color) + (background dark)) + (:foreground "brown3" :bold t :height 1.2 :inherit variable-pitch)) + (((class color) + (background light)) + (:foreground "brown3" :bold t :height 1.2 :inherit variable-pitch)) + (t (:weight bold :inherit variable-pitch))) + "Face for AsciiSisu titles at level 1." + :group 'sisu-faces) + +(defface sisu-title-2-face + `((((class color) + (background dark)) + (:foreground "yellow4" :bold t :height 1.1 :inherit variable-pitch)) + (((class color) + (background light)) + (:foreground "yellow4" :bold t :height 1.1 :inherit variable-pitch)) + (t (:weight bold :inherit variable-pitch))) + "Face for AsciiSisu titles at level 2." + :group 'sisu-faces) + +(defface sisu-title-3-face + `((((class color) + (background dark)) + (:foreground "sienna3" :bold t)) + (((class color) + (background light)) + (:foreground "sienna3" :bold t)) + (t (:weight bold))) + "Face for AsciiSisu titles at level 3." + :group 'sisu-faces) + +(defface sisu-title-4-face + `((((class color) + (background dark)) + (:foreground "burlywood3")) + (((class color) + (background light)) + (:foreground "burlywood3")) + (t ())) + "Face for AsciiSisu titles at level 4." + :group 'sisu-faces) + +(defface info-node + '((((class color) (background light)) (:foreground "brown" :bold t :italic t)) + (((class color) (background dark)) (:foreground "white" :bold t :italic t)) + (t (:bold t :italic t))) + "Face for Info node names." + :group 'sisu-faces) + +(defvar sisu-title-1 'sisu-title-1-face) +(defvar sisu-title-2 'sisu-title-2-face) +(defvar sisu-title-3 'sisu-title-3-face) +(defvar sisu-title-4 'sisu-title-4-face) + +(defvar sisu-general-font-lock-red1 font-lock-warning-face) +(defvar sisu-general-font-lock-red2 font-lock-comment-face) +(defvar sisu-general-font-lock-red3 font-lock-string-face) + +(defvar sisu-general-font-lock-green1 font-lock-type-face) +(defvar sisu-general-font-lock-green2 font-lock-constant-face) + +(defvar sisu-general-font-lock-blue1 font-lock-keyword-face) +(defvar sisu-general-font-lock-blue2 font-lock-function-name-face) +(defvar sisu-general-font-lock-blue3 font-lock-builtin-face) + +(defvar sisu-general-font-lock-yellow1 font-lock-variable-name-face) +(defvar sisu-general-font-lock-yellow2 font-lock-comment-face) + +;; == sisu-spine-mode settings + +(defvar sisu-spine-mode-hook nil + "Normal hook run when entering Sisu Text mode.") + +(defvar sisu-spine-mode-abbrev-table nil + "Abbrev table in use in Sisu-spine-mode buffers.") +(define-abbrev-table 'sisu-spine-mode-abbrev-table ()) + +(defconst sisu-font-lock-keywords + (eval-when-compile + (list + ;;grouped text --------- + ;(cons "^```[ ]code\\(.\\|\n\\)+?\n```\n" 'sisu-general-font-lock-red2) + (cons "^```[ ]+code.*?$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+table.*?$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+group$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+block$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+poem$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+alt$\\|^```$" 'sisu-general-font-lock-red2) + ;;grouped text --------- + ;(cons "^'''[ ]code\\(.\\|\n\\)+?\n'''\n" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+code.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+table.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+group$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+block$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+poem$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+alt$\\|^'''$" 'sisu-general-font-lock-red2) + ;;grouped text --------- + (cons "^group{\\|^}group" 'sisu-general-font-lock-red2) + (cons "^block{\\|^}block" 'sisu-general-font-lock-red2) + (cons "^code{\\|^}code" 'sisu-general-font-lock-red2) + (cons "^poem{\\|^}poem" 'sisu-general-font-lock-red2) + (cons "^alt{\\|^}alt" 'sisu-general-font-lock-red2) + (cons "^table{.+\\|^}table" 'sisu-general-font-lock-red2) + (cons "^{table[^}]+}" 'sisu-general-font-lock-red2) + + (list + (concat + "^\`\\{3\\}[ ]+code.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + (list + (concat + "^\`\\{3\\}[ ]+table.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + (list + (concat + "^\`\\{3\\}[ ]+\\(group\\|block\\|alt\\|poem\\)$" + "\\(.\\|\n\\)+?" + "^\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + + ;; footnote/endnote ---- + ;(cons "\~{.+?}\~" 'sisu-general-font-lock-green1) + (cons "\~{\\*\\*\\|\~{\\*\\|\~{\\|}\~" 'sisu-general-font-lock-red2) + (cons "\~\\[\\+\\|\~\\[\\*\\|\~\\[\\|\\]\~" 'sisu-general-font-lock-red2) + (cons "\~\\^ \\|^\\^\~ " 'sisu-general-font-lock-red2) + (list + (concat + "\\(\*\~\\)" + "\\([^ \r\t\n]+\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-blue2 t) + ) + + ;; emphasis (can be program configured to be bold italics or underscore) + (list + (concat + "\\([*]{\\)" + "\\([^}]+\\)" + "\\(}[*]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; bold ---------------- + (list + (concat + "\\([!]{\\)" + "\\([^}]+\\)" + "\\(}[!]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + (cons "\\*[^ ]+\\*" 'sisu-general-font-lock-red1) + (cons "^!_ .+" 'sisu-general-font-lock-red1) + + ;; italics ------------- + (list + (concat + "\\([/]{\\)" + "\\([^}]+\\)" + "\\(}[/]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-blue1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; underscore ---------- + (list + (concat + "\\([_]{\\)" + "\\([^}]+\\)" + "\\(\}[_]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; monospace ----------- + (list + (concat + "\\([#]{\\)" + "\\([^}]+\\)" + "\\(}[#]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; citation ------------ + (list + (concat + "\\([\"]{\\)" + "\\([^}]+\\)" + "\\(}[\"]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; inserted text ------- + (list + (concat + "\\([\+]{\\)" + "\\([^}]+\\)" + "\\(}[\+]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; strike through ------ + (list + (concat + "\\(\\-{\\)" + "\\([^}]+\\)" + "\\(}\\-\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; superscript --------- + (list + (concat + "\\(\\^{\\)" + "\\([^}]+\\)" + "\\(}\\^\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; subscript ----------- + (list + (concat + "\\([,]{\\)" + "\\([^}]+\\)" + "\\(}[,]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; numbered list + (cons "^# \\|^_# " 'sisu-general-font-lock-red1) + + ;; bullet text + (cons "^_\\*[1-9] \\|^_\\* " 'sisu-general-font-lock-red1) + + ;; indented text + (cons "^_[1-9] " 'sisu-general-font-lock-red1) + (cons "^_[1-9]! " 'sisu-general-font-lock-red1) + + ;; hanging indented text [proposed enable when implemented] + (cons "^__[1-9] " 'sisu-general-font-lock-red1) + (cons "^_[0-9]_[0-9] " 'sisu-general-font-lock-red1) + (cons "^__[1-9]! " 'sisu-general-font-lock-red1) + (cons "^_[0-9]_[0-9]! " 'sisu-general-font-lock-red1) + + ;; url + (cons "\\(^\\|[ ]\\)https?:[/][/][^ \t\n\r<]+" 'sisu-general-font-lock-blue2) + + ;; Comment Lines + (cons "^% .*" 'sisu-general-font-lock-blue1) + + ;; page break + (cons "^\\(-\\\\\\\\-\\|=\\\\\\\\=\\|-\\.\\.-\\)" 'sisu-general-font-lock-red2) + + ;; line break + (cons " \\\\\\\\ " 'sisu-general-font-lock-red1) + + ;; line break (depreciated) + (cons "<br>" 'sisu-general-font-lock-red1) + + ;; Section titles + (list "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\)\\(.*\\)" + '(1 sisu-title-1 t) + '(3 sisu-title-2 t) + ) + + ;; hyper-links + (list + (concat + "\\({~^\\|{\\)" + "\\([^}{]+\\)" + "\\(}https?:[/][/][^ \r\n\t<]+\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; book index + (list + (concat + "^\\(\={\\)" + "\\([^}{]+\\)" + "\\(}\\)$" + ) + '(1 sisu-general-font-lock-green1 t) + '(2 nil t) + '(3 sisu-general-font-lock-green1 t) + ) + + ;(cons "^\={.+}" 'sisu-general-font-lock-green1) + + ;; numbers + (cons "\\<[.0-9]+\\>" 'sisu-general-font-lock-green2) + + ;; bullets sisu_normal (nearly copied regexp) + (cons "^_\\([1-9*]\\|[1-9]\\*\\) " 'sisu-general-font-lock-blue2) + + ;; image links + (list + (concat + "\\({\\)" + "\\([^}{]+\\)" + "\\(}image\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; insert file links + (list + (concat + "\\(<< \\)" + "\\([^ \r\t\n]+\\.ss\\)" + "\\(i\\|t\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-blue2 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; raw keywords + (list + (concat + "^\\(\\(" + "creator\\|" + "title\\|" + "date\\|" + "rights\\|" + "publisher\\|" + "classify\\|" + "identifier\\|" + "original\\|" + "notes\\|" + "links\\|" + "make\\|" + "\\):\\)\\(.*\\)" + ) + '(1 sisu-title-2 keep) + '(3 sisu-title-3 keep) + ) + ) + ) + "Default expressions to highlight in AsciiSisu mode." +) + +;; outline mode evil "folding" if available +;; (define-key evil-normal-state-map ",0" 'show-all) +;; (define-key evil-normal-state-map ",-" 'hide-body) +;; (define-key evil-normal-state-map ",+" 'show-subtree) +;; (define-key evil-normal-state-map ",=" 'show-subtree) + +;; + +;; Sisu & Autoload: + +;;;###autoload +(define-derived-mode sisu-spine-mode text-mode "SiSU" + "Major mode for editing SiSU files. +SiSU document structuring, publishing in multiple formats and search. +URL `https://www.sisudoc.org/'" + (modify-syntax-entry ?\' ".") + ;;(flyspell-mode nil) + + (make-local-variable 'paragraph-start) + (setq paragraph-start (concat "$\\|>" page-delimiter)) + (make-local-variable 'paragraph-separate) + (setq paragraph-separate paragraph-start) + (make-local-variable 'paragraph-ignore-fill-prefix) + (setq paragraph-ignore-fill-prefix t) + + (set (make-local-variable 'outline-regexp) + "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\|\\@[a-z]+:\\( \\|$\\)\\)") + + (make-local-variable 'require-final-newline) + (setq require-final-newline t) + + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults + '(sisu-font-lock-keywords + nil ; KEYWORDS-ONLY: no + nil ; CASE-FOLD: no + ((?_ . "w")) ; SYNTAX-ALIST + )) + ;; Enable outlining. + ;; TODO with outlining make sure linum (line numbering) is off, + ;; else performance penalty, sucks bigtime + (outline-minor-mode 1)) + +;;;###autoload (add-to-list 'auto-mode-alist '("\\.ss[imt]\\'" . sisu-spine-mode)) + +(provide 'sisu-spine-mode) + +;; + +;;; sisu-spine-mode.el ends here diff --git a/sundry/editor-syntax-etc/vim/colors/def-sisu.vim b/sundry/editor-syntax-etc/vim/colors/def-sisu.vim new file mode 100644 index 0000000..2c260bb --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/def-sisu.vim @@ -0,0 +1,224 @@ +" Vim color file +" Name: def-sisu +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def-sisu.vim> +" <https://sisudoc.org/> +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +" (with occasional other colors selected from 256 color palate) +" .Xdefaults tweaking to make identical to def (256) provided, +" along with an alternative possibility using colors beyond +" 256 color palate +:hi clear +if exists("syntax_on") + syntax reset +endif +:set t_Co=256 +:set background=dark +:let colors_name = "def-sisu" +" ------- +" terminal def +" ------- +:hi Normal ctermbg=0 ctermfg=7 +":hi Cursor ctermbg=5 ctermfg=0 +:hi lCursor cterm=reverse +:hi StatusLine cterm=bold,reverse +:hi StatusLineNC cterm=reverse +:hi Search cterm=none ctermbg=57 ctermfg=0 +:hi IncSearch cterm=none ctermbg=154 ctermfg=0 +:hi SpecialKey ctermfg=4 +:hi Visual cterm=reverse +:hi VisualNOS cterm=bold,underline +:hi MoreMsg ctermfg=2 +:hi ModeMsg cterm=bold +:hi Question ctermfg=2 +:hi Title cterm=bold ctermfg=3 +:hi NonText cterm=bold ctermfg=4 +:hi LineNr cterm=bold ctermbg=0 ctermfg=0* +:hi CursorLineNr cterm=bold ctermbg=166 ctermfg=0 +:hi Directory ctermfg=4 +:hi WildMenu ctermbg=3 ctermfg=0 +:hi VertSplit cterm=reverse +:hi Folded cterm=none ctermbg=0 ctermfg=8 +:hi FoldColumn ctermbg=7 ctermfg=4 +:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 +:hi DiffChange cterm=none ctermbg=7 ctermfg=0 +:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 +:hi DiffText cterm=none ctermbg=6 ctermfg=0 +:hi String cterm=none ctermfg=3 +:hi Comment cterm=none ctermbg=0 ctermfg=4 +:hi Constant ctermfg=1 +:hi Special ctermfg=6 +:hi Identifier ctermfg=6 +:hi Statement ctermfg=6 +:hi Operator ctermfg=1 +:hi PreProc ctermbg=7 ctermfg=1 +:hi Type ctermfg=2 +:hi Delimiter cterm=none ctermfg=1 +:hi Ignore cterm=bold ctermfg=7 +:hi Todo ctermbg=3 ctermfg=0 +:hi Underlined cterm=underline +:hi Include ctermfg=1 +:hi Define ctermfg=3 +:hi Function ctermfg=6 +:hi Structure ctermfg=2 +:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +:hi CursorLine cterm=bold +:hi CursorColumn ctermbg=17 +:hi ColorColumn ctermbg=17 +:hi SpellBad cterm=underline ctermbg=0 ctermfg=5 +:hi SpellCap cterm=underline ctermbg=0 ctermfg=5 +:hi SpellLocal cterm=underline ctermbg=0 ctermfg=5 +:hi SpellRare cterm=underline ctermbg=0 ctermfg=5 +:hi TrailingWhitespace ctermbg=1 +:hi ExtraWhitespace ctermbg=1 +:hi WarningMsg ctermfg=1 +:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 +:hi Error cterm=bold ctermbg=1 ctermfg=7 +" ------- +" gui def +" ------- +:hi Normal guibg=#000000 guifg=#D3D3D3 +:hi Cursor guibg=#CC9966 guifg=#000000 +:hi lCursor gui=reverse +:hi StatusLine gui=bold,reverse +:hi StatusLineNC gui=reverse +:hi Search gui=none guibg=#5F00FF guifg=#000000 +:hi IncSearch gui=none guibg=#AFFF00 guifg=#000000 +:hi SpecialKey guifg=#5971AD +:hi Visual gui=reverse +:hi VisualNOS gui=bold,underline +:hi MoreMsg guifg=#4E9A06 +:hi ModeMsg gui=bold +:hi Question guifg=#4E9A06 +:hi Title gui=bold guifg=#C4A000 +:hi NonText gui=bold guifg=#5971AD +:hi LineNr gui=bold guibg=#000000 guifg=#808080 +:hi CursorLineNr gui=bold guibg=#D75F00 guifg=#000000 +:hi Directory guifg=#5971AD +:hi WildMenu guibg=#C4A000 guifg=#000000 +:hi VertSplit gui=reverse +:hi Folded gui=none guibg=#000000 guifg=#808080 +:hi FoldColumn guibg=#D3D3D3 guifg=#5971AD +:hi DiffAdd gui=none guibg=#4E9A06 guifg=#000000 +:hi DiffChange gui=none guibg=#D3D3D3 guifg=#000000 +:hi DiffDelete gui=none guibg=#D3D3D3 guifg=#000000 +:hi DiffText gui=none guibg=#06989A guifg=#000000 +:hi String gui=none guifg=#C4A000 +:hi Comment gui=none guibg=#000000 guifg=#5971AD +:hi Constant guifg=#CC0000 +:hi Special guifg=#06989A +:hi Identifier guifg=#06989A +:hi Statement guifg=#06989A +:hi Operator guifg=#CC0000 +:hi PreProc guibg=#D3D3D3 guifg=#CC0000 +:hi Type guifg=#4E9A06 +:hi Delimiter gui=none guifg=#CC0000 +:hi Ignore gui=bold guifg=#D3D3D3 +:hi Todo guibg=#C4A000 guifg=#000000 +:hi Underlined gui=underline +:hi Include guifg=#CC0000 +:hi Define guifg=#C4A000 +:hi Function guifg=#06989A +:hi Structure guifg=#4E9A06 +:hi MatchParen gui=bold guibg=#5971AD guifg=#D3D3D3 +:hi CursorLine gui=bold +:hi CursorColumn guibg=#00005F +:hi ColorColumn guibg=#00005F +:hi SpellBad gui=underline guibg=#000000 guifg=#75507B +:hi SpellCap gui=underline guibg=#000000 guifg=#75507B +:hi SpellLocal gui=underline guibg=#000000 guifg=#75507B +:hi SpellRare gui=underline guibg=#000000 guifg=#75507B +:hi TrailingWhitespace guibg=#080000 +:hi ExtraWhitespace guibg=#CC0000 +:hi WarningMsg guifg=#CC0000 +:hi ErrorMsg gui=bold guibg=#CC0000 guifg=#D3D3D3 +:hi Error gui=bold guibg=#CC0000 guifg=#D3D3D3 +" ------- +"256 color .Xdefaults vim: cterm giu +"<https://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim> +"<https://guns.github.com/xterm-color-table.vim/images/xterm-color-table-with-visible-rgb.png> +" ------- +" 256 color .Xdefaults vim: cterm giu def +" ------- +" 16 color standard altered 256 altered beyond 256 +" black/dark grey +" 0 [ 0:#000000] #000000 +" 8 [ 8:#808080] [59:#5F5F5F] #555555 +" red +" 1 [ 1:#800000] 160:#DF0000 #CC0000 +" 9 [ 9:#FF0000] #EF2929 +" green +" 2 [ 2:#008000] 112:#87DF00 #4E9A06 +" 10 [10:#00FF00] 154:#AFFF00 #8AE234 +" yellow/orange +" 3 [ 3:#808000] 178:#DFAF00 #C4A000 +" 11 [11:#FFFF00] 184:#DFDF00 #FC9E4F +" blue +" 4 [ 4:#000080] 24:#005F87 #5971AD +" 12 [12:#0000FF] 73:#5FAFAF #729FCF +" magenta +" 5 [ 5:#800080] 90:#870087 #75507B +" 13 [13:#FF00FF] 126:#AF0087 #AD7FA8 +" cyan +" 6 [ 6:#008080] 37:#00AFAF #06989A +" 14 [14:#00FFFF] 87:#5FFFFF #34E2E2 +" white +" 7 [ 7:#C0C0C0] #D3D3D3 +" 15 [15:#FFFFFF] #EEEEEE +" -------- +" .Xdefaults (rxvt urxvt setting beyond 256 colors, vim colorscheme "def" gui settings) +" (vim colorscheme "def" cterm matches "def" gui if .Xdefaults set thus) +" -------- +" ! black +" Rxvt.color0 : #000000 +" Rxvt.color8 : #555555 +" ! red +" Rxvt.color1 : #CC0000 +" Rxvt.color9 : #EF2929 +" ! green +" Rxvt.color2 : #4E9A06 +" Rxvt.color10 : #8AE234 +" ! yellow +" Rxvt.color3 : #C4A000 +" Rxvt.color11 : #FCE94F +" ! blue +" Rxvt.color4 : #5971AD +" Rxvt.color12 : #729FCF +" ! magenta +" Rxvt.color5 : #75507B +" Rxvt.color13 : #AD7FA8 +" ! cyan +" Rxvt.color6 : #06989A +" Rxvt.color14 : #34E2E2 +" ! white +" Rxvt.color7 : #D3D7CF +" Rxvt.color15 : #EEEEEE +" -------- +" .Xdefaults 256 (rxvt urxvt setting, vim colorscheme "def256" cterm & gui settings) +" (vim colorscheme "def" cterm matches "def256" if .Xdefaults set thus) +" -------- +" ! black +" Rxvt.color0 : #000000 +" Rxvt.color8 : #808080 +" ! red +" Rxvt.color1 : #DF0000 +" Rxvt.color9 : #FF0000 +" ! green +" Rxvt.color2 : #87DF00 +" Rxvt.color10 : #AFFF00 +" ! yellow +" Rxvt.color3 : #DFAF00 +" Rxvt.color11 : #FFFF00 +" ! blue +" Rxvt.color4 : #5F87DF +" Rxvt.color12 : #87DFFF +" ! magenta +" Rxvt.color5 : #8700DF +" Rxvt.color13 : #87DFFF +" ! cyan +" Rxvt.color6 : #00DFDF +" Rxvt.color14 : #5F5FDF +" ! white +" Rxvt.color7 : #C0C0C0 +" Rxvt.color15 : #FFFFFF diff --git a/sundry/editor-syntax-etc/vim/colors/def.vim b/sundry/editor-syntax-etc/vim/colors/def.vim new file mode 100644 index 0000000..adc9dd9 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/def.vim @@ -0,0 +1,142 @@ +"%% Vim color file +" Name: def +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def.vim> +" <https://sisudoc.org/> +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +" (with occasional other colors selected from 256 color palate) +" .Xdefaults tweaking to make identical to def (256) provided, +" along with an alternative possibility using colors beyond +" 256 color palate +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "def" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=236 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=bold ctermfg=59 ctermbg=16 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=231 ctermbg=236 "bg:233,59,242,67 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=67 ctermbg=16 "fg:248,59,242,3,2,67 +" hi Folded cterm=none ctermfg=59 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=4 +: hi Constant ctermfg=1 +: hi Special ctermfg=6 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=2 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=4 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=1 "fg:2,5,140 +: hi Type ctermfg=3 "fg:67,2 +: hi Include ctermfg=1 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline "ctermul=166 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +" ------- +" gui def +" ------- +: hi Normal guifg=#D3D3D3 guibg=#000000 +: hi Cursor guifg=#000000 guibg=#CC9966 +: hi lCursor gui=reverse +: hi CursorLine gui=bold +: hi CursorLineNr gui=bold guifg=#000000 guibg=#D75F00 +: hi CursorColumn guibg=#00005F +: hi LineNr gui=bold guifg=#808080 guibg=#000000 +: hi StatusLine gui=bold,reverse +: hi StatusLineNC gui=reverse +: hi Search gui=none guifg=#000000 guibg=#5F00FF +: hi IncSearch gui=none guifg=#000000 guibg=#AFFF00 +: hi SpecialKey guifg=#5971AD +: hi Visual gui=reverse +: hi VisualNOS gui=bold,underline +: hi MoreMsg guifg=#4E9A06 +: hi ModeMsg gui=bold +: hi Question guifg=#4E9A06 +: hi Title gui=bold guifg=#C4A000 +: hi NonText gui=bold guifg=#5971AD +: hi Directory guifg=#5971AD +: hi WildMenu guifg=#000000 guibg=#C4A000 +: hi VertSplit gui=reverse +: hi Folded gui=none guifg=#808080 guibg=#000000 +: hi FoldColumn guifg=#5971AD guibg=#D3D3D3 +: hi DiffAdd gui=none guifg=#000000 guibg=#4E9A06 +: hi DiffChange gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffDelete gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffText gui=none guifg=#000000 guibg=#06989A +: hi String gui=none guifg=#C4A000 +: hi Comment gui=none guifg=#5971AD guibg=#000000 +: hi Constant guifg=#CC0000 +: hi Special guifg=#06989A +: hi Identifier guifg=#06989A +: hi Statement guifg=#4E9A06 +: hi Operator guifg=#4E9A06 +: hi PreProc guifg=#CC0000 +: hi Type gui=bold guifg=#C4A000 +: hi Delimiter gui=none guifg=#4E9A06 +: hi Ignore gui=bold guifg=#D3D3D3 +: hi Todo guifg=#000000 guibg=#C4A000 +: hi Underlined gui=underline +: hi Include guifg=#CC0000 +: hi Define guifg=#C4A000 +: hi Function guifg=#06989A +: hi Structure guifg=#4E9A06 +: hi MatchParen gui=bold guifg=#D3D3D3 guibg=#5971AD +: hi ColorColumn guibg=#00005F +: hi SpellBad gui=underline guifg=#75507B guibg=#000000 +: hi SpellCap gui=underline guifg=#75507B guibg=#000000 +: hi SpellLocal gui=underline guifg=#75507B guibg=#000000 +: hi SpellRare gui=underline guifg=#75507B guibg=#000000 +: hi TrailingWhitespace guibg=#080000 +: hi ExtraWhitespace guibg=#CC0000 +: hi WarningMsg guifg=#CC0000 +: hi ErrorMsg gui=bold guifg=#D3D3D3 guibg=#CC0000 +: hi Error gui=bold guifg=#D3D3D3 guibg=#CC0000 diff --git a/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim b/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim new file mode 100644 index 0000000..f631f63 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim @@ -0,0 +1,67 @@ +" Vim color file +" Name: frugal-cterm-sisu +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-09 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim> +" <https://sisudoc.org/> +" Note: 8 color cterm, related colorschemes 8 & sparse +:set background=dark +:hi clear +if exists("syntax_on") + syntax reset +endif +:let colors_name = "frugal-cterm-sisu" +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +:hi Normal ctermbg=0 ctermfg=7 +:hi Cursor cterm=reverse +:hi lCursor cterm=reverse +:hi StatusLine cterm=bold,reverse +:hi StatusLineNC cterm=reverse +:hi Search cterm=none ctermbg=2 ctermfg=0 +:hi IncSearch cterm=bold ctermbg=2 ctermfg=7 +:hi SpecialKey ctermfg=4 +:hi Visual cterm=reverse +:hi VisualNOS cterm=bold,underline +:hi MoreMsg ctermfg=2 +:hi ModeMsg cterm=bold +:hi Question ctermfg=2 +:hi Title cterm=bold ctermfg=3 +:hi NonText cterm=bold ctermfg=4 +:hi LineNr cterm=bold ctermbg=0 ctermfg=0* +:hi Directory ctermfg=4 +:hi WildMenu ctermbg=3 ctermfg=0 +:hi VertSplit cterm=reverse +:hi Folded cterm=none ctermbg=0 ctermfg=7 +:hi FoldColumn ctermbg=7 ctermfg=4 +:hi DiffChange cterm=none ctermbg=7 ctermfg=0 +:hi DiffText cterm=none ctermbg=6 ctermfg=0 +:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 +:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 +:hi String cterm=none ctermfg=3 +:hi Comment cterm=none ctermbg=0 ctermfg=7 +:hi Constant ctermfg=1 +:hi Special ctermfg=6 +:hi Identifier ctermfg=6 +:hi Statement ctermfg=6 +:hi Operator ctermfg=1 +:hi PreProc ctermbg=7 ctermfg=1 +:hi Type ctermfg=2 +:hi Delimiter cterm=none ctermfg=1 +:hi Ignore cterm=bold ctermfg=7 +:hi Todo ctermbg=3 ctermfg=0 +:hi Underlined cterm=underline +:hi Include ctermfg=1 +:hi Define ctermfg=3 +:hi Function ctermfg=6 +:hi Structure ctermfg=2 +:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +:hi CursorLine cterm=bold,underline +:hi CursorColumn cterm=bold +:hi ColorColumn ctermbg=8 +:hi SpellBad cterm=none ctermbg=7 ctermfg=0 +:hi SpellCap cterm=none ctermbg=7 ctermfg=0 +:hi SpellLocal cterm=none ctermbg=7 ctermfg=0 +:hi SpellRare cterm=none ctermbg=7 ctermfg=0 +:hi WarningMsg ctermfg=1 +:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 +:hi Error cterm=bold ctermbg=1 ctermfg=7 diff --git a/sundry/editor-syntax-etc/vim/colors/redo.vim b/sundry/editor-syntax-etc/vim/colors/redo.vim new file mode 100644 index 0000000..184961ca --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/redo.vim @@ -0,0 +1,78 @@ +"%% Vim color file +" Name: redo +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <> +" Note: this is a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "redo" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=242 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn ctermfg=231 ctermbg=236 "bg:233,59,236 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=248 ctermbg=0 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=172 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=4 "ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif diff --git a/sundry/editor-syntax-etc/vim/colors/shift.vim b/sundry/editor-syntax-etc/vim/colors/shift.vim new file mode 100644 index 0000000..2174630 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/shift.vim @@ -0,0 +1,78 @@ +"%% Vim color file +" Name: shift +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-09 +" URL: <> +" Note: this is a shift in redo which as a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "shift" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=7 ctermbg=236 "bg:233,59 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=242 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=4 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=6 ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif diff --git a/sundry/editor-syntax-etc/vim/colors/slate.vim b/sundry/editor-syntax-etc/vim/colors/slate.vim new file mode 100644 index 0000000..6801e2a --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/slate.vim @@ -0,0 +1,82 @@ +"%% SiSU Vim color file +" Name: Slate +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-09, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/slate.vim> +" <https://sisudoc.org/> +" <https://sisudoc.org/> +" Notes: cterm now uses frugal-sisu 8 colors for term +" (for gui originally looked at desert Hans Fugal <hans@fugal.net> +" <http://hans.fugal.net/vim/colors/desert.vim> (April/May 2003)) +: hi clear +: if exists("syntax_on") +: syntax reset +: endif +: let colors_name = "slate" +: set background=dark +" ------- +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +" ------- +: hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white +: hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey +: hi lCursor term=reverse cterm=reverse +: hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black +: hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat +: hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green +: hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen +: hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki +: hi VisualNOS term=bold,underline cterm=bold,underline +: hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen +: hi ModeMsg term=bold cterm=bold guifg=goldenrod +: hi Question term=standout ctermfg=2 guifg=springgreen +: hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold +: hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue +: hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 +: hi Directory term=bold ctermfg=4 +: hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black +: hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 +: hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 +: hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white +: hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white +: hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white +: hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black +: hi String cterm=none ctermfg=3 guifg=SkyBlue +: hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 +: hi Constant term=underline ctermfg=1 guifg=#ffa0a0 +: hi Special term=bold ctermfg=6 guifg=darkkhaki +: hi Identifier term=underline ctermfg=6 guifg=salmon +: hi Statement term=bold ctermfg=6 guifg=CornflowerBlue +: hi Operator term=bold ctermfg=1 guifg=red +: hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red +: hi Type term=underline ctermfg=2 guifg=CornflowerBlue +: hi Delimiter term=none cterm=none ctermfg=1 +: hi Ignore cterm=bold ctermfg=7 guifg=grey40 +: hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered +: hi Underlined term=underline cterm=underline +: hi Include ctermfg=1 guifg=red +: hi Define ctermfg=3 gui=bold guifg=gold +: hi Function ctermfg=6 guifg=navajowhite +: hi Structure ctermfg=2 guifg=green +: hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +: hi CursorLine cterm=bold,underline guibg=black +: hi CursorColumn cterm=bold guibg=black +: hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon +: hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: if &diff +: highlight! link DiffText MatchParen +: endif +: hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black +: hi Red ctermbg=black ctermfg=red guibg=black guifg=red +: hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta +: hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue +: hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan +: hi Green ctermbg=black ctermfg=green guibg=black guifg=green +: hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow +: hi White ctermbg=black ctermfg=white guibg=black guifg=white diff --git a/sundry/editor-syntax-etc/vim/filetype.vim b/sundry/editor-syntax-etc/vim/filetype.vim new file mode 100644 index 0000000..48f8967 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/filetype.vim @@ -0,0 +1,8 @@ +" SiSU filetype file +if exists("did_load_filetypes") + finish +endif +augroup filetypedetect + au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu-spine + au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu-spine +augroup END diff --git a/sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim b/sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim new file mode 100644 index 0000000..43c7e53 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim @@ -0,0 +1,224 @@ +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah <ralph@amissah.com> +" SiSU Markup: SiSU (sisu-3.3) 2012-08-18 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype off +":filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map <silent> <C-m> :if &guioptions =~# 'm' <Bar> + \set guioptions-=m <Bar> + \set guioptions-=T <Bar> + \else <Bar> + \set guioptions+=m <Bar> + \set guioptions-=T <Bar> + \endif<CR> +:set paste +""% statusline +"set statusline= " +"set fillchars=stl:―,stlnc:—,vert:│,fold:۰,diff:· +"" [ buffer number ] +"set statusline +=%#Normal#[ " +"set statusline +=%#Identifier#%n " buffer number +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ file name (& modified?) ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Statement#%<%F%* " full path +""set statusline +=%#Statement#%<%t " full path +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ column : line number / number of lines in file, percentage of file ] [%v:%l/%L\ %p%%] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Identifier#%v " column & line +"set statusline +=%#Normal#: " +"set statusline +=%#Identifier#%l " column & line +"set statusline +=%#SpecialKey#/%L\ " total lines +"set statusline +=%#Identifier#%p " percentage of file +"set statusline +=%#SpecialKey#%% " +"set statusline +=%#Normal#] " " +"" [ file format : file type ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#SpecialKey#%{&fenc} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%{&ff} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%y " file type +"set statusline +=%#Normal#] " +"" [ character under cursor ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#String#0x%04B " character under cursor +"set statusline +=%#Normal#]\ " +"" [ syntastic ] +"set statusline +=%#warningmsg# +"set statusline +=%{SyntasticStatuslineFlag()}\ " +""set statusline+=%* +"" Status line background +"set statusline +=%#Folded#\ " +"" misc +"set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map <leader>paste :set invpaste<cr> +"% wrap/formatting paragraph according to the current 'textwidth' with ^\ (control-\): +:imap <C-\> <C-O>gqap +:nmap <C-\> gqap +:vmap <C-\> gq +"% save file, go to next file in buffer +:map <leader>nf :w <enter> :n <enter> +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map <leader>ls :vs<cr> :Explore<cr> +:map <leader>dir :vs<cr> :Explore<cr> +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap <Down> gj +:nnoremap <Up> gk +:vnoremap <Down> gj +:vnoremap <Up> gk +:inoremap <Down> <C-o>gj +:inoremap <Up> <C-o>gk +"% search and replace +:map <leader>rd :.,$s///c "search and replace down +:map <leader>rg :%s///c "search and replace whole file +:map <leader>rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map <leader>e :e <c-r>=expand("%:p:h") . "/" <cr> +:map <leader>pwd :exe 'cd ' . expand ("%:p:h")<cr> +"% searchhighlight t93: Toggle search highlight <C-n> +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap <silent> <C-n> :silent call ToggleHLSearched()<cr> +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map <leader>fs :set foldmethod=expr foldcolumn=2 foldlevel=0 <cr> +:map <leader>ff :F<cr> +:map <leader>fe :F<cr> zE +"% foldtoggle Fold Toggle mapped to <space> +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap <space> :call ToggleFold()<cr> +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake(<q-args>) +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% linenumbering, on, relative, off +:map <Leader>nn :set <c-r>={'00':'','01':'r','10':'nor'}[&rnu.&nu]<CR>nu<CR> +"% cursorline +:map <leader>cu :if &cursorcolumn <Bar> + \set nocursorline nocursorcolumn <Bar> + \else <Bar> + \set cursorline cursorcolumn <Bar> + \endif<cr> +:map <leader>cu- :set nocursorline nocursorcolumn<cr> +:map <leader>cu+ :set cursorline cursorcolumn<cr> diff --git a/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim b/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim new file mode 100644 index 0000000..43c7e53 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim @@ -0,0 +1,224 @@ +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah <ralph@amissah.com> +" SiSU Markup: SiSU (sisu-3.3) 2012-08-18 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype off +":filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map <silent> <C-m> :if &guioptions =~# 'm' <Bar> + \set guioptions-=m <Bar> + \set guioptions-=T <Bar> + \else <Bar> + \set guioptions+=m <Bar> + \set guioptions-=T <Bar> + \endif<CR> +:set paste +""% statusline +"set statusline= " +"set fillchars=stl:―,stlnc:—,vert:│,fold:۰,diff:· +"" [ buffer number ] +"set statusline +=%#Normal#[ " +"set statusline +=%#Identifier#%n " buffer number +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ file name (& modified?) ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Statement#%<%F%* " full path +""set statusline +=%#Statement#%<%t " full path +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ column : line number / number of lines in file, percentage of file ] [%v:%l/%L\ %p%%] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Identifier#%v " column & line +"set statusline +=%#Normal#: " +"set statusline +=%#Identifier#%l " column & line +"set statusline +=%#SpecialKey#/%L\ " total lines +"set statusline +=%#Identifier#%p " percentage of file +"set statusline +=%#SpecialKey#%% " +"set statusline +=%#Normal#] " " +"" [ file format : file type ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#SpecialKey#%{&fenc} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%{&ff} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%y " file type +"set statusline +=%#Normal#] " +"" [ character under cursor ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#String#0x%04B " character under cursor +"set statusline +=%#Normal#]\ " +"" [ syntastic ] +"set statusline +=%#warningmsg# +"set statusline +=%{SyntasticStatuslineFlag()}\ " +""set statusline+=%* +"" Status line background +"set statusline +=%#Folded#\ " +"" misc +"set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map <leader>paste :set invpaste<cr> +"% wrap/formatting paragraph according to the current 'textwidth' with ^\ (control-\): +:imap <C-\> <C-O>gqap +:nmap <C-\> gqap +:vmap <C-\> gq +"% save file, go to next file in buffer +:map <leader>nf :w <enter> :n <enter> +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map <leader>ls :vs<cr> :Explore<cr> +:map <leader>dir :vs<cr> :Explore<cr> +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap <Down> gj +:nnoremap <Up> gk +:vnoremap <Down> gj +:vnoremap <Up> gk +:inoremap <Down> <C-o>gj +:inoremap <Up> <C-o>gk +"% search and replace +:map <leader>rd :.,$s///c "search and replace down +:map <leader>rg :%s///c "search and replace whole file +:map <leader>rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map <leader>e :e <c-r>=expand("%:p:h") . "/" <cr> +:map <leader>pwd :exe 'cd ' . expand ("%:p:h")<cr> +"% searchhighlight t93: Toggle search highlight <C-n> +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap <silent> <C-n> :silent call ToggleHLSearched()<cr> +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map <leader>fs :set foldmethod=expr foldcolumn=2 foldlevel=0 <cr> +:map <leader>ff :F<cr> +:map <leader>fe :F<cr> zE +"% foldtoggle Fold Toggle mapped to <space> +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap <space> :call ToggleFold()<cr> +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake(<q-args>) +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% linenumbering, on, relative, off +:map <Leader>nn :set <c-r>={'00':'','01':'r','10':'nor'}[&rnu.&nu]<CR>nu<CR> +"% cursorline +:map <leader>cu :if &cursorcolumn <Bar> + \set nocursorline nocursorcolumn <Bar> + \else <Bar> + \set cursorline cursorcolumn <Bar> + \endif<cr> +:map <leader>cu- :set nocursorline nocursorcolumn<cr> +:map <leader>cu+ :set cursorline cursorcolumn<cr> diff --git a/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim b/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim new file mode 100644 index 0000000..2de0095 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim @@ -0,0 +1,284 @@ +" SiSU Vim syntax file (sisu-spine) +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" sisu-spine Markup: sisu-spine +" Last Change: 2017-06-22, 2025-02-21 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim> +" <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+table" end="^'''\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\(block\|group\|poem\|alt\)" end="^'''\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\box\(\.[a-z]\+\)\?" end="^'''\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^'''\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^'''\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^'''\s\+quote" end="^'''\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/sundry/editor-syntax-etc/vim/syntax/sisu.vim b/sundry/editor-syntax-etc/vim/syntax/sisu.vim new file mode 100644 index 0000000..21fd3bc --- /dev/null +++ b/sundry/editor-syntax-etc/vim/syntax/sisu.vim @@ -0,0 +1,277 @@ +" SiSU Vim syntax file +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" Last Change: 2017-06-22 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/sundry/editor-syntax-etc/vim/vim-sisu.yaml b/sundry/editor-syntax-etc/vim/vim-sisu.yaml new file mode 100644 index 0000000..ca665bc --- /dev/null +++ b/sundry/editor-syntax-etc/vim/vim-sisu.yaml @@ -0,0 +1,7 @@ +#vim-addons: debian vim-addon-manager +addon: sisu +description: SiSU documents - structuring, publishing in multiple formats and search +basedir: /usr/share/vim-scripts/ +files: + - ftplugin/sisu.vim + - syntax/sisu.vim diff --git a/views/version.txt b/views/version.txt index fecec3f..9782cfa 100644 --- a/views/version.txt +++ b/views/version.txt @@ -4,7 +4,7 @@ struct Version { int minor; int patch; } -enum _ver = Version(0, 17, 0); +enum _ver = Version(0, 18, 0); version (Posix) { version (DigitalMars) { } else version (LDC) { |