diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/config_env.org | 15 | ||||
-rw-r--r-- | org/config_git.org | 3 | ||||
-rw-r--r-- | org/config_nix.org | 18 | ||||
-rw-r--r-- | org/in_source_files.org | 10 | ||||
-rw-r--r-- | org/nix-develop-dlang-shared.org | 82 | ||||
-rw-r--r-- | org/out_src_pod.org | 39 | ||||
-rw-r--r-- | org/spine_info.org | 32 |
7 files changed, 128 insertions, 71 deletions
diff --git a/org/config_env.org b/org/config_env.org index 1eb1f6d..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}/* 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 de1d3b0..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 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 1d8fe34..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,8 +112,35 @@ sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= * dlang ** ldc +*** NOTES to update ldc + +check for latest version: -- https://github.com/ldc-developers/ldc/releases +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 @@ -97,39 +155,39 @@ 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 -***** 1.41.0 beta1 OK ✓ +**** 1.41 OK ✓ +***** 1.41.0 OK ✓ - - nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.41.0-beta1.tar.gz + - 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-beta1 +1.41.0 #+END_SRC #+NAME: ldc_hash_1_41_0 #+BEGIN_SRC nix -sha256-FSdBOVkHdEJ7flKTyjkE0MCEUIMOXRv4uBn8OKPPdn4= +sha256-6LcpY3LSFK4KgEiGrFp/LONu5Vr+/+vI04wEEpF3s+s= #+END_SRC #+NAME: ldc_llvm_set_1_41_0 #+BEGIN_SRC nix -llvm_19 +llvm_20 #+END_SRC **** 1.40 OK ✓ 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 |