diff options
-rw-r--r-- | .env/echo-nixNote | 238 | ||||
-rw-r--r-- | .env/nix-commands | 19 | ||||
-rw-r--r-- | .envrc-nix | 23 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | README | 30 | ||||
-rw-r--r-- | README.md | 28 | ||||
-rw-r--r-- | flake.lock | 6 | ||||
-rw-r--r-- | flake.nix | 22 | ||||
-rw-r--r-- | nix-overlays/README | 12 | ||||
-rw-r--r-- | nix-overlays/dmd/generic.nix | 10 | ||||
-rw-r--r-- | nix-overlays/dmd/package.nix | 6 | ||||
-rw-r--r-- | nix-overlays/ldc/package.nix | 4 | ||||
-rw-r--r-- | org/config_env.org | 17 | ||||
-rw-r--r-- | org/config_git.org | 3 | ||||
-rw-r--r-- | org/config_nix.org | 44 | ||||
-rw-r--r-- | org/in_source_files.org | 10 | ||||
-rw-r--r-- | org/nix-develop-dlang-shared.org | 111 | ||||
-rw-r--r-- | org/nixpkgs_overlays_d_related.org | 21 | ||||
-rw-r--r-- | org/ocda.org | 18 | ||||
-rw-r--r-- | org/out_src_pod.org | 39 | ||||
-rw-r--r-- | org/spine_info.org | 32 | ||||
-rw-r--r-- | src/sisudoc/io_in/read_source_files.d | 10 | ||||
-rw-r--r-- | src/sisudoc/io_out/source_pod.d | 39 | ||||
-rw-r--r-- | src/sisudoc/meta/metadoc_from_src.d | 4 |
24 files changed, 288 insertions, 461 deletions
diff --git a/.env/echo-nixNote b/.env/echo-nixNote deleted file mode 100644 index 36dfa3a..0000000 --- a/.env/echo-nixNote +++ /dev/null @@ -1,238 +0,0 @@ -echo '-*- mode: org -*- - -* nixpkgs path? - - # eval "$(nix print-dev-env)" -' > nixNote_.org - -echo " <nixpkgs> == `nix-instantiate --find-file nixpkgs`" >> nixNote_.org - -echo ' -* nix build and show derivation - -#+BEGIN_SRC shell -nix-shell --pure - -nix-build -nix build -f default.nix --print-build-logs -nix shell -f default.nix --print-build-logs -nix develop --build -f derivation.nix -I .envrc --print-build-logs - -nix-instantiate | nix-build - -nix-instantiate -I .envrc | nix-build -I .envrc -nix build `nix-instantiate` -nix build `nix-instantiate -I .envrc` - -nix develop - -nix-instantiate | nix show-derivation | jq -nix-instantiate -I .envrc | nix show-derivation -f derivation.nix -I .envrc | jq - -nix-instantiate | nix show-derivation --recursive | jq -nix-instantiate -I .envrc | nix show-derivation -f derivation.nix --recursive -I .envrc | jq - -nix search --json 2>/dev/null |jq -#+END_SRC - -* version and build info - -#+BEGIN_SRC sh' >> nixNote_.org - -echo 'spine version (git) == $SpineVER' >> nixNote_.org -echo "spine version (git) == $SpineVER" >> nixNote_.org -echo 'nix-instantiate == `nix-instantiate`' >> nixNote_.org -echo "nix-instantiate == `nix-instantiate`" >> nixNote_.org - -echo "#+END_SRC - -* initialised shell variables - -#+BEGIN_SRC shell -SpineSRC=$SpineSRC -SpineDOC=$SpineDOC -SpinePOD=$SpinePOD -SpineOUTversioned=$SpineOUTversioned -SpineOUT=$SpineOUT -#+END_SRC -" >> nixNote_.org - -echo '* spine run instruction examples -** parallelized tasks -*** doc source - -#+BEGIN_SRC shell -$SpineBIN/spine --very-verbose --pod --source --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** html & epub output - -#+BEGIN_SRC shell -$SpineBIN/spine --very-verbose --html --epub --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** sqlite db for each document - populate each db - -#+BEGIN_SRC shell -$SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** doc source; html, epub; sqlite outputs - -#+BEGIN_SRC shell -$SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** curate (authors topics) - -#+BEGIN_SRC shell -$SpineBIN/spine --very-verbose --curate --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** html, curate - -#+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 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 shell -$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned" -#+END_SRC - -*** sqlite db (shared) - populate db - -#+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 shell -$SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUTversioned" -#+END_SRC - -*** sqlite db (shared) - create & populate db (single step) - -#+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 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 shell -cat $SpinePOD/.dr/config_local_site -$SpineBIN/spine --show-config $SpinePOD -$SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD -#+END_SRC - -** cgi operations (output to $SpineOUT /var/www) - -#+BEGIN_SRC shell -$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/* - -$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/* - -$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 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 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 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 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 - -*** generate html (linked to search form), sql output, curate COMPOSITE with resource configuration - -if names and paths are configured in resource configuration file, e.g. $SpinePOD/.rc/config_local_site - -#+BEGIN_SRC shell -$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update $SpinePOD/* -#+END_SRC - -#+BEGIN_SRC yaml -# sample resource configuration file ( $SpinePOD/.rc/config_local_site ) -output: - path: "/srv/www/spine" -default: - language: "en" - papersize: "a4" - text_wrap: "80" - digest: "sha256" -webserv: - http: "http" - domain: "localhost" - data_http: "http" - data_domain: "localhost" - data_root_url: "https://sisudoc.org" - data_root_path: "/srv/www/spine" - images_root_part: "image" - cgi_search_form_title: "≅ SiSU Spine search ፨" - cgi_http: "https" - cgi_domain: "sisudoc.org" - cgi_bin_url: "http://sisudoc.org/cgi-bin" - cgi_bin_part: "cgi-bin" - cgi_bin_path: "/var/www/cgi/cgi-bin" - cgi_search_script: "spine_search" - cgi_action: "https://sisudoc.org/spine_search" - db_sqlite_filename: "spine.search.db" - db_sqlite_path: "/var/www/sqlite" -#+END_SRC - -*** make search form - -#+BEGIN_SRC shell -$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site -#+END_SRC - -*** latex - -#+BEGIN_SRC shell -$SpineBIN/spine --latex --serial --output="$SpineOUT" $SpinePOD/* -ls $SpineOutstatic/latex/*.tex -#+END_SRC -' >> nixNote_.org - -#cat nixNote_.org - -#echo "emacs nixNote_.org" -#echo "cat nixNote_.org" diff --git a/.env/nix-commands b/.env/nix-commands deleted file mode 100644 index de52220..0000000 --- a/.env/nix-commands +++ /dev/null @@ -1,19 +0,0 @@ -- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell - -- nix build ".#default" --print-build-logs -- nix build ".#spine-dmd" --print-build-logs -- nix build ".#spine-ldc" --print-build-logs - -- nix develop - - nix develop ".#devShell" --print-build-logs - - nix develop ".#devShell-html" --print-build-logs - - nix develop ".#devShell-epub" --print-build-logs - - nix develop ".#devShell-latex-pdf" --print-build-logs - - nix develop ".#devShell-sqlite" --print-build-logs - - nix develop ".#devShell-i18n" --print-build-logs - -nix run .#default --print-build-logs - -nix develop --build ".#default" --print-build-logs - -nix-shell '<nixpkgs>' -A nix --pure @@ -1,7 +1,7 @@ NIX_ENFORCE_PURITY=1 # - https://github.com/nix-community/nix-direnv -NixDirEnvVersion="3.0.6" -NixDirEnvSHA="sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=" +NixDirEnvVersion="3.0.7" +NixDirEnvSHA="sha256-bn8WANE5a91RusFmRI7kS751ApelG02nMcwRekC/qzc=" if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}" fi @@ -24,11 +24,11 @@ echo ' • 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.110.0, ldc-1.40.1, dub-1.39.0, dtools-2.110.0) - ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-dmd" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-ldc" --print-build-logs -c zsh + • nix develop using package overlays: (dmd-2.111.0, ldc-1.41.0, dub-1.39.0, dtools-2.110.0) + ❯❯ nix develop ".#dsh-overlay-dmd" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs -c zsh ❯❯ nix flake show • to build project: @@ -40,16 +40,16 @@ echo ' • 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.110.0, ldc-1.40.1, dub-1.39.0, dtools-2.110.0) + • nix build using package overlays: (dmd-2.111.0, ldc-1.41.0, dub-1.39.0, dtools-2.110.0) ❯❯ 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): - ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-dmd" --print-build-logs -c zsh ❯❯ dub --verbose --compiler=dmd --config=dmd - ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-ldc" --print-build-logs -c zsh ❯❯ dub --verbose --compiler=ldmd2 --config=ldmd2 • for develop environment & build options @@ -63,6 +63,9 @@ echo ' ❯❯ ${SpineBIN} -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/* ❯❯ ${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/* + + ❯❯ ${SpineBIN} -v --sqlite-db-create --sqlite-db-filename=${SpineSQLdb} --sqlite-db-path=./_tmp-db + ❯❯ ${SpineBIN} -v --sqlite-update --sqlite-db-filename=${SpineSQLdb} --sqlite-db-path=./_tmp-db ./markup/pod/* ' echo "• ❯❯ ${SpineBIN} -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/* @@ -13,8 +13,6 @@ !.envrc !.envrc-nix !.envrc-git-init -!.env -!.env/** !nix-overlays !nix-overlays/** !README.md @@ -26,6 +24,7 @@ !configuration.txt !*.json !*.sdl +!*.md !meson.build !tangle !*.org @@ -258,25 +258,18 @@ for a document collection you can point to the document collection: ${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-search --html-link-pdf --html-link-curate --html-link-markup --cgi-sqlite-search-filename="${SpineCGIform}" --cgi-url-action="${SpineSearchActionRemote}" --curate --sqlite-update --sqlite-kb-filename="${SpineSQLdb}" --output=${SpineOUT} ${SpinePOD}/* -*** generate a cgi search form in d +*** generate a cgi search form -spine -v --cgi-search-form-codegen \ - --output=/var/www/html \ - ~spineMarkupSamples/pod - -spine -v --cgi-search-form-codegen --config=~spineMarkupSamples/pod +The CGI search form is built separately in the sisudoc-spine-search-cgi/ directory. -spine -v --cgi-search-form-codegen --config=~spineMarkupSamples/pod/.dr/config_local_site +Steps: +1. Clone the sisudoc-spine-search-cgi repository +2. Configure views/configuration.txt with your web server settings +3. Build the CGI binary using Nix or dub +4. Deploy the CGI binary to your web server's cgi-bin directory -spine --cgi-search-form-codegen --output=`echo ~webDocRoot` ~spineMarkupSamples/pod - -spine --cgi-search-form-codegen --cgi-sqlite-search-filename="spine_search" --output=`echo ~webDocRoot` - -spine -v --cgi-search-form-codegen \ - --sqlite-db-filename="spine.search.db" \ - --cgi-sqlite-search-filename="spine-search" \ - --output=/var/www/html \ - ~spineMarkupSamples/pod +For detailed instructions, see: + sisudoc-spine-search-cgi/README.md **** compile the cgi search form @@ -306,14 +299,15 @@ cgi-bin directory ${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-search --html-link-pdf --html-link-curate --html-link-markup --cgi-sqlite-search-filename="${SpineCGIform}" --cgi-url-action="${SpineSearchActionLocal}" --curate --sqlite-update --sqlite-db-filename="${SpineSQLdb}" --output=${SpineOUT} ${SpinePOD}/* -*** create db & search form +*** create db spine -v \ --sqlite-db-create --sqlite-db-filename="spine.search.db" \ - --cgi-search-form-codegen --cgi-sqlite-search-filename="spine-search" \ --output=/var/www/html \ ~spineMarkupSamples/pod/* +Note: The CGI search form is built separately in sisudoc-spine-search-cgi/ + *** html with links to search form ${SpineBIN} -v --epub --html --html-link-curate --curate --output=${SpineOUT} ${SpinePOD}/* @@ -243,23 +243,16 @@ for a document collection you can point to the document collection: ### generate a cgi search form in d -spine -v --cgi-search-form-codegen \ - --output=/var/www/html \ - ~spineMarkupSamples/pod - -spine -v --cgi-search-form-codegen --config=~spineMarkupSamples/pod +The CGI search form is built separately in the sisudoc-spine-search-cgi/ directory. -spine -v --cgi-search-form-codegen --config=~spineMarkupSamples/pod/.dr/config_local_site +Steps: +1. Clone the sisudoc-spine-search-cgi repository +2. Configure views/configuration.txt with your web server settings +3. Build the CGI binary using Nix or dub +4. Deploy the CGI binary to your web server's cgi-bin directory -spine --cgi-search-form-codegen --output=`echo ~webDocRoot` ~spineMarkupSamples/pod - -spine --cgi-search-form-codegen --cgi-sqlite-search-filename="spine_search" --output=`echo ~webDocRoot` - -spine -v --cgi-search-form-codegen \ - --sqlite-db-filename="spine.search.db" \ - --cgi-sqlite-search-filename="spine-search" \ - --output=/var/www/html \ - ~spineMarkupSamples/pod +For detailed instructions, see: + sisudoc-spine-search-cgi/README.md #### compile the cgi search form @@ -289,14 +282,15 @@ cgi-bin directory ${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-search --html-link-pdf --html-link-curate --html-link-markup --cgi-sqlite-search-filename="${SpineCGIform}" --cgi-url-action="${SpineSearchActionLocal}" --curate --sqlite-update --sqlite-db-filename="${SpineSQLdb}" --output=${SpineOUT} ${SpinePOD}/* -### create db & search form +### create db spine -v \ --sqlite-db-create --sqlite-db-filename="spine.search.db" \ - --cgi-search-form-codegen --cgi-sqlite-search-filename="spine-search" \ --output=/var/www/html \ ~spineMarkupSamples/pod/* +Note: The CGI search form is built separately in sisudoc-spine-search-cgi/ + ### html with links to search form ${SpineBIN} -v --epub --html --html-link-curate --curate --output=${SpineOUT} ${SpinePOD}/* @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1740019556, - "narHash": "sha256-vn285HxnnlHLWnv59Og7muqECNMS33mWLM14soFIv2g=", + "lastModified": 1749213349, + "narHash": "sha256-UAaWOyQhdp7nXzsbmLVC67fo+QetzoTm9hsPf9X3yr4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dad564433178067be1fbdfcce23b546254b6d641", + "rev": "a4ff0e3c64846abea89662bfbacf037ef4b34207", "type": "github" }, "original": { @@ -21,8 +21,8 @@ runHook postCheck ''; localOverlay = (final: prev: { - ldc = prev.callPackage ./nix-overlays/ldc { }; # -> ok 1.40.1 - dmd = prev.callPackage ./nix-overlays/dmd { }; # -> ok 2.110.0 + ldc = prev.callPackage ./nix-overlays/ldc { }; # -> ok 1.41.0 + dmd = prev.callPackage ./nix-overlays/dmd { }; # -> ok 2.111.0 dub = prev.callPackage ./nix-overlays/dub { }; # -> ? 1.39.0 dtools = prev.callPackage ./nix-overlays/dtools { }; # -> ok 2.110.0 #gdc = prev.callPackage ./nix-overlays/gdc { }; @@ -131,7 +131,7 @@ spine-overlay-dmd = stdenv.mkDerivation { inherit pname; inherit version; - #name = "spine-0.18.0 dmd-2.110.0 dub-1.39.0"; + #name = "spine-0.18.0 dmd-2.111.0 dub-1.39.0"; meta.mainProgram = "spine-dmd"; executable = true; src = self; @@ -155,7 +155,7 @@ spine-overlay-ldc = stdenv.mkDerivation { inherit pname; inherit version; - #name = "spine-0.18.0 ldc-1.40.1 dub-1.39.0"; + #name = "spine-0.18.0 ldc-1.41.0 dub-1.39.0"; meta.mainProgram = "spine-ldc"; executable = true; src = self; @@ -215,7 +215,7 @@ in with pkgs-nix; { dsh-overlay = mkShell { - name = "spine-0.18.0 base dev shell, ldc-1.40.1, dub-1.39.0 - dtools-2.110.0"; + name = "spine-0.18.0 base dev shell, ldc-1.41.0, dub-1.39.0 - dtools-2.110.0"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -228,7 +228,7 @@ ]; inherit shellHook; }; - dsh-nixpkgs-dmd-dub = mkShell { + dsh-nixpkgs-dmd = mkShell { name = "spine-0.18.0 base dev shell"; inherit shell; inherit devEnv; @@ -241,7 +241,7 @@ ]; inherit shellHook; }; - dsh-nixpkgs-ldc-dub = mkShell { + dsh-nixpkgs-ldc = mkShell { name = "spine-0.18.0 base dev shell"; inherit shell; inherit devEnv; @@ -254,8 +254,8 @@ ]; inherit shellHook; }; - dsh-overlay-dmd-dub = mkShell { - name = "spine-0.18.0 base dev shell, dmd-2.110.0, dub-1.39.0 - dtools-2.110.0"; + dsh-overlay-dmd = mkShell { + name = "spine-0.18.0 base dev shell, dmd-2.111.0, dub-1.39.0 - dtools-2.110.0"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -267,8 +267,8 @@ ]; inherit shellHook; }; - dsh-overlay-ldc-dub = mkShell { - name = "spine-0.18.0 base dev shell, ldc-1.40.1, dub-1.39.0 - dtools-2.110.0"; + dsh-overlay-ldc = mkShell { + name = "spine-0.18.0 base dev shell, ldc-1.41.0, dub-1.39.0 - dtools-2.110.0"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ diff --git a/nix-overlays/README b/nix-overlays/README index e871693..59b02ca 100644 --- a/nix-overlays/README +++ b/nix-overlays/README @@ -16,11 +16,11 @@ compiler and build tools: ldc, dub and dtools, than exist in nixpkgs at the time of publishing, in some cases with additional fixes. nix overlays for (updates nixpkgs, more recent versions of): - - ldc ( 1.30.0 -> 1.40.1 ) + - ldc ( 1.30.0 -> 1.41.0 ) - dub ( 1.23.0 -> 1.39.0 ) [for nix versions 1.31.0 ... 1.33.0 broken] - dtools ( 2.095.1 -> 2.110.0 ) - - dmd ( 2.106.1 -> 2.110.0 ) + - dmd ( 2.106.1 -> 2.111.0 ) - gdc [not yet available] dlang-nix-flakes.org --❯ @@ -47,26 +47,26 @@ search nixpkgs here: - https://search.nixos.org/packages?channel=unstable&from=0&size=100&sort=relevance&query= ** compilers -*** ldc OK ✓ ( 1.30.0 -> 1.40.1 ) +*** ldc OK ✓ ( 1.30.0 -> 1.41.0 ) - https://wiki.dlang.org/LDC - https://github.com/ldc-developers/ldc - https://github.com/ldc-developers/ldc/releases - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.40.1.tar.gz + nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.41.0.tar.gz - https://github.com/ldc-developers/ldc/issues - 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.110.0 ) +*** dmd OK ✓ ( 2.100.2 -> 2.111.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.110.0.tar.gz + nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.111.0.tar.gz - https://github.com/dlang/dmd/pulls - version in nixpkgs: diff --git a/nix-overlays/dmd/generic.nix b/nix-overlays/dmd/generic.nix index e130d69..59a781e 100644 --- a/nix-overlays/dmd/generic.nix +++ b/nix-overlays/dmd/generic.nix @@ -96,7 +96,9 @@ stdenv.mkDerivation (finalAttrs: { rm dmd/compiler/test/runnable/gdb4149.d rm dmd/compiler/test/runnable/gdb4181.d rm dmd/compiler/test/compilable/ddocYear.d - rm dmd/compiler/test/fail_compilation/needspkgmod.d + rm dmd/compiler/test/compilable/sarif_success_test.d + rm dmd/compiler/test/fail_compilation/sarif_test.d + rm dmd/compiler/test/fail_compilation/sarifmultiple_test.d # Disable tests that rely on objdump whitespace until fixed upstream: # https://issues.dlang.org/show_bug.cgi?id=23317 @@ -108,9 +110,9 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace dmd/compiler/test/dshell/test6952.d --replace-fail "/usr/bin/env bash" "${bash}/bin/bash" '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace phobos/std/socket.d --replace-fail "assert(ih.addrList[0] == 0x7F_00_00_01);" "" - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - substituteInPlace phobos/std/socket.d --replace-fail "foreach (name; names)" "names = []; foreach (name; names)" - ''; + ''; # + lib.optionalString stdenv.hostPlatform.isDarwin '' + # substituteInPlace phobos/std/socket.d --replace-fail "foreach (name; names)" "names = []; foreach (name; names)" + #''; nativeBuildInputs = [ makeWrapper diff --git a/nix-overlays/dmd/package.nix b/nix-overlays/dmd/package.nix index 69a9f75..3aa1183 100644 --- a/nix-overlays/dmd/package.nix +++ b/nix-overlays/dmd/package.nix @@ -1,5 +1,5 @@ import ./generic.nix { - version = "2.110.0"; - dmdHash = "sha256-icXp9xWF2AI2gp7z/lQFAChmXfQePe9b5pbpQ9Mn19Y="; - phobosHash = "sha256-CmJpcHM+sIsaYBlpALCFoQFG+93s8gUyWmM0tYqjXkk="; + version = "2.111.0"; + dmdHash = "sha256-2bjsGa9nTny818dLRV6LKkes+Ycq8W+PFjwhGVrD5TM="; + phobosHash = "sha256-9jySZbODoL8sULhYKj/l4+c/uiG5xY2dO240k9XQtPk="; } diff --git a/nix-overlays/ldc/package.nix b/nix-overlays/ldc/package.nix index 39b510a..ff2089b 100644 --- a/nix-overlays/ldc/package.nix +++ b/nix-overlays/ldc/package.nix @@ -31,13 +31,13 @@ in stdenv.mkDerivation (finalAttrs: { pname = "ldc"; - version = "1.40.1"; + version = "1.41.0"; src = fetchFromGitHub { owner = "ldc-developers"; repo = "ldc"; rev = "v${finalAttrs.version}"; - hash = "sha256-WdnwdH25A5oMNNY3uWG2hxnaAT+S1hNuP7LElH3uuuk="; + hash = "sha256-6LcpY3LSFK4KgEiGrFp/LONu5Vr+/+vI04wEEpF3s+s="; fetchSubmodules = true; }; diff --git a/org/config_env.org b/org/config_env.org index db6af9d..ec6a1d5 100644 --- a/org/config_env.org +++ b/org/config_env.org @@ -80,11 +80,11 @@ echo ' • 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 ".#dsh-nixpkgs-dmd" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-ldc" --print-build-logs -c zsh • nix develop using package overlays: (dmd-<<dmd_version>>, ldc-<<ldc_version>>, dub-<<dub_version>>, dtools-<<dtools_version>>) - ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-overlay-dmd" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs -c zsh ❯❯ nix flake show • to build project: @@ -102,10 +102,10 @@ echo ' • to build using dub on nix (get dependencies by setting your development environment): - ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-dmd" --print-build-logs -c zsh ❯❯ dub --verbose --compiler=dmd --config=dmd - ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-ldc" --print-build-logs -c zsh ❯❯ dub --verbose --compiler=ldmd2 --config=ldmd2 • for develop environment & build options @@ -119,6 +119,9 @@ echo ' ❯❯ ${SpineBIN} -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/* ❯❯ ${SpineBIN} -v --source --pod --latex --latex-init --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/* + + ❯❯ ${SpineBIN} -v --sqlite-db-create --sqlite-db-filename=${SpineSQLdb} --sqlite-db-path=./_tmp-db + ❯❯ ${SpineBIN} -v --sqlite-update --sqlite-db-filename=${SpineSQLdb} --sqlite-db-path=./_tmp-db ./markup/pod/* ' echo "• ❯❯ ${SpineBIN} -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/* @@ -175,7 +178,7 @@ export SpineDBpath=/var/www/sqlite #export SpineDBpath=/srv/www/spine/sqlite #+END_SRC -* SHARED versions +* versions GET ** direnv #+NAME: direnv_version diff --git a/org/config_git.org b/org/config_git.org index b997923..66383ad 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -37,8 +37,6 @@ !.envrc !.envrc-nix !.envrc-git-init -!.env -!.env/** !nix-overlays !nix-overlays/** !README.md @@ -50,6 +48,7 @@ !configuration.txt !*.json !*.sdl +!*.md !meson.build !tangle !*.org diff --git a/org/config_nix.org b/org/config_nix.org index 3ec97d0..3f101a0 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -251,7 +251,7 @@ ]; inherit shellHook; }; - dsh-nixpkgs-dmd-dub = mkShell { + dsh-nixpkgs-dmd = mkShell { name = "spine-<<spine_version>> base dev shell"; inherit shell; inherit devEnv; @@ -264,7 +264,7 @@ ]; inherit shellHook; }; - dsh-nixpkgs-ldc-dub = mkShell { + dsh-nixpkgs-ldc = mkShell { name = "spine-<<spine_version>> base dev shell"; inherit shell; inherit devEnv; @@ -277,7 +277,7 @@ ]; inherit shellHook; }; - dsh-overlay-dmd-dub = mkShell { + dsh-overlay-dmd = mkShell { name = "spine-<<spine_version>> base dev shell, dmd-<<dmd_version>>, dub-<<dub_version>> - dtools-<<dtools_version>>"; inherit shell; inherit devEnv; @@ -290,7 +290,7 @@ ]; inherit shellHook; }; - dsh-overlay-ldc-dub = mkShell { + dsh-overlay-ldc = mkShell { name = "spine-<<spine_version>> base dev shell, ldc-<<ldc_version>>, dub-<<dub_version>> - dtools-<<dtools_version>>"; inherit shell; inherit devEnv; @@ -717,7 +717,7 @@ github:nixos/nixpkgs ** .env/echo-nixNote CHECK MODIFY *** notes on nix commands -#+HEADER: :tangle ../.env/nix-commands +#+HEADER: :tangle-NO ../.env/nix-commands #+BEGIN_SRC text - nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell @@ -742,7 +742,7 @@ nix-shell '<nixpkgs>' -A nix --pure *** echo-nixNote -#+HEADER: :tangle ../.env/echo-nixNote +#+HEADER: :tangle-NO ../.env/echo-nixNote #+BEGIN_SRC shell echo '-*- mode: org -*- @@ -892,13 +892,13 @@ $SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD ,#+BEGIN_SRC shell $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/* -$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/* +# CGI search form is built separately in sisudoc-spine-search-cgi/ $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 +# See sisudoc-spine-search-cgi/README.md for CGI search form build instructions ,#+END_SRC ,*** generate html linked to search form @@ -967,7 +967,7 @@ webserv: ,*** make search form ,#+BEGIN_SRC shell -$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site +# CGI search form is built separately - see sisudoc-spine-search-cgi/README.md ,#+END_SRC ,*** latex @@ -1032,9 +1032,8 @@ postInstall: echo `ls -la $${out}/bin/spine` #+END_SRC -* SHARED -** versions -*** spine project VERSION :version:set:project: +* versions GET +** spine project VERSION :version:set:project: #+NAME: spine_version #+HEADER: :noweb yes @@ -1042,8 +1041,8 @@ postInstall: <<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> #+END_SRC -*** dlang overlays -**** ldc +** dlang overlays +*** ldc #+NAME: ldc_version #+HEADER: :noweb yes @@ -1051,7 +1050,7 @@ postInstall: <<./nix-develop-dlang-shared.org:ldc-version()>> #+END_SRC -**** dmd +*** dmd #+NAME: dmd_version #+HEADER: :noweb yes @@ -1059,7 +1058,7 @@ postInstall: <<./nix-develop-dlang-shared.org:dmd-version()>> #+END_SRC -**** dub +*** dub #+NAME: dub_version #+HEADER: :noweb yes @@ -1067,7 +1066,7 @@ postInstall: <<./nix-develop-dlang-shared.org:dub-version()>> #+END_SRC -**** dtools +*** dtools #+NAME: dtools_version #+HEADER: :noweb yes @@ -1075,15 +1074,14 @@ postInstall: <<./nix-develop-dlang-shared.org:dtools-version()>> #+END_SRC -*** empty sha56 hash +** sha256 blank hash -#+NAME: blank_hash +#+NAME: sha256-blank #+BEGIN_SRC nix -sha256-0000000000000000000000000000000000000000000= +<<./nix-develop-dlang-shared.org:sha256-blank()>> #+END_SRC -#+NAME: assumed_hash +#+NAME: blank_hash #+BEGIN_SRC nix -sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= +<<./nix-develop-dlang-shared.org:sha256-blank()>> #+END_SRC - diff --git a/org/in_source_files.org b/org/in_source_files.org index cdd220f..e83729f 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -374,7 +374,7 @@ template spineRawMarkupContent() { sourcefile_body_content = _cii.contents; insert_file_list_get = _cii.insert_files.dup; images_list_get = _cii.images.dup; - } else if (_opt_action.source || _opt_action.pod) { + } else if (_opt_action.source_or_pod) { auto ins = Inserts(); ST_contents_inserts_images _cii = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); @@ -630,7 +630,7 @@ if (code_block_status == codeBlock.curly) { markup_sourcesubfile_insert_content.length ); } - if (_opt_action.source || _opt_action.pod) { + if (_opt_action.source_or_pod) { _images ~= _extract_images(markup_sourcesubfile_insert_content); } auto ins = Inserts(); @@ -646,7 +646,7 @@ if (code_block_status == codeBlock.curly) { +/ } else { contents_insert ~= line; // images to extract for image list? - if (_opt_action.source || _opt_action.pod) { + if (_opt_action.source_or_pod) { string[] _image_linelist = _extract_images(line); if (_image_linelist.length > 0) { _images ~= _image_linelist; @@ -735,7 +735,7 @@ if (code_block_status == codeBlock.curly) { fn_src_insert.to!string ); contents ~= contents_insert_st.insert_contents; - if (_opt_action.source || _opt_action.pod) { + if (_opt_action.source_or_pod) { string[] _image_linelist = _extract_images(contents_insert_st.images); if (_image_linelist.length > 0) { _images ~= _image_linelist; @@ -753,7 +753,7 @@ if (code_block_status == codeBlock.curly) { +/ } else { contents ~= line; - if (_opt_action.source || _opt_action.pod) { + if (_opt_action.source_or_pod) { string[] _image_linelist = _extract_images(line); if (_image_linelist.length > 0) { _images ~= _image_linelist; diff --git a/org/nix-develop-dlang-shared.org b/org/nix-develop-dlang-shared.org index f0a7aac..2a2f66d 100644 --- a/org/nix-develop-dlang-shared.org +++ b/org/nix-develop-dlang-shared.org @@ -17,20 +17,51 @@ * nix ** direnv +*** NOTES to update direnv in .envrc-nix + +- https://github.com/nix-community/nix-direnv + +check for latest version: + +- https://github.com/nix-community/nix-direnv/releases + +update direnv version and sha hash: +- emacs org/nix-develop-dlang-shared.org + +re-tangle file: + +- emacs org/config_env.org + updates: .envrc-nix + +update flake.lock: +- nix flake update && nix flake check && nix flake show + *** version SET #+NAME: direnv-version #+BEGIN_SRC org -<<direnv_version_3_0_6>> +<<direnv_version_3_0_7>> #+END_SRC #+NAME: direnv-hash #+BEGIN_SRC org -<<direnv_hash_3_0_6>> +<<direnv_hash_3_0_7>> #+END_SRC *** versions +**** 3.0.7 + +#+NAME: direnv_version_3_0_7 +#+BEGIN_SRC org +3.0.7 +#+END_SRC + +#+NAME: direnv_hash_3_0_7 +#+BEGIN_SRC org +sha256-bn8WANE5a91RusFmRI7kS751ApelG02nMcwRekC/qzc= +#+END_SRC + **** 3.0.6 #+NAME: direnv_version_3_0_6 @@ -81,6 +112,36 @@ sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= * dlang ** ldc +*** NOTES to update ldc + +check for latest version: + +update ldc version and sha hash: +- emacs ./org/nix-develop-dlang-shared.org + +re-tangle files: +- emacs ./org/nixpkgs_overlays_d_related.org + updates: nix-overlays/ldc/package.nix +- emacs ./org/config_nix.org + updates: flake.nix +- emacs ./org/config_env.org + updates: .envrc-nix + +update flake.lock: +- nix flake update && nix flake check && nix flake show + +build: +- nix build ".#spine-overlay-ldc" --print-build-logs + +adjust nix overlay if required (to get started): +- git clone --depth 1 https://github.com/NixOS/nixpkgs +- find ./nixpkgs/pkgs/ -type d -name "ldc" + ./nixpkgs/pkgs/by-name/ld/ldc +- compare with overlay: + ./nix-overlays/ldc +- overlay is tangled from: + emacs ./org/nixpkgs_overlays_d_related.org + *** version SET **** version & sha256 nix composite @@ -94,20 +155,41 @@ sha256 = "<<ldc-hash>>"; #+NAME: ldc-version #+BEGIN_SRC org -<<ldc_version_1_40_1>> +<<ldc_version_1_41_0>> #+END_SRC #+NAME: ldc-hash #+BEGIN_SRC org -<<ldc_hash_1_40_1>> +<<ldc_hash_1_41_0>> #+END_SRC #+NAME: ldc-llvm-set #+BEGIN_SRC org -<<ldc_llvm_set_1_40_1>> +<<ldc_llvm_set_1_41_0>> #+END_SRC *** versions +**** 1.41 OK ✓ +***** 1.41.0 OK ✓ + + - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.41.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_41_0 +#+BEGIN_SRC nix +1.41.0 +#+END_SRC + +#+NAME: ldc_hash_1_41_0 +#+BEGIN_SRC nix +sha256-6LcpY3LSFK4KgEiGrFp/LONu5Vr+/+vI04wEEpF3s+s= +#+END_SRC + +#+NAME: ldc_llvm_set_1_41_0 +#+BEGIN_SRC nix +llvm_20 +#+END_SRC + **** 1.40 OK ✓ ***** 1.40.1 OK ✓ @@ -242,42 +324,45 @@ sha256-/bs3bwgkLZF5IqaiKnc5gCF/r6MQBG/F1kWUkK8j2s0= #+END_SRC ** dmd + +- https://github.com/dlang/dmd/tags + *** version SET #+NAME: dmd-version #+BEGIN_SRC org -<<dmd_version_2_110_0>> +<<dmd_version_2_111_0>> #+END_SRC #+NAME: dmd-hash #+BEGIN_SRC org -<<dmd_hash_2_110_0>> +<<dmd_hash_2_111_0>> #+END_SRC #+NAME: phobos-hash #+BEGIN_SRC org -<<phobos_hash_2_110_0>> +<<phobos_hash_2_111_0>> #+END_SRC *** versions **** 2.111.0 OK ✓ -- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.111.0-beta.1.tar.gz -- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.111.0-beta.1.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.111.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.111.0.tar.gz #+NAME: dmd_version_2_111_0 #+BEGIN_SRC nix -2.111.0-beta.1 +2.111.0 #+END_SRC #+NAME: phobos_hash_2_111_0 #+BEGIN_SRC nix -sha256-yPmstS52J0BboR++9nYaeUq2mAJrFuUjxxi2BGgGCUY= +sha256-9jySZbODoL8sULhYKj/l4+c/uiG5xY2dO240k9XQtPk= #+END_SRC #+NAME: dmd_hash_2_111_0 #+BEGIN_SRC nix -sha256-MfGcno6o+GXZTWyWZ0kGYtMcMPuj2VgQd5I+nPKz1I4= +sha256-2bjsGa9nTny818dLRV6LKkes+Ycq8W+PFjwhGVrD5TM= #+END_SRC **** 2.110.0 OK ✓ diff --git a/org/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org index 14d2383..1b89d89 100644 --- a/org/nixpkgs_overlays_d_related.org +++ b/org/nixpkgs_overlays_d_related.org @@ -944,7 +944,9 @@ stdenv.mkDerivation (finalAttrs: { rm dmd/compiler/test/runnable/gdb4149.d rm dmd/compiler/test/runnable/gdb4181.d rm dmd/compiler/test/compilable/ddocYear.d - rm dmd/compiler/test/fail_compilation/needspkgmod.d + rm dmd/compiler/test/compilable/sarif_success_test.d + rm dmd/compiler/test/fail_compilation/sarif_test.d + rm dmd/compiler/test/fail_compilation/sarifmultiple_test.d # Disable tests that rely on objdump whitespace until fixed upstream: # https://issues.dlang.org/show_bug.cgi?id=23317 @@ -956,9 +958,9 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace dmd/compiler/test/dshell/test6952.d --replace-fail "/usr/bin/env bash" "${bash}/bin/bash" '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace phobos/std/socket.d --replace-fail "assert(ih.addrList[0] == 0x7F_00_00_01);" "" - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - substituteInPlace phobos/std/socket.d --replace-fail "foreach (name; names)" "names = []; foreach (name; names)" - ''; + ''; # + lib.optionalString stdenv.hostPlatform.isDarwin '' + # substituteInPlace phobos/std/socket.d --replace-fail "foreach (name; names)" "names = []; foreach (name; names)" + #''; nativeBuildInputs = [ makeWrapper @@ -1307,7 +1309,7 @@ stdenv.mkDerivation (finalAttrs: { }) #+END_SRC -*** dcompiler SET +*** dcompiler #+NAME: dcompiler #+BEGIN_SRC nix @@ -1520,9 +1522,9 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69 $(ROOT)/catdoc$(DOTEXE) \ #+END_SRC -** versions SET +** versions GET *** direnv -***** select version SET OK ✓ +***** select version #+NAME: direnv_version #+HEADER: :noweb yes @@ -1543,7 +1545,7 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69 <<./nix-develop-dlang-shared.org:ldc-version-info()>> #+END_SRC -***** select version SET OK ✓ +***** selected version #+NAME: ldc_version #+HEADER: :noweb yes @@ -1562,6 +1564,7 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69 #+END_SRC *** dmd +**** selected version #+NAME: dmd_version #+HEADER: :noweb yes @@ -1580,6 +1583,7 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69 #+END_SRC *** dub +**** selected version #+NAME: dub_version #+HEADER: :noweb yes @@ -1593,6 +1597,7 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69 #+END_SRC *** dtools +**** selected version #+NAME: dtools_version #+HEADER: :noweb yes diff --git a/org/ocda.org b/org/ocda.org index 148edf8..2509725 100644 --- a/org/ocda.org +++ b/org/ocda.org @@ -1,6 +1,7 @@ -*- mode: org -*- #+TITLE: sisudoc spine (doc_reform) object-centric document abstraction #+DESCRIPTION: documents - structuring, publishing in multiple formats & search +#+SUMMARY: process markup document, create document abstraction #+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] @@ -18,7 +19,8 @@ - [[./doc-reform.org][doc-reform.org]] [[./][org/]] * (Object-Centric) Document Abstraction -Process markup document, create document abstraction. + +- Process markup document, create document abstraction ** _module template_ :module:metadoc_from_src: @@ -69,7 +71,7 @@ mixin docAbstractionFunctions; #+END_SRC ** docAbstraction -*** abstraction summary +*** _toc_ abstraction summary #+NAME: docAbstraction #+HEADER: :noweb yes @@ -219,7 +221,7 @@ int cnt1 = 1; int cnt2 = 1; int cnt3 = 1; // abstraction init ↑ #+END_SRC -*** abstraction init substitutions +*** debug abstraction init substitutions #+NAME: docAbstractionInitSubstitutionsDebug #+HEADER: :noweb yes @@ -231,8 +233,8 @@ debug (substitutions) { } if (conf_make_meta.make.substitute) { foreach(substitution_pair; conf_make_meta.make.substitute) { - writeln("regex to match: ", substitution_pair[Substitute.match]); - writeln("substitution to make: ", substitution_pair[Substitute.markup]); + writeln("regex to match: ", substitution_pair[Substitute.match]); + writeln("substitution to make: ", substitution_pair[Substitute.markup]); } } if (conf_make_meta.make.bold) { @@ -250,7 +252,7 @@ debug (substitutions) { } #+END_SRC -*** loop source by line (large block) +*** _loop_ source by line (large block) #+NAME: docAbstractionMainLoopSrcByLine #+HEADER: :noweb yes @@ -883,7 +885,7 @@ _loopMarkupSrcByLineStruct loopMarkupSrcByLine( } #+END_SRC -*** post loop (consider and segment/break up further in code & org) +*** _post loop_ (consider and segment/break up further in code & org) #+NAME: docAbstractionPostMainLoop #+HEADER: :noweb yes @@ -1456,7 +1458,7 @@ debug(segnames) { } #+END_SRC -*** return structure +*** _return structure_ #+NAME: docAbstractionReturnsStruct #+HEADER: :noweb yes diff --git a/org/out_src_pod.org b/org/out_src_pod.org index e72d332..a8a35ad 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -31,7 +31,7 @@ template spinePod() { <<output_imports>> void spinePod(T)(T doc_matters) { <<source_pod_init>> - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { try { { podArchive_directory_tree(doc_matters, pths_pod); @@ -105,8 +105,8 @@ assert (doc_matters.src.filename.match(rgx_files.src_fn)); #+BEGIN_SRC d auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { auto pth_dr_doc_src = doc_matters.src_path_info; - if (doc_matters.opt.action.debug_do_pod && doc_matters.opt.action.vox_gt1) { - writeln(__LINE__, ": ", + if (doc_matters.opt.action.vox_gt2) { // correct + writeln(__LINE__, ":", __FILE__, ":\n", doc_matters.src.filename, " -> ", pths_pod.fn_doc(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod ); @@ -116,7 +116,7 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { string[string][string] _digests; { // bundle images - get digest foreach (image; doc_matters.srcs.image_list) { - debug(podimages) { + if (doc_matters.opt.action.vox_gt2) { writeln( pth_dr_doc_src.image_root.to!string, "/", image, " -> ", pths_pod.image_root(doc_matters.src.filename).zpod, "/", image @@ -139,7 +139,7 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { if (doc_matters.opt.action.source_or_pod) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("file_path_bin", fn_src_in, fn_src_out_pod_zip_base, zip); } } else { @@ -163,7 +163,7 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { if (doc_matters.opt.action.source_or_pod) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("file_path_text", fn_src_in, fn_src_out_pod_zip_base, zip); } } else { @@ -208,7 +208,7 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { if (doc_matters.opt.action.source_or_pod) { pod_filelist_yaml_string.writeln(_pm); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("string", _pm, fn_src_out_pod_zip_base, zip); } } @@ -228,11 +228,14 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { string fn_src_out_filesystem_lng = pths_pod.fn_doc(doc_matters.src.filename, _lang).filesystem_open_zpod.to!string; string _sstm = (doc_matters.pod.manifest_path ~ "/media/text/" ~ _lang ~ "/" ~ doc_matters.src.filename); - // writeln(_sstm); - if (exists(_sstm)) { // what of language? - debug(io) { writeln("(io debug) src in found: ", _sstm); } + string _pth_file_sstm; + if (exists(_sstm)) { _pth_file_sstm = _sstm; + } else if (exists(fn_src_in)) { _pth_file_sstm = fn_src_in; + } + if (exists(_pth_file_sstm)) { // what of language? + debug(io) { writeln("(io debug) src in found: ", _pth_file_sstm); } { // take DIGEST write to pod file digests.txt - auto data = (cast(byte[]) (_sstm).read); + auto data = (cast(byte[]) (_pth_file_sstm).read); _digests[_lang]["sstm"] ~= data.sha256Of.toHexString ~ "::" ~ data.length.to!string ~ " - " ~ doc_matters.src.filename ~ " - [" ~ _lang ~ "]"; // writeln(data.sha256Of.toHexString, "::", data.length, " - ", doc_matters.src.filename); } @@ -240,11 +243,11 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { filelist_src_zpod_arr ~= fn_src_out_inside_pod; string _pod_to_markup_file = doc_matters.src.pod_name ~ "/" ~ "media/text/" ~ _lang ~ "/" ~ doc_matters.src.filename; if (doc_matters.opt.action.source_or_pod) { - _sstm.copy(fn_src_out_filesystem_lng); + _pth_file_sstm.copy(fn_src_out_filesystem_lng); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { auto _rgx_sstm = regex(r"(?P<path_to_pod>\S+?)(?P<podname>[a-z_-]+)/(?P<from_root>media/text/)(?P<language>\S+?)/(?P<filename>\S+?\.ss[mt])"); - if (auto _x = _sstm.match(_rgx_sstm)){ + if (auto _x = _pth_file_sstm.match(_rgx_sstm)){ if (doc_matters.src.lng == doc_matters.pod.manifest_list_of_languages[$-1]) { // again wait until all language versions of .ssm parsed string _path_to_pod = _x.captures["path_to_pod"]; string _podname = _x.captures["podname"]; @@ -259,12 +262,12 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { } } } else { - zip = podArchive("file_path_text", _sstm, fn_src_out_pod_zip_base, zip); + zip = podArchive("file_path_text", _pth_file_sstm, fn_src_out_pod_zip_base, zip); } } } else { if (doc_matters.opt.action.debug_do_pod && doc_matters.opt.action.vox_gt1) { - writeln("WARNING (io) src in NOT found (markup source): ", _sstm); + writeln("WARNING (io) src in NOT found (markup source): \n", _sstm, "or in", fn_src_in); } } } @@ -308,7 +311,7 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { ).filesystem_open_zpod.to!string; _pth_mkup_src_in.copy(fn_src_out_filesystem); // check why here, thought dealt with elsewhere } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("file_path_text", _pth_mkup_src_in, _pth_mkup_src_out, zip); } } else { @@ -342,7 +345,7 @@ auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { if (doc_matters.opt.action.source_or_pod) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("file_path_text", fn_src_in, fn_src_out_pod_zip_base, zip); } } else { diff --git a/org/spine_info.org b/org/spine_info.org index a2078fe..2d61c20 100644 --- a/org/spine_info.org +++ b/org/spine_info.org @@ -77,7 +77,7 @@ <<sisudoc_spine_README_command_examples_populate_db_text>> -,*** generate a cgi search form in d +,*** generate a cgi search form <<sisudoc_spine_README_command_examples_search_db_cgi_text>> @@ -85,7 +85,7 @@ <<sisudoc_spine_README_command_examples_compile_search_db_cgi_text>> -,*** create db & search form +,*** create db <<sisudoc_spine_README_command_examples_create_db_and_search_form_text>> @@ -196,7 +196,7 @@ <<sisudoc_spine_README_command_examples_compile_search_db_cgi_text>> -### create db & search form +### create db <<sisudoc_spine_README_command_examples_create_db_and_search_form_text>> @@ -624,23 +624,16 @@ for a document collection you can point to the document collection: #+NAME: sisudoc_spine_README_command_examples_search_db_cgi_text #+BEGIN_SRC text -spine -v --cgi-search-form-codegen \ - --output=/var/www/html \ - ~spineMarkupSamples/pod - -spine -v --cgi-search-form-codegen --config=~spineMarkupSamples/pod +The CGI search form is built separately in the sisudoc-spine-search-cgi/ directory. -spine -v --cgi-search-form-codegen --config=~spineMarkupSamples/pod/.dr/config_local_site +Steps: +1. Clone the sisudoc-spine-search-cgi repository +2. Configure views/configuration.txt with your web server settings +3. Build the CGI binary using Nix or dub +4. Deploy the CGI binary to your web server's cgi-bin directory -spine --cgi-search-form-codegen --output=`echo ~webDocRoot` ~spineMarkupSamples/pod - -spine --cgi-search-form-codegen --cgi-sqlite-search-filename="spine_search" --output=`echo ~webDocRoot` - -spine -v --cgi-search-form-codegen \ - --sqlite-db-filename="spine.search.db" \ - --cgi-sqlite-search-filename="spine-search" \ - --output=/var/www/html \ - ~spineMarkupSamples/pod +For detailed instructions, see: + sisudoc-spine-search-cgi/README.md #+END_SRC #+NAME: sisudoc_spine_README_command_examples_compile_search_db_cgi_text @@ -676,9 +669,10 @@ cgi-bin directory #+BEGIN_SRC text spine -v \ --sqlite-db-create --sqlite-db-filename="spine.search.db" \ - --cgi-search-form-codegen --cgi-sqlite-search-filename="spine-search" \ --output=/var/www/html \ ~spineMarkupSamples/pod/* + +Note: The CGI search form is built separately in sisudoc-spine-search-cgi/ #+END_SRC #+NAME: sisudoc_spine_README_command_examples_html_with_links_to_search_form_text diff --git a/src/sisudoc/io_in/read_source_files.d b/src/sisudoc/io_in/read_source_files.d index c683d1e..7ee0fb1 100644 --- a/src/sisudoc/io_in/read_source_files.d +++ b/src/sisudoc/io_in/read_source_files.d @@ -132,7 +132,7 @@ template spineRawMarkupContent() { sourcefile_body_content = _cii.contents; insert_file_list_get = _cii.insert_files.dup; images_list_get = _cii.images.dup; - } else if (_opt_action.source || _opt_action.pod) { + } else if (_opt_action.source_or_pod) { auto ins = Inserts(); ST_contents_inserts_images _cii = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); @@ -297,7 +297,7 @@ template spineRawMarkupContent() { markup_sourcesubfile_insert_content.length ); } - if (_opt_action.source || _opt_action.pod) { + if (_opt_action.source_or_pod) { _images ~= _extract_images(markup_sourcesubfile_insert_content); } auto ins = Inserts(); @@ -313,7 +313,7 @@ template spineRawMarkupContent() { +/ } else { contents_insert ~= line; // images to extract for image list? - if (_opt_action.source || _opt_action.pod) { + if (_opt_action.source_or_pod) { string[] _image_linelist = _extract_images(line); if (_image_linelist.length > 0) { _images ~= _image_linelist; @@ -392,7 +392,7 @@ template spineRawMarkupContent() { fn_src_insert.to!string ); contents ~= contents_insert_st.insert_contents; - if (_opt_action.source || _opt_action.pod) { + if (_opt_action.source_or_pod) { string[] _image_linelist = _extract_images(contents_insert_st.images); if (_image_linelist.length > 0) { _images ~= _image_linelist; @@ -410,7 +410,7 @@ template spineRawMarkupContent() { +/ } else { contents ~= line; - if (_opt_action.source || _opt_action.pod) { + if (_opt_action.source_or_pod) { string[] _image_linelist = _extract_images(line); if (_image_linelist.length > 0) { _images ~= _image_linelist; diff --git a/src/sisudoc/io_out/source_pod.d b/src/sisudoc/io_out/source_pod.d index a6253ab..640e7d2 100644 --- a/src/sisudoc/io_out/source_pod.d +++ b/src/sisudoc/io_out/source_pod.d @@ -73,7 +73,7 @@ template spinePod() { auto lang = Lang(); static auto rgx_files = RgxFiles(); assert (doc_matters.src.filename.match(rgx_files.src_fn)); - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { try { { podArchive_directory_tree(doc_matters, pths_pod); @@ -139,8 +139,8 @@ template spinePod() { } auto pod_zipMakeReady(M,P,S)(M doc_matters, P pths_pod, S _st) { auto pth_dr_doc_src = doc_matters.src_path_info; - if (doc_matters.opt.action.debug_do_pod && doc_matters.opt.action.vox_gt1) { - writeln(__LINE__, ": ", + if (doc_matters.opt.action.vox_gt2) { // correct + writeln(__LINE__, ":", __FILE__, ":\n", doc_matters.src.filename, " -> ", pths_pod.fn_doc(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod ); @@ -150,7 +150,7 @@ template spinePod() { string[string][string] _digests; { // bundle images - get digest foreach (image; doc_matters.srcs.image_list) { - debug(podimages) { + if (doc_matters.opt.action.vox_gt2) { writeln( pth_dr_doc_src.image_root.to!string, "/", image, " -> ", pths_pod.image_root(doc_matters.src.filename).zpod, "/", image @@ -173,7 +173,7 @@ template spinePod() { if (doc_matters.opt.action.source_or_pod) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("file_path_bin", fn_src_in, fn_src_out_pod_zip_base, zip); } } else { @@ -197,7 +197,7 @@ template spinePod() { if (doc_matters.opt.action.source_or_pod) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("file_path_text", fn_src_in, fn_src_out_pod_zip_base, zip); } } else { @@ -242,7 +242,7 @@ template spinePod() { if (doc_matters.opt.action.source_or_pod) { pod_filelist_yaml_string.writeln(_pm); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("string", _pm, fn_src_out_pod_zip_base, zip); } } @@ -262,11 +262,14 @@ template spinePod() { string fn_src_out_filesystem_lng = pths_pod.fn_doc(doc_matters.src.filename, _lang).filesystem_open_zpod.to!string; string _sstm = (doc_matters.pod.manifest_path ~ "/media/text/" ~ _lang ~ "/" ~ doc_matters.src.filename); - // writeln(_sstm); - if (exists(_sstm)) { // what of language? - debug(io) { writeln("(io debug) src in found: ", _sstm); } + string _pth_file_sstm; + if (exists(_sstm)) { _pth_file_sstm = _sstm; + } else if (exists(fn_src_in)) { _pth_file_sstm = fn_src_in; + } + if (exists(_pth_file_sstm)) { // what of language? + debug(io) { writeln("(io debug) src in found: ", _pth_file_sstm); } { // take DIGEST write to pod file digests.txt - auto data = (cast(byte[]) (_sstm).read); + auto data = (cast(byte[]) (_pth_file_sstm).read); _digests[_lang]["sstm"] ~= data.sha256Of.toHexString ~ "::" ~ data.length.to!string ~ " - " ~ doc_matters.src.filename ~ " - [" ~ _lang ~ "]"; // writeln(data.sha256Of.toHexString, "::", data.length, " - ", doc_matters.src.filename); } @@ -274,11 +277,11 @@ template spinePod() { filelist_src_zpod_arr ~= fn_src_out_inside_pod; string _pod_to_markup_file = doc_matters.src.pod_name ~ "/" ~ "media/text/" ~ _lang ~ "/" ~ doc_matters.src.filename; if (doc_matters.opt.action.source_or_pod) { - _sstm.copy(fn_src_out_filesystem_lng); + _pth_file_sstm.copy(fn_src_out_filesystem_lng); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { auto _rgx_sstm = regex(r"(?P<path_to_pod>\S+?)(?P<podname>[a-z_-]+)/(?P<from_root>media/text/)(?P<language>\S+?)/(?P<filename>\S+?\.ss[mt])"); - if (auto _x = _sstm.match(_rgx_sstm)){ + if (auto _x = _pth_file_sstm.match(_rgx_sstm)){ if (doc_matters.src.lng == doc_matters.pod.manifest_list_of_languages[$-1]) { // again wait until all language versions of .ssm parsed string _path_to_pod = _x.captures["path_to_pod"]; string _podname = _x.captures["podname"]; @@ -293,12 +296,12 @@ template spinePod() { } } } else { - zip = podArchive("file_path_text", _sstm, fn_src_out_pod_zip_base, zip); + zip = podArchive("file_path_text", _pth_file_sstm, fn_src_out_pod_zip_base, zip); } } } else { if (doc_matters.opt.action.debug_do_pod && doc_matters.opt.action.vox_gt1) { - writeln("WARNING (io) src in NOT found (markup source): ", _sstm); + writeln("WARNING (io) src in NOT found (markup source): \n", _sstm, "or in", fn_src_in); } } } @@ -342,7 +345,7 @@ template spinePod() { ).filesystem_open_zpod.to!string; _pth_mkup_src_in.copy(fn_src_out_filesystem); // check why here, thought dealt with elsewhere } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("file_path_text", _pth_mkup_src_in, _pth_mkup_src_out, zip); } } else { @@ -376,7 +379,7 @@ template spinePod() { if (doc_matters.opt.action.source_or_pod) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt.action.pod) { + if (doc_matters.opt.action.source_or_pod) { zip = podArchive("file_path_text", fn_src_in, fn_src_out_pod_zip_base, zip); } } else { diff --git a/src/sisudoc/meta/metadoc_from_src.d b/src/sisudoc/meta/metadoc_from_src.d index 4aa49dc..b5b4f6d 100644 --- a/src/sisudoc/meta/metadoc_from_src.d +++ b/src/sisudoc/meta/metadoc_from_src.d @@ -214,8 +214,8 @@ template docAbstraction() { } if (conf_make_meta.make.substitute) { foreach(substitution_pair; conf_make_meta.make.substitute) { - writeln("regex to match: ", substitution_pair[Substitute.match]); - writeln("substitution to make: ", substitution_pair[Substitute.markup]); + writeln("regex to match: ", substitution_pair[Substitute.match]); + writeln("substitution to make: ", substitution_pair[Substitute.markup]); } } if (conf_make_meta.make.bold) { |