diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2025-10-13 15:19:02 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2025-10-13 15:21:54 -0400 |
commit | c751d272d0e1aa410b10a79f560a42dacfa9e494 (patch) | |
tree | 6d3470f2f6512d6f17d0a9d45886c19e17bd8149 | |
parent | ,version (shellscript: project & git version info) (diff) |
housekeeping, nix & env, minor
-rw-r--r-- | .envrc | 2 | ||||
-rw-r--r-- | .envrc-local_ | 3 | ||||
-rw-r--r-- | .envrc-nix | 2 | ||||
-rw-r--r-- | flake.lock | 6 | ||||
-rw-r--r-- | flake.nix | 28 | ||||
-rw-r--r-- | org/config_env.org | 7 | ||||
-rw-r--r-- | org/config_nix.org | 28 |
7 files changed, 71 insertions, 5 deletions
@@ -3,6 +3,8 @@ if [ -f .envrc-git-init ]; then fi if [ -f .envrc-local ]; then source_env_if_exists .envrc-local || source .envrc-local +elif [ -f .envrc-local_ ]; then + source_env_if_exists .envrc-local_ || source .envrc-local_ fi if [ -f .envrc-nix ]; then source_env_if_exists .envrc-nix || source .envrc-nix diff --git a/.envrc-local_ b/.envrc-local_ index fdb7953..9c3d071 100644 --- a/.envrc-local_ +++ b/.envrc-local_ @@ -15,6 +15,9 @@ export SpineOUT=./OUTPUT_TEST_sisudocSpine # ❯❯ sisudoc-spine output processing path (web server e.g.): #export SpineOUT=/srv/www/spine #export SpineOUTversioned=${SpineOUT}/${SpineVER} +# ❯❯ www url doc root +export SpineURLdocRoot='http://localhost' +# export SpineURLdocRoot='https://sisudoc.org' # ❯❯ path configured for cgi search form: export SpineSearchActionLocal='http://localhost/spine_search' export SpineSearchActionRemote='https://sisudoc.org/spine_search' @@ -66,6 +66,8 @@ echo ' ❯❯ ${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/* + + ❯❯ $SpineBIN --source --pod --curate --text --latex --epub --html --manifest --html-link-search --html-link-pdf --html-link-text --html-link-curate --html-link-markup --html-link-source --html-link-pod --html-link-metadata --cgi-sqlite-search-filename="$SpineCGIform" --cgi-url-action="$SpineSearchActionRemote" --sqlite-db-path="$SpineDBpath" --sqlite-db-filename="$SpineSQLdb" --www-url-doc-root=$SpineURLdocRoot --set-papersize="a4,letter" --output=$SpineOUT $SpinePOD/* ' echo "• ❯❯ ${SpineBIN} -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/* @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1759917807, - "narHash": "sha256-WoSazth5EXIJmveWf0zbTMycrgpbLYOth6KhmltMuv0=", + "lastModified": 1760256791, + "narHash": "sha256-uTpzDHRASEDeFUuToWSQ46Re8beXyG9dx4W36FQa0/c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fb5cf53218b987f2703a5bbc292a030c0fe33443", + "rev": "832e3b6db48508ae436c2c7bfc0cf914eac6938e", "type": "github" }, "original": { @@ -43,6 +43,7 @@ runHook postInstall ''; postInstall = '' + echo "❯❯ ./result/bin/spine -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisu-spine-samples/markup/pod/*"; echo `ls -la $out/bin/spine` $out/bin/spine -v ''; @@ -210,7 +211,14 @@ shellHook = '' export Date=`date "+%Y%m%d"` ## set local values in .envrc-local (or here if you must) - echo " ❯❯ ./result/bin/spine -v --source --pod --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisu-spine-samples/markup/pod/*"; + echo '❯❯ nix build'; + SpineProjVer=`rg "Version\((\d+), (\d+), (\d+)\)" views/version.txt | sed -E 's/.*([0-9]+), ([0-9]+), ([0-9]+).*/spine-v\1.\2.\3/'` && \ + SpineGitVer=`git describe | sed "s/^[a-z_-]\+\([0-9.]\+\)/\1/" | sed "s/\([^-]*-g\)/r\1/" | sed "s/-/./g"` && \ + SpineGitBranch=`git branch --show-current` && \ + echo "❯❯ $SpineProjVer - ($SpineGitBranch: $SpineGitVer)" + echo '❯❯ $SpineBIN -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*'; + echo "❯❯ $SpineBIN -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*"; + echo '❯❯ nix flake update && nix flake check && nix flake show'; ''; in with pkgs-nix; { @@ -225,6 +233,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -238,6 +248,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -251,6 +263,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -264,6 +278,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -306,6 +322,8 @@ calibre #(suite includes: ebook-viewer) koreader foliate + gnused + ripgrep ]; inherit shellHook; }; @@ -327,6 +345,8 @@ w3m # ❯❯ light graphical #dillo + gnused + ripgrep ]; inherit shellHook; }; @@ -344,6 +364,8 @@ source-serif-pro source-code-pro texlive.combined.scheme-full + gnused + ripgrep ]; inherit shellHook; }; @@ -358,6 +380,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -373,6 +397,8 @@ gnumake sqlite perl538Packages.Po4a + gnused + ripgrep ]; inherit shellHook; }; diff --git a/org/config_env.org b/org/config_env.org index 84dc4eb..3e622ee 100644 --- a/org/config_env.org +++ b/org/config_env.org @@ -39,6 +39,8 @@ if [ -f .envrc-git-init ]; then fi if [ -f .envrc-local ]; then source_env_if_exists .envrc-local || source .envrc-local +elif [ -f .envrc-local_ ]; then + source_env_if_exists .envrc-local_ || source .envrc-local_ fi if [ -f .envrc-nix ]; then source_env_if_exists .envrc-nix || source .envrc-nix @@ -122,6 +124,8 @@ echo ' ❯❯ ${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/* + + ❯❯ $SpineBIN --source --pod --curate --text --latex --epub --html --manifest --html-link-search --html-link-pdf --html-link-text --html-link-curate --html-link-markup --html-link-source --html-link-pod --html-link-metadata --cgi-sqlite-search-filename="$SpineCGIform" --cgi-url-action="$SpineSearchActionRemote" --sqlite-db-path="$SpineDBpath" --sqlite-db-filename="$SpineSQLdb" --www-url-doc-root=$SpineURLdocRoot --set-papersize="a4,letter" --output=$SpineOUT $SpinePOD/* ' echo "• ❯❯ ${SpineBIN} -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/* @@ -177,6 +181,9 @@ export SpineOUT=./OUTPUT_TEST_sisudocSpine # ❯❯ sisudoc-spine output processing path (web server e.g.): #export SpineOUT=/srv/www/spine #export SpineOUTversioned=${SpineOUT}/${SpineVER} +# ❯❯ www url doc root +export SpineURLdocRoot='http://localhost' +# export SpineURLdocRoot='https://sisudoc.org' # ❯❯ path configured for cgi search form: export SpineSearchActionLocal='http://localhost/spine_search' export SpineSearchActionRemote='https://sisudoc.org/spine_search' diff --git a/org/config_nix.org b/org/config_nix.org index 9454cb3..d7e0e92 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -66,6 +66,7 @@ runHook postInstall ''; postInstall = '' + echo "❯❯ ./result/bin/spine -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisu-spine-samples/markup/pod/*"; echo `ls -la $out/bin/spine` $out/bin/spine -v ''; @@ -233,7 +234,14 @@ shellHook = '' export Date=`date "+%Y%m%d"` ## set local values in .envrc-local (or here if you must) - echo " ❯❯ ./result/bin/spine -v --source --pod --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisu-spine-samples/markup/pod/*"; + echo '❯❯ nix build'; + SpineProjVer=`rg "Version\((\d+), (\d+), (\d+)\)" views/version.txt | sed -E 's/.*([0-9]+), ([0-9]+), ([0-9]+).*/spine-v\1.\2.\3/'` && \ + SpineGitVer=`git describe | sed "s/^[a-z_-]\+\([0-9.]\+\)/\1/" | sed "s/\([^-]*-g\)/r\1/" | sed "s/-/./g"` && \ + SpineGitBranch=`git branch --show-current` && \ + echo "❯❯ $SpineProjVer - ($SpineGitBranch: $SpineGitVer)" + echo '❯❯ $SpineBIN -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*'; + echo "❯❯ $SpineBIN -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*"; + echo '❯❯ nix flake update && nix flake check && nix flake show'; ''; in with pkgs-nix; { @@ -248,6 +256,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -261,6 +271,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -274,6 +286,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -287,6 +301,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -329,6 +345,8 @@ calibre #(suite includes: ebook-viewer) koreader foliate + gnused + ripgrep ]; inherit shellHook; }; @@ -350,6 +368,8 @@ w3m # ❯❯ light graphical #dillo + gnused + ripgrep ]; inherit shellHook; }; @@ -367,6 +387,8 @@ source-serif-pro source-code-pro texlive.combined.scheme-full + gnused + ripgrep ]; inherit shellHook; }; @@ -381,6 +403,8 @@ dtools gnumake sqlite + gnused + ripgrep ]; inherit shellHook; }; @@ -396,6 +420,8 @@ gnumake sqlite perl538Packages.Po4a + gnused + ripgrep ]; inherit shellHook; }; |