diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2021-08-07 07:49:05 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2021-08-09 15:07:04 -0400 |
commit | c16231db78629d2b3f352ef51b88e0ca6dc1aabe (patch) | |
tree | db27e7a9276acaa6b8be1e57a11176eb2823a1d3 /sundry | |
parent | track org config suggestions that require bespoke adjustment (diff) |
nix help files, .envrc_local_ (& nix_notes_.org)
Diffstat (limited to 'sundry')
-rw-r--r-- | sundry/spine_search_cgi/.envrc-local_ | 128 |
1 files changed, 83 insertions, 45 deletions
diff --git a/sundry/spine_search_cgi/.envrc-local_ b/sundry/spine_search_cgi/.envrc-local_ index 276950b..ebd4926 100644 --- a/sundry/spine_search_cgi/.envrc-local_ +++ b/sundry/spine_search_cgi/.envrc-local_ @@ -1,7 +1,6 @@ export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos #export NIX_PATH=nixpkgs=/nixpkgs-ra/nixpkgs -## reload when these files change -#use flake +# reload when these files change watch_file flake.nix # watch_file flake.lock ## load the flake devShell @@ -9,80 +8,119 @@ eval "$(nix print-dev-env)" # echo $NIX_BUILD_TOP export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') export SpineSRC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform +export SpineBIN=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/result/bin export SpineDOC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples -export SpineOUT=/tmp/spine/$SpineVER/www -export SpineOUTstatic=/var/www +#export SpineOUTversioned=/srv/www/spine/$SpineVER +export SpineOUTstatic=/srv/www/spine/static +export SpineCgiBIN=/var/www/cgi/cgi-bin echo '-*- mode: org -*- * nixpkgs path? eval "$(nix print-dev-env)" -' > nix_note_ +' > nix_note_.org -echo " <nixpkgs> == `nix-instantiate --find-file nixpkgs`" >> nix_note_ +echo " <nixpkgs> == `nix-instantiate --find-file nixpkgs`" >> nix_note_.org echo ' * nix build and show derivation - nix-shell --pure +#+BEGIN_SRC sh +nix-shell --pure - nix-build - nix build -f default.nix - nix shell -f default.nix - nix-instantiate | nix-build - nix build `nix-instantiate` +nix-build +nix build -f default.nix +nix shell -f default.nix +nix-instantiate | nix-build +nix build `nix-instantiate` - nix develop +nix develop - nix-instantiate | nix show-derivation | jq - nix-instantiate | nix show-derivation --recursive | jq +nix-instantiate | nix show-derivation | jq +nix-instantiate | nix show-derivation --recursive | jq - nix search --json 2>/dev/null |jq +nix search --json 2>/dev/null |jq +#+END_SRC * version and build info -' >> nix_note_ -echo " spine version (git) == $SpineVER" >> nix_note_ -echo " nix-instantiate == `nix-instantiate`" >> nix_note_ +#+BEGIN_SRC sh' >> nix_note_.org + +echo 'spine version (git) == $SpineVER' >> nix_note_.org +echo "spine version (git) == $SpineVER" >> nix_note_.org +echo 'nix-instantiate == `nix-instantiate`' >> nix_note_.org +echo "nix-instantiate == `nix-instantiate`" >> nix_note_.org + +echo "#+END_SRC -echo " * initialised shell variables - SpineSRC=$SpineSRC - SpineDOC=$SpineDOC - SpineOUT=$SpineOUT - SpineOUTstatic=$SpineOUTstatic -" >> nix_note_ +#+BEGIN_SRC sh +SpineSRC=$SpineSRC +SpineBIN=$SpineBIN +SpineDOC=$SpineDOC +#SpineOUTversioned=$SpineOUTversioned +SpineOUTstatic=$SpineOUTstatic +SpineCgiBIN=$SpineCgiBIN +#+END_SRC +" >> nix_note_.org + +echo '* cgi form spine_search nix build and copy to spine-search + +#+BEGIN_SRC sh +nix-build +sudo cp -vi result/share/cgi-bin/spine_search $SpineCgiBIN/. +#+END_SRC + +* spine run instruction examples +** cgi operations (output to $SpineOUTstatic) +*** configuration + +#+BEGIN_SRC sh +$SpineBIN/spine -v --show-config --config=$SpineDOC/markup/pod/.dr +#+END_SRC + +*** generate html (linked to search form & harvest) + +#+BEGIN_SRC sh +$SpineBIN/spine -v --html --html-link-search --html-link-harvest --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search"--output=$SpineOUTstatic $SpineDOC/markup/pod/* +#+END_SRC -echo '* spine run instruction examples -** cgi operations (output to $SpineOUTstatic /var/www) +*** generate sql output - $SpineSRC/result/bin/spine --very-verbose --sqlite-db-create --output="$SpineOUTstatic" $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +SpineBIN/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=$SpineOUTstatic $SpineDOC/markup/pod/* +#+END_SRC - $SpineSRC/result/bin/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic $SpineDOC/markup/pod/* +*** generate harvest - $SpineSRC/result/bin/spine -v --show-config --config=$SpineDOC/markup/pod/.dr +#+BEGIN_SRC sh +$SpineBIN/spine -v --harvest --output=$SpineOUTstatic $SpineDOC/markup/pod/* +$SpineBIN/spine -v --html --html-link-harvest --harvest --output=$SpineOUTstatic $SpineDOC/markup/pod/* +#+END_SRC - $SpineSRC/result/bin/spine --html $SpineDOC/markup/pod/* +*** create or re-create sql db (--sqlite-db-create or --sqlite-db-recreate) - $SpineSRC/result/bin/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --output="$SpineOUTstatic" $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --output="$SpineOUTstatic" +#+END_SRC - $SpineSRC/result/bin/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic $SpineDOC/markup/pod/* - $SpineSRC/result/bin/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic $SpineDOC/markup/pod/* +*** generate html (linked to search form), sql output, harvest - $SpineSRC/result/bin/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=$SpineOUTstatic $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +$SpineBIN/spine -v --html --html-link-search --html-link-harvest --harvest --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --sqlite-update --output=$SpineOUTstatic $SpineDOC/markup/pod/* +#+END_SRC - $SpineSRC/result/bin/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site +*** make search form - $SpineSRC/result/bin/spine -v --html --html-link-search --html-link-harvest --harvest --output=$SpineOUTstatic $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site +#$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic $SpineDOC/markup/pod/* +#+END_SRC +' >> nix_note_.org - - generate html linked to search form - $SpineSRC/result/bin/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --sqlite-update --output=$SpineOUTstatic $SpineDOC/markup/pod/* - - make search form - $SpineSRC/result/bin/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site - #$SpineSRC/result/bin/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic $SpineDOC/markup/pod/* +cat nix_note_.org -' >> nix_note_ -cat nix_note_ -echo "cat nix_note_" +echo "emacs nix_note_.org" +echo "cat nix_note_.org" |