From c16231db78629d2b3f352ef51b88e0ca6dc1aabe Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 7 Aug 2021 07:49:05 -0400 Subject: nix help files, .envrc_local_ (& nix_notes_.org) --- .envrc-local_ | 208 ++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 138 insertions(+), 70 deletions(-) (limited to '.envrc-local_') diff --git a/.envrc-local_ b/.envrc-local_ index 3cfc9b1..11de339 100644 --- a/.envrc-local_ +++ b/.envrc-local_ @@ -1,7 +1,6 @@ export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos #export NIX_PATH=/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 @@ -11,7 +10,7 @@ export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1 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=/srv/www/spine/$SpineVER +export SpineOUTversioned=/srv/www/spine/$SpineVER export SpineOUTstatic=/srv/www/spine/static echo '-*- mode: org -*- @@ -19,116 +18,185 @@ echo '-*- mode: org -*- * nixpkgs path? eval "$(nix print-dev-env)" -' > nix_note_ +' > nix_note_.org -echo " == `nix-instantiate --find-file nixpkgs`" >> nix_note_ +echo " == `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 +SpineDOC=$SpineDOC +SpineOUTversioned=$SpineOUTversioned +SpineOUTstatic=$SpineOUTstatic +#+END_SRC +" >> nix_note_.org echo '* spine run instruction examples ** parallelized tasks +*** doc source + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --pod --source --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC + +*** html & epub output + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --html --epub --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC + +*** sqlite db for each document - populate each db - - doc source - $SpineBIN/spine --very-verbose --pod --source --output="$SpineOUT" $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC - - html & epub output - $SpineBIN/spine --very-verbose --html --epub --output="$SpineOUT" $SpineDOC/markup/pod/* +*** doc source; html, epub; sqlite outputs - - sqlite db for each document - populate each db - $SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +$SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC - - doc source; html, epub; sqlite outputs - $SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* +*** harvest (authors topics) - - harvest (authors topics) - $SpineBIN/spine --very-verbose --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* - - html, harvest - $SpineBIN/spine --verbose --dark --html --html-link-harvest --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* - $SpineBIN/spine --very-verbose --html --html-link-harvest --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --harvest --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC - - composite command: source pod, html, epub, harvest, sqlite - $SpineBIN/spine --verbose --dark --pod --epub --html --html-link-harvest --harvest --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* +*** html, harvest + +#+BEGIN_SRC sh +$SpineBIN/spine --verbose --dark --html --html-link-harvest --harvest --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +$SpineBIN/spine --very-verbose --html --html-link-harvest --harvest --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC + +*** composite command: source pod, html, epub, harvest, sqlite + +#+BEGIN_SRC sh +$SpineBIN/spine --verbose --dark --pod --epub --html --html-link-harvest --harvest --sqlite-discrete --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC ** sequential tasks - - sqlite db (shared) - create db - $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" - - sqlite db (shared) - populate db - $SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUT" $SpineDOC/spine-markup-samples/markup/pod/* - - sqlite db (shared) - drop db - $SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUT" +*** sqlite db (shared) - create db + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned" +#+END_SRC + +*** sqlite db (shared) - populate db + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUTversioned" $SpineDOC/spine-markup-samples/markup/pod/* +#+END_SRC - - sqlite db (shared) - create & populate db (single step) - $SpineBIN/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUT" $SpineDOC/markup/pod/* +*** sqlite db (shared) - drop db - - composite command: source pod, html, epub, harvest, sqlite - $SpineBIN/spine --verbose --no-parallel --dark --pod --epub --html --html-link-harvest --harvest --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUTversioned" +#+END_SRC + +*** sqlite db (shared) - create & populate db (single step) + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC + +*** composite command: source pod, html, epub, harvest, sqlite + +#+BEGIN_SRC sh +$SpineBIN/spine --verbose --no-parallel --dark --pod --epub --html --html-link-harvest --harvest --sqlite-discrete --output="$SpineOUTversioned" $SpineDOC/markup/pod/* +#+END_SRC ** config [./pod/].dr/config_local_site - cat $SpineDOC/markup/pod/.dr/config_local_site - $SpineBIN/spine --show-config $SpineDOC/markup/pod - $SpineBIN/spine --show-config --output="$SpineOUT" $SpineDOC/markup/pod +#+BEGIN_SRC sh +cat $SpineDOC/markup/pod/.dr/config_local_site +$SpineBIN/spine --show-config $SpineDOC/markup/pod +$SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpineDOC/markup/pod +#+END_SRC ** cgi operations (output to $SpineOUTstatic /var/www) - $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTstatic" $SpineDOC/markup/pod/* +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTstatic" $SpineDOC/markup/pod/* + +$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic $SpineDOC/markup/pod/* + +$SpineBIN/spine -v --show-config --config=$SpineDOC/markup/pod/.dr + +$SpineBIN/spine --html $SpineDOC/markup/pod/* + + +$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site +#+END_SRC + +*** generate html linked to search form + +#+BEGIN_SRC sh +$SpineBIN/spine -v --html --html-link-search --html-link-harvest --harvest --output=$SpineOUTstatic $SpineDOC/markup/pod/* +#+END_SRC - $SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic $SpineDOC/markup/pod/* +*** create or re-create sql db (--sqlite-db-create or --sqlite-db-recreate) - $SpineBIN/spine -v --show-config --config=$SpineDOC/markup/pod/.dr +#+BEGIN_SRC sh +$SpineBIN/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --output="$SpineOUTstatic" +$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --output="$SpineOUTstatic" +#+END_SRC - $SpineBIN/spine --html $SpineDOC/markup/pod/* +*** populate sqlite db - $SpineBIN/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --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 - $SpineBIN/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic $SpineDOC/markup/pod/* - $SpineBIN/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 COMPOSITE - $SpineBIN/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-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --output="$SpineOUTstatic" $SpineDOC/markup/pod/* +#+END_SRC - $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site +*** make search form - - generate html linked to search form - $SpineBIN/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 +#+END_SRC - - populate sqlite db - $SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --sqlite-update --output=$SpineOUTstatic $SpineDOC/markup/pod/* +' >> nix_note_.org - - make search form - $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site --output=$SpineOUTstatic +cat nix_note_.org -' >> nix_note_ -cat nix_note_ -echo "cat nix_note_" +echo "emacs nix_note_.org" +echo "cat nix_note_.org" -- cgit v1.2.3