diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/config_make.org | 22 | ||||
-rw-r--r-- | org/config_misc.org | 8 | ||||
-rw-r--r-- | org/config_nix.org | 22 | ||||
-rw-r--r-- | org/out_sqlite.org | 64 |
4 files changed, 68 insertions, 48 deletions
diff --git a/org/config_make.org b/org/config_make.org index 42c5fb4..9f4b00b 100644 --- a/org/config_make.org +++ b/org/config_make.org @@ -296,7 +296,7 @@ postInstall: Date := `date "+%Y%m%d"` SpineBIN := "${SpineBIN}" # './result/bin' SpineOUT := "${SpineOUT}" # '/srv/www/spine' -SpinePOD := "${SpinePOD}" # '/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' +SpinePOD := "${SpinePOD}" # '~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' SpineSearchActionLocal := 'http://localhost/spine_search' SpineSearchActionRemote := 'https://sisudoc.org/spine_search' SpineCGIform := 'spine_search' @@ -1741,10 +1741,10 @@ export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos # 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 SpinePROJ=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform -export SpineSRC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/src -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 SpinePROJ=~/grotto/repo/git.repo/projects/project-spine/doc-reform +export SpineSRC=~/grotto/repo/git.repo/projects/project-spine/doc-reform/src +export SpineBIN=~/grotto/repo/git.repo/projects/project-spine/doc-reform/result/bin +export SpineDOC=~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples export SpinePOD=$SpineDOC/markup/pod export SpineOUTversioned=/srv/www/spine/$SpineVER export SpineOUT=/srv/www/spine @@ -1772,7 +1772,7 @@ fi #+BEGIN_SRC makefile SpineBIN := "${SpineBIN}" # 'result/bin' SpineOUT := "${SpineOUT}" # '/srv/www/spine' -SpinePOD := "${SpinePOD}" # '/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' +SpinePOD := "${SpinePOD}" # '~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' SpineSearchAction := 'https://sisudoc.org/spine_search' SpineCGIform := 'spine_search' SpineSQLdb := 'spine.search.db' @@ -2038,22 +2038,22 @@ ls *.tex; ls *.pdf; #+NAME: spine_proj #+BEGIN_SRC sh -/grotto-ra/repo/git.repo/projects/project-spine/doc-reform +~/grotto/repo/git.repo/projects/project-spine/doc-reform #+END_SRC #+NAME: spine_src #+BEGIN_SRC sh -/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/src +~/grotto/repo/git.repo/projects/project-spine/doc-reform/src #+END_SRC #+NAME: spine_bin #+BEGIN_SRC sh -/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/result/bin +~/grotto/repo/git.repo/projects/project-spine/doc-reform/result/bin #+END_SRC #+NAME: spine_doc #+BEGIN_SRC sh -/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples +~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples #+END_SRC #+NAME: spine_pod @@ -2159,7 +2159,7 @@ export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos ## load the flake devShell # eval "$(nix print-dev-env)" # echo $NIX_BUILD_TOP -export PROJ="/grotto-ra/repo/git.repo/projects/project-spine" +export PROJ="~/grotto/repo/git.repo/projects/project-spine" export SpinePROJ=<<spine_proj>> export SpineSRC=<<spine_src>> export SpineBIN=<<spine_bin>> diff --git a/org/config_misc.org b/org/config_misc.org index e3045e4..c60d0cb 100644 --- a/org/config_misc.org +++ b/org/config_misc.org @@ -156,13 +156,13 @@ find data/sisudir/media/text -name *.ss[tm] | sort | xargs ~dr/bin/spine-ldc -q --show-config --html --output=/var/www/html ~grotto/repo/git.repo/code/project-spine/doc-reform-markup/markup_samples/markup/pod -~dr/bin/spine-ldc -q --show-config ~grotto/repo/git.repo/code/project-spine/doc-reform-markup/markup_samples/markup/pod +~dr/bin/spine-ldc -q --show-config ~/grotto/repo/git.repo/code/project-spine/doc-reform-markup/markup_samples/markup/pod -~dr/result/bin/spine --html --output=/var/www/html /grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/markup_samples/markup/pod/* +~dr/result/bin/spine --html --output=/var/www/html ~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/markup_samples/markup/pod/* -~dr/result/bin/spine --very-verbose --sqlite-db-create --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=/var/www /grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/markup_samples/markup/pod/* +~dr/result/bin/spine --very-verbose --sqlite-db-create --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=/var/www ~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/markup_samples/markup/pod/* -~dr/result/bin/spine --very-verbose --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=/var/www /grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/markup_samples/markup/pod/* +~dr/result/bin/spine --very-verbose --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=/var/www ~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/markup_samples/markup/pod/* #+END_SRC - produces: diff --git a/org/config_nix.org b/org/config_nix.org index 4a637a4..a62990f 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -471,7 +471,7 @@ postInstall: - nix develop -- nix flake lock +- nix flake update - nix shell -f default.nix --print-build-logs - nix shell -c default.nix @@ -567,8 +567,20 @@ postInstall: packages.x86_64-linux.default = self.packages.x86_64-linux.spine; }; } + +#nix flake update +#nix flake check +#nix flake show +#nix develop +#nix build .#default --print-build-logs #+END_SRC +#+BEGIN_SRC nix +src = fetchTarball { + url = "file:///[path]/$(pname)-$(version).tar.gz"; + sha256 = "sha256:0000000000000000000000000000000000000000000000000000"; +}; +#+END_SRC #+HEADER: :noweb yes #+BEGIN_SRC nix { @@ -696,7 +708,7 @@ mkShell { #if [[ -f ".envrc" ]]; then # source .envrc #fi - nix flake lock --update-input nixpkgs + nix flake update echo "" echo "nix flake metadata:" nix flake metadata @@ -1402,7 +1414,7 @@ $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local nix develop -nix flake lock +nix flake update #+HEADER: :tangle "../sundry/spine_search_cgi/flake.nix" #+HEADER: :noweb yes @@ -1642,7 +1654,7 @@ nixpkgs=<<nixpkgs_path_local>> #+NAME: project_path_local_project #+HEADER: :noweb yes #+BEGIN_SRC nix -/grotto-ra/repo/git.repo/projects/project-spine/doc-reform +~/grotto/repo/git.repo/projects/project-spine/doc-reform #+END_SRC #+NAME: project_path_local_src @@ -1664,7 +1676,7 @@ nixpkgs=<<nixpkgs_path_local>> #+NAME: project_path_local_doc #+BEGIN_SRC nix -/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples +~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples #+END_SRC #+NAME: project_path_local_out diff --git a/org/out_sqlite.org b/org/out_sqlite.org index a6c501d..3a201e7 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -346,35 +346,43 @@ template SQLiteTablesCreate() { return _sql_instruct; } } - if (opt_action.sqlite_db_create) { - string _db_statement; - string db_filename = (opt_action.sqliteDB_filename.length > 0) - ? opt_action.sqliteDB_filename - : (config.conf.w_srv_db_sqlite_filename.length > 0) - ? config.conf.w_srv_db_sqlite_filename - : ""; - string db_path = (opt_action.sqliteDB_path.length > 0) - ? opt_action.sqliteDB_path - : (config.conf.w_srv_db_sqlite_path.length > 0) - ? config.conf.w_srv_db_sqlite_path - : ""; - if (db_filename.length > 0 && db_path.length > 0) { - if ((opt_action.vox_gt1)) { - writeln("db name & path: ", db_path, db_filename); - } - auto pth_sqlite = spinePathsSQLite!()(db_filename, db_path); - pth_sqlite.base.mkdirRecurse; - auto db = Database(pth_sqlite.sqlite_file); - { - _db_statement ~= SQLiteTablesReCreate!()(); - } - SQLiteDbRun!()(db, _db_statement, opt_action, "TABLE RE-CREATE"); - } else { - writeln("must provide db name & output root path either on the command line or in configuration file"); - writeln("db name: ", db_filename); - writeln("db path: ", db_path); - } + <<sqlite_db_create>> + } +} +#+END_SRC + +**** db create + +#+NAME: sqlite_db_create +#+HEADER: :noweb yes +#+BEGIN_SRC d +if (opt_action.sqlite_db_create) { + string _db_statement; + string db_filename = (opt_action.sqliteDB_filename.length > 0) + ? opt_action.sqliteDB_filename + : (config.conf.w_srv_db_sqlite_filename.length > 0) + ? config.conf.w_srv_db_sqlite_filename + : ""; + string db_path = (opt_action.sqliteDB_path.length > 0) + ? opt_action.sqliteDB_path + : (config.conf.w_srv_db_sqlite_path.length > 0) + ? config.conf.w_srv_db_sqlite_path + : ""; + if (db_filename.length > 0 && db_path.length > 0) { + if ((opt_action.vox_gt1)) { + writeln("db name & path: ", db_path, db_filename); + } + auto pth_sqlite = spinePathsSQLite!()(db_filename, db_path); + pth_sqlite.base.mkdirRecurse; + auto db = Database(pth_sqlite.sqlite_file); + { + _db_statement ~= SQLiteTablesReCreate!()(); } + SQLiteDbRun!()(db, _db_statement, opt_action, "TABLE RE-CREATE"); + } else { + writeln("must provide db name & output root path either on the command line or in configuration file"); + writeln("db name: ", db_filename); + writeln("db path: ", db_path); } } #+END_SRC |