aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.envrc42
-rw-r--r--devenv.nix49
-rw-r--r--flake.lock12
-rw-r--r--flake.nix84
-rw-r--r--makefile606
-rw-r--r--org/config_git.org2
-rw-r--r--org/config_make.org1185
-rw-r--r--org/config_nix.org433
-rwxr-xr-xshell.nix84
-rw-r--r--test.nix10
10 files changed, 907 insertions, 1600 deletions
diff --git a/.envrc b/.envrc
index e049c3f..093f4ee 100644
--- a/.envrc
+++ b/.envrc
@@ -1,39 +1,17 @@
-use flake .
-#use flake .#default
NIX_ENFORCE_PURITY=1
+# - https://github.com/nix-community/nix-direnv
NixDirEnvVersion="2.2.1"
+NixDirEnvSHA="sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
+#NixDirEnvSHAget="sha256-0000000000000000000000000000000000000000000="
if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then
-# - https://github.com/nix-community/nix-direnv
-# source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000="
- source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
+ source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}"
fi
watch_file flake.lock
watch_file flake.nix
-if [ -f .envrc-local ]; then
- source_env_if_exists .envrc-local || source .envrc-local
-fi
+watch_file makefile
+#if [ -f .envrc-local ]; then
+# source_env_if_exists .envrc-local || source .envrc-local
+#fi
PATH_add result/bin
-#nix flake update && nix flake check --show-trace && nix flake show
-# echo "
-#
-# - nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
-#
-# - nix build .#default --print-build-logs
-# - nix build .#spine-dmd --print-build-logs
-# - nix build .#spine-ldc --print-build-logs
-# - nix build .#spine-gdc --print-build-logs
-#
-# - nix develop
-# - nix develop .#devShell --print-build-logs
-# - nix develop .#devShell-html --print-build-logs
-# - nix develop .#devShell-epub --print-build-logs
-# - nix develop .#devShell-latex-pdf --print-build-logs
-# - nix develop .#devShell-sqlite --print-build-logs
-# - nix develop .#devShell-i18n --print-build-logs
-#
-# nix run .#default --print-build-logs
-#
-# nix develop --build .#default --print-build-logs
-#
-# nix-shell '<nixpkgs>' -A nix --pure
-# "
+use flake .
+#use flake .#default
diff --git a/devenv.nix b/devenv.nix
index 81eff5a..02cca28 100644
--- a/devenv.nix
+++ b/devenv.nix
@@ -1,55 +1,34 @@
-# profile.nix
-{ pkgs ? import <nixpkgs> { }, name ? "user-env" }: with pkgs;
+{ pkgs ? import <nixpkgs> { }, name ? "user-env" }:
+with pkgs;
buildEnv {
inherit name;
- extraOutputsToInstall = [ "out" "man" "lib" ]; # to get all needed symlinks
+ extraOutputsToInstall = [ "out" "man" "lib" ]; # to get all needed symlinks
paths = [
+ # ❯❯❯ nix_related
#nix # if not on NixOS, this is needed
direnv
+ #cachix
nixVersions.unstable #nixFlakes
nix-prefetch-git
validatePkgConfig
- nix-tree jq nix-output-monitor
+ nix-output-monitor
+ nix-tree
+ jq
git
+ gnumake
ps
- ### d_build_related
+ # ❯❯❯ d_build_related
+ # ❯❯ package manager
dub
- ## compiler
+ # ❯❯ compiler
dmd
ldc
- #gdc
- #rund
- ## linker
- #lld
- #mold
- ## builder
- #ninja
- #meson
- ### sqlite search related
+ # ❯❯❯ sqlite search related
sqlite
- # ### pdf_latex_related
- # source-sans-pro
- # source-serif-pro
- # source-code-pro
- # texlive.combined.scheme-full
- # ### xml_and_epub_related
- # libxml2
- # html-tidy
- # xmlstarlet
- # epubcheck
- # ebook_tools
- # epr
- # sigil
- # calibre #(suite includes: ebook-viewer)
- # foliate
- # ### i18n translation related
- # perl534Packages.Po4a
- ### candy
- #starship
# this will create a script that will rebuild and upgrade your setup; using shell script syntax
(writeScriptBin "nix-rebuild" ''
#!${stdenv.shell}
- cd <path-to-flake> || exit 1
+ #cd <path-to-flake> || exit 1
nix flake update
nix profile upgrade '.*'
'')
diff --git a/flake.lock b/flake.lock
index 5d8e175..be2a7fe 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
- "lastModified": 1667395993,
- "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
+ "lastModified": 1676283394,
+ "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
+ "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
@@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1675758091,
- "narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=",
+ "lastModified": 1677534593,
+ "narHash": "sha256-PuZSAHeq4/9pP/uYH1FcagQ3nLm/DrDrvKi/xC9glvw=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87",
+ "rev": "3ad64d9e2d5bf80c877286102355b1625891ae9a",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 9e132d5..04663db 100644
--- a/flake.nix
+++ b/flake.nix
@@ -39,7 +39,7 @@
inherit shell;
inherit devEnv;
buildInputs = [ sqlite ];
- nativeBuildInputs = [ dub dmd ldc gdc gnumake ]; # [ dub dmd ]; [ dub ldc ]; [ dub gdc ];
+ nativeBuildInputs = [ dub ldc gnumake ]; # [ dub dmd ]; [ dub ldc ]; [ dub gdc ];
buildPhase = ''
runHook preBuild
for DC_ in dmd ldmd2 ldc2 gdc gdmd; do
@@ -94,25 +94,25 @@
inherit installPhase;
inherit postInstall;
};
- spine-gdc = stdenv.mkDerivation {
- inherit pname;
- inherit version;
- meta.mainProgram = "spine-gdc";
- executable = true;
- src = self;
- inherit shell;
- inherit devEnv;
- buildInputs = [ sqlite ];
- nativeBuildInputs = [ dub gdc gnumake ];
- buildPhase = ''
- runHook preBuild
- dub build --compiler=$(type -P gdc) --build=gdc --combined --skip-registry=all
- runHook postBuild
- '';
- inherit checkPhase;
- inherit installPhase;
- inherit postInstall;
- };
+ #spine-gdc = stdenv.mkDerivation {
+ # inherit pname;
+ # inherit version;
+ # meta.mainProgram = "spine-gdc";
+ # executable = true;
+ # src = self;
+ # inherit shell;
+ # inherit devEnv;
+ # buildInputs = [ sqlite ];
+ # nativeBuildInputs = [ dub gdc gnumake ];
+ # buildPhase = ''
+ # runHook preBuild
+ # dub build --compiler=$(type -P gdc) --build=gdc --combined --skip-registry=all
+ # runHook postBuild
+ # '';
+ # inherit checkPhase;
+ # inherit installPhase;
+ # inherit postInstall;
+ #};
#vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
});
apps = forAllSystems (system: {
@@ -155,24 +155,24 @@
#export spineSqlite="spine --very-verbose --sqlite-update --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\" --output=\"\$SpineOUT\" $SpinePOD/*"
'';
in with pkgs; {
- devShell = mkShell rec {
- name = "spine dev shell default";
+ devShell = mkShell {
+ name = "spine base dev shell";
inherit shell;
inherit devEnv;
#buildInputs = [ sqlite ];
#nativeBuildInputs = [ dub dmd ldc gdc gnumake ];
packages = [
sqlite
- dub dmd ldc gdc gnumake
+ dub dmd ldc gnumake
];
inherit shellHook;
};
- devShell-epub = mkShell rec {
- name = "spine dev shell for epub output";
+ devShell-epub = mkShell {
+ name = "spine dev shell for epub output";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
libxml2
html-tidy
@@ -191,22 +191,22 @@
];
inherit shellHook;
};
- devShell-html = mkShell rec {
- name = "spine dev shell for latex & pdf output";
+ devShell-html = mkShell {
+ name = "spine dev shell for latex & pdf output";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
];
inherit shellHook;
};
- devShell-latex-pdf = mkShell rec {
- name = "spine dev shell for latex & pdf output";
+ devShell-latex-pdf = mkShell {
+ name = "spine dev shell for latex & pdf output";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
source-sans-pro
source-serif-pro
@@ -215,26 +215,28 @@
];
inherit shellHook;
};
- devShell-sqlite = mkShell rec {
- name = "spine dev shell for latex & pdf output";
+ devShell-sqlite = mkShell {
+ name = "spine dev shell for latex & pdf output";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
];
inherit shellHook;
};
devShell-i18n = mkShell {
+ name = "spine dev shell internationalization, po4a";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
perl534Packages.Po4a
];
inherit shellHook;
};
+ default = import ./shell.nix { inherit pkgs; };
});
};
}
diff --git a/makefile b/makefile
index 87ce153..932b30e 100644
--- a/makefile
+++ b/makefile
@@ -48,41 +48,10 @@ data/pod/through_the_looking_glass.lewis_carroll \
data/pod/two_bits.christopher_kelty \
data/pod/un_contracts_international_sale_of_goods_convention_1980 \
data/pod/viral_spiral.david_bollier
-# SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND = \
-# find data/sisudir/media/text -name *.ss[tm] | sort | xargs
-#
-# SiSU_MARKUP_SAMPLES_DIR = \
-# data/sisudir/media/text/accelerando.charles_stross.sst \
-# data/sisudir/media/text/alices_adventures_in_wonderland.lewis_carroll.sst \
-# data/sisudir/media/text/content.cory_doctorow.sst \
-# data/sisudir/media/text/democratizing_innovation.eric_von_hippel.sst \
-# data/sisudir/media/text/down_and_out_in_the_magic_kingdom.cory_doctorow.sst \
-# data/sisudir/media/text/ffa_tmp.sst \
-# data/sisudir/media/text/for_the_win.cory_doctorow.sst \
-# data/sisudir/media/text/free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman.sst \
-# data/sisudir/media/text/free_culture.lawrence_lessig.sst \
-# data/sisudir/media/text/free_for_all.peter_wayner.sst \
-# data/sisudir/media/text/gpl2.fsf.sst \
-# data/sisudir/media/text/gpl3.fsf.sst \
-# data/sisudir/media/text/gullivers_travels.jonathan_swift.sst \
-# data/sisudir/media/text/little_brother.cory_doctorow.sst \
-# data/sisudir/media/text/sisu_markup.sst \
-# data/sisudir/media/text/sisu_markup_stress_test.sst \
-# data/sisudir/media/text/sisu_markup_test.sst \
-# data/sisudir/media/text/table_special_markup.sst \
-# data/sisudir/media/text/the_autonomous_contract.ralph_amissah.sst \
-# data/sisudir/media/text/the_cathedral_and_the_bazaar.eric_s_raymond.sst \
-# data/sisudir/media/text/the_public_domain.james_boyle.sst \
-# data/sisudir/media/text/the_wealth_of_networks.yochai_benkler.sst \
-# data/sisudir/media/text/through_the_looking_glass.lewis_carroll.sst \
-# data/sisudir/media/text/two_bits.christopher_kelty.sst \
-# data/sisudir/media/text/un_contracts_international_sale_of_goods_convention_1980.sst \
-# data/sisudir/media/text/viral_spiral.david_bollier.sst
-#
Date := `date "+%Y%m%d"`
-SpineBIN := "${SpineBIN}" # './result/bin'
-SpineOUT := "${SpineOUT}" # '/srv/www/spine'
-SpinePOD := "${SpinePOD}" # '~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod'
+SpineBIN := "$${SpineBIN}" # './result/bin'
+SpineOUT := "$${SpineOUT}" # '/srv/www/spine'
+SpinePOD := "$${SpinePOD}" # '~/grotto/repo/git.repo/projects/doc-reform/data/markup/spine-samples/markup/pod'
SpineSearchActionLocal := 'http://localhost/spine_search'
SpineSearchActionRemote := 'https://sisudoc.org/spine_search'
SpineCGIform := 'spine_search'
@@ -91,23 +60,37 @@ hwd := `pwd`
gwd := `pwd` + "/src/ext_depends"
deps := "`ls -gx './src/ext_depends'`"
dirs_loc := "`ls -gx '.'`"
-#dirs := "`ls -gx {{gwd}}`"
+#dirs := "`ls -gx $${gwd}`"
+
+default: flake-check
+
+flake-check:
+ nix flake update; \
+ nix flake check; \
+ echo -e 'nix flake show ❯❯\n'; \
+ nix flake show; \
+ echo -e '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh\n'; \
+ echo -e '❯❯ nix develop\n❯❯ nix develop -c zsh\n'; \
+ echo -e '❯❯ nix build ".#spine-ldc" --print-build-logs |& nom\n❯❯ nix build ".#spine-dmd" --print-build-logs |& nom\n'; \
+ echo -e '❯❯ make -s\n❯❯ make -s nix-build-ldc\n❯❯ make -s nix-build-dmd\n'; \
+ echo -e '❯❯ make -s ldc\n❯❯ make -s dmd\n'; \
+ echo -e '❯❯ $(DUB) --compiler=ldc2 --build=ldc2\n❯❯ $(DUB) --compiler=dmd --build=dmd\n';
nix-devshell:
- echo -ne "\n- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell\n\n- nix build .#default --print-build-logs\n- nix build .#spine-dmd --print-build-logs\n- nix build .#spine-ldc --print-build-logs\n- nix build .#spine-gdc --print-build-logs\n\n"; \
- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
+ echo -ne '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell"\n\n❯❯ nix build ".#default" --print-build-logs\n❯❯ nix build ".#spine-dmd" --print-build-logs\n❯❯ nix build ".#spine-ldc" --print-build-logs\n❯❯ nix build ".#spine-gdc" --print-build-logs\n\n'; \
+ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell"
nix-build-default:
- nix build .#default --print-build-logs
+ nix build ".#default" --print-build-logs
nix-build-dmd:
- nix build .#spine-dmd --print-build-logs
+ nix build ".#spine-dmd" --print-build-logs
nix-build-ldc:
- nix build .#spine-ldc --print-build-logs
+ nix build ".#spine-ldc" --print-build-logs
nix-build-gdc:
- nix build .#spine-gdc --print-build-logs
+ nix build ".#spine-gdc" --print-build-logs
buildPhase:
HOME=$${PWD}; \
@@ -125,7 +108,7 @@ buildPhase:
fi; \
echo "$${DC_} used as D compiler to build $${pname}"; \
export DFLAGS="-O2 -inline"; \
- dub build --compiler=$${DC} --build=release --combined --skip-registry=all;
+ dub build --compiler=$${DC} --build=$${DC_} --combined --skip-registry=all;
checkPhase:
runHook preCheck; \
@@ -145,10 +128,10 @@ postInstall:
echo `ls -la $${out}/bin/spine`
commands:
- rg --color=always -B1 "^[a-z]\w+:" makefile | less
+ rg --color=always -B1 "^[a-zA-Z_-]+:" makefile | page
-cmd:
- rg --color=always -B1 "^[a-z]\w+:" makefile | bat
+cmds:
+ rg --color=always -B1 "^[a-zA-Z_-]+:" makefile | page
# tangle org files
org-tangle:
@@ -156,74 +139,58 @@ org-tangle:
org-tangle *.org; \
cd -
-# project vim
-proj-v:
- nvim ./org/doc-reform.org
-
-# project emacs, cli (single instance open)
-proj-e:
- emacsclient -F -c -a -f ./org/doc-reform.org
-
-# project emacs, cli (multiple instance, no copy & paste)
-proj:
- emacsclient -nw -a -f ./org/doc-reform.org
-
-# project emacs, gui
-proj-emacs:
- emacs ./org/doc-reform.org &
-
# epub output
out-epub:
- {{SpineBIN}}/spine -v \
- --epub --output={{SpineOUT}} {{SpinePOD}}/*
+ $${SpineBIN}/spine -v \
+ --epub --output=$${SpineOUT} $${SpinePOD}/*
# html output with local search links
out-html:
- {{SpineBIN}}/spine -v --generated-by \
+ $${SpineBIN}/spine -v --generated-by \
--curate \
- --html --html-link-search --html-link-curate --cgi-url-action="{{SpineSearchActionLocal}}" \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --html --html-link-search --html-link-curate --cgi-url-action="$${SpineSearchActionLocal}" \
+ --output=$${SpineOUT} $${SpinePOD}/*
# latex output
out-latex:
- {{SpineBIN}}/spine -v \
+ $${SpineBIN}/spine -v \
--latex \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --output=$${SpineOUT} $${SpinePOD}/*
# odf output
out-odf:
- {{SpineBIN}}/spine -v \
+ $${SpineBIN}/spine -v \
--odf \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --output=$${SpineOUT} $${SpinePOD}/*
# sqlite output
out-sqlite:
- {{SpineBIN}}/spine -v \
- --sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ $${SpineBIN}/spine -v \
+ --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \
+ --output=$${SpineOUT} $${SpinePOD}/*
# generate markup sample output with local search links
output-samples-local:
- {{SpineBIN}}/spine -v \
+ $${SpineBIN}/spine -v \
--latex --latex-init \
--epub \
--html --html-link-search --html-link-pdf --html-link-curate --html-link-markup \
- --cgi-sqlite-search-filename="{{SpineCGIform}}" --cgi-url-action="{{SpineSearchActionLocal}}" \
+ --cgi-sqlite-search-filename="$${SpineCGIform}" --cgi-url-action="$${SpineSearchActionLocal}" \
--curate \
- --sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \
+ --output=$${SpineOUT} $${SpinePOD}/*
# generate markup sample output with remote search links
output-samples-remote:
- {{SpineBIN}}/spine -v \
+ $${SpineBIN}/spine -v \
--generated-by \
--latex --latex-init \
--epub \
--html --html-link-search --html-link-pdf --html-link-curate \
- --cgi-sqlite-search-filename="{{SpineCGIform}}" --cgi-url-action="{{SpineSearchActionRemote}}" \
+ --cgi-sqlite-search-filename="$${SpineCGIform}" --cgi-url-action="$${SpineSearchActionRemote}" \
--curate \
- --sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \
+ --output=$${SpineOUT} $${SpinePOD}/*
# generate markup sample output with local search links
output-samples: output-samples-local
@@ -234,8 +201,90 @@ generate-output-remote: nix-build output-samples-remote
# nix build (local) run
generate-output-local: nix-build output-samples-local
+# project vim
+proj-v:
+ vim ./org/doc-reform.org
+
+# project emacs, cli (single instance open)
+proj-e:
+ emacsclient -F -c -a -f ./org/doc-reform.org
+
+# project emacs, cli (multiple instance, no copy & paste)
+proj:
+ emacsclient -nw -a -f ./org/doc-reform.org
+
+# project emacs, gui
+proj-emacs:
+ emacs ./org/doc-reform.org &
+
+# search project
+fzf:
+ echo -n "what to search project for?: "; \
+ read FIND; \
+ rg --files-with-matches --no-messages "$${FIND}" | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(vim -c \"silent! /$${FIND}\" {1})";
+
+# search org files directory
+fzf-org:
+ echo -n "what to search org directory for?: "; \
+ read FIND; \
+ cd ./org; \
+ rg --files-with-matches --no-messages "$${FIND}" | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(vim -c \"silent! /$${FIND}\" {1})"; \
+ cd -;
+
+# search org files directory, emacs editor
+fzf-org-e:
+ echo -n "what to search org directory for?: "; \
+ read FIND; \
+ cd ./org; \
+ rg --files-with-matches --no-messages "$${FIND}" | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(emacsclient -F -c -a -f {1})"; \
+ cd -;
+
+# search org files directory
+fzf-nix:
+ echo -n "what to search nix files for?: "; \
+ read FIND; \
+ rg --files-with-matches --no-messages "$${FIND}" *.nix makefile .envrc | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(vim -c \"silent! /$${FIND}\" {1})";
+
+# search org files directory
+fzf-nix-e:
+ echo -n "what to search nix files for? (emacs): "; \
+ read FIND; \
+ rg --files-with-matches --no-messages "$${FIND}" *.nix makefile .envrc | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(emacsclient -F -c -a -f {1})";
+
+# search project source files directory
+fzf-src:
+ echo -n "what to search source files for?: "; \
+ read FIND; \
+ cd ./src/doc_reform; \
+ rg --files-with-matches --no-messages "$${FIND}" | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(vim -c \"silent! /$${FIND}\" {1})";
+ cd -;
+
# preview org files vim
-files-vim:
+files-vi:
fd --max-depth 6 --type file -g "*" | sort \
| fzf \
--preview='bat --color "always" {}' \
@@ -243,7 +292,7 @@ files-vim:
--bind="enter:execute(nvim {})"; \
# preview org files emacs
-files-emacs:
+files-e:
fd --max-depth 6 --type file -g "*" | sort \
| fzf \
--preview='bat --color "always" {}' \
@@ -251,7 +300,7 @@ files-emacs:
--bind="enter:execute(emacsclient -nw -a -f {})"; \
# preview org files vim
-org-vim:
+org-v:
cd ./org; \
fd --max-depth 5 --type file -g "*.org" | sort \
| fzf \
@@ -261,7 +310,7 @@ org-vim:
cd -
# preview org files emacs
-org-emacs:
+org-e:
cd ./org; \
fd --max-depth 5 --type file -g "*.org" | sort \
| fzf \
@@ -270,108 +319,48 @@ org-emacs:
--bind="enter:execute(emacsclient -nw -a -f {})"; \
cd -
-## search org files (view in vim)
-#org-v find:
-# cd ./org; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(nvim -c \"silent! /{{find}}\" {1})"; \
-# cd -
-#
-## search org files (view in emacsclient)
-#org-e find:
-# cd ./org; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(emacsclient -nw -a -f {})"; \
-# cd -
-#
-## search tips.org files (view in emacs)
-#org-E find:
-# cd ./org; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(emacs {} &)"; \
-# cd -
-#
-## search for in directory specified (view in vim, uses rg & fzf) ["find" for emacs]
-#sDir-v find dir:
-# cd {{dir}}; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(nvim -c \"silent! /{{find}}\" {1})"; \
-# cd -
-#
-## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs]
-#sDir-e find dir:
-# cd {{dir}}; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(emacsclient -nw -a -f {})"; \
-# cd -
-#
-## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs]
-#sDir-E find dir:
-# cd {{dir}}; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(emacs {} &)"; \
-# cd -
-
# show markup pod source selections
markup:
- ls -1 --color=always {{SpinePOD}}
- ls -1 -d --color=always {{SpinePOD}}/*/
+ ls -1 --color=always $${SpinePOD}
+ ls -1 -d --color=always $${SpinePOD}/*/
# show markup pod source tree
markup-pod-tree:
- exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpinePOD} | less -R
+ exa -alT --git -I'.git|.dub|*_' --color=always -L5 $${SpinePOD} | less -R
# show markup pod source tree
tree-src:
- exa -alT --git -I'*_' --color=always -L5 ${SpineSRC}/doc_reform ${SpinePROJ}/views | less -R
+ exa -alT --git -I'*_' --color=always -L5 $${SpineSRC}/doc_reform $${SpinePROJ}/views | less -R
## show markup pod source tree
#tree-src-omit:
-# exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpineSRC} ${SpinePROJ}/views | less -R
+# exa -alT --git -I'.git|.dub|*_' --color=always -L5 $${SpineSRC} $${SpinePROJ}/views | less -R
# show markup pod source tree
tree-src-search-cgi:
- exa -alT --git -I'*_' --color=always -L5 ${SpineSearchCGI}/src ${SpineSearchCGI}/views | less -R
+ exa -alT --git -I'*_' --color=always -L5 $${SpineSearchCGI}/src $${SpineSearchCGI}/views | less -R
# show markup files
markup-files:
- cd {{SpinePOD}}; \
+ cd $${SpinePOD}; \
find . -type f -iname "*sst"; \
cd -; \
- echo {{SpinePOD}}
-# find {{SpinePOD}}/. -type f -iname "*sst"
+ echo $${SpinePOD}
+# find $${SpinePOD}/. -type f -iname "*sst"
# preview markup files vim
-markup-files-vim:
- cd {{SpinePOD}}; \
+markup-files-vi:
+ cd $${SpinePOD}; \
fd --max-depth 5 --type file -g "*.ss?" | sort \
| fzf \
--preview='bat --color "always" {}' \
--preview-window=right:66% \
- --bind="enter:execute(nvim {})"; \
+ --bind="enter:execute(vim {})"; \
cd -
# preview markup files emacs
-markup-files-emacs:
- cd {{SpinePOD}}; \
+markup-files-e:
+ cd $${SpinePOD}; \
fd --max-depth 5 --type file -g "*.ss?" | sort \
| fzf \
--preview='bat --color "always" {}' \
@@ -391,88 +380,67 @@ markup-samples: markup-pod-samples markup-file-samples
# markup samples pod manifests
markup-pod-samples:
- echo "{{SpinePOD}}"; \
- find {{SpinePOD}} -name pod.manifest | sort
+ echo "$${SpinePOD}"; \
+ find $${SpinePOD} -name pod.manifest | sort
-#find {{SpinePOD}} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:'
+#find $${SpinePOD} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:'
# markup samples sst files
markup-file-samples:
- echo "{{SpinePOD}}"; \
- find {{SpinePOD}} -name *.ss[tm] | sort
-
-# markup_dir_samples:
-# find data/sisudir/media/text -name *.ss[tm] | sort
-
-# version_tag:
-# echo "DRV=0.12.0; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \
-# echo "git tag -f doc-reform_v0.12.0 -m\"doc-reform spine-0.12.0\" HEAD"
+ echo "$${SpinePOD}"; \
+ find $${SpinePOD} -name *.ss[tm] | sort
# archive spine output (www)
spineWWWarchive:
cd /srv/www ; \
- rm spine_output.{{Date}}.tar.bz2 ; \
- sudo tar --exclude='./spine/latex' --exclude='./spine/pod' --exclude='./spine/*_' -cjf spine_output.{{Date}}.tar.bz2 ./spine ; \
+ rm spine_output.$${Date}.tar.bz2 ; \
+ sudo tar --exclude='./spine/latex' --exclude='./spine/pod' --exclude='./spine/*_' -cjf spine_output.$${Date}.tar.bz2 ./spine ; \
cd -
# rsync archived spine output to Linode
spineWWWrsyncLinode:
- rsync -v /srv/www/spine_output.{{Date}}.tar.bz2 linode:./stage/. ; \
+ rsync -v /srv/www/spine_output.$${Date}.tar.bz2 linode:./stage/. ; \
rsync -v /var/www/sqlite/spine.search.db linode:./stage/. ; \
- echo "tar -xf ../spine_output.{{Date}}.tar.bz2"
+ echo "tar -xf ../spine_output.$${Date}.tar.bz2"
# get project external dependencies
depends_get:
dub upgrade; \
- cd {{gwd}} && \
- echo "{{dirs_loc}}" && \
- for dir in {{dirs_loc}}; do \
- if [[ -d ${dir} ]]; then \
- echo {{gwd}}/${dir} && \
- if [[ "imageformats" == ${dir} ]]; then \
- echo {{gwd}}/${dir} && \
- rm -rvf {{gwd}}/${dir} && \
- git clone --depth=1 https://github.com/tjhann/${dir} && \
- cd ${dir} && \
+ cd $${gwd} && \
+ echo "$${dirs_loc}" && \
+ for dir in $${dirs_loc}; do \
+ if [[ -d $${dir} ]]; then \
+ echo $${gwd}/$${dir} && \
+ if [[ "imageformats" == $${dir} ]]; then \
+ echo $${gwd}/$${dir} && \
+ rm -rvf $${gwd}/$${dir} && \
+ git clone --depth=1 https://github.com/tjhann/$${dir} && \
+ cd $${dir} && \
echo $$PWD && \
- echo "${dir} `git rev-parse HEAD | cut -c 1-8`" > ../${dir}.meta && \
- echo "https://github.com/tjhann/${dir}" >> ../${dir}.meta && \
- echo "Boost Software License 1.0 (BSL-1.0)" >> ../${dir}.meta && \
- cd {{gwd}} && \
- rm -rf {{gwd}}/${dir}/.git; \
- elif [[ "d2sqlite3" == ${dir} || "D-YAML" == ${dir} || "tinyendian" == ${dir} ]]; then \
- echo {{gwd}}/${dir} && \
- rm -rvf {{gwd}}/${dir} && \
- git clone --depth=1 https://github.com/dlang-community/${dir} && \
- cd {{gwd}}/${dir} && \
- echo "${dir} `git rev-parse HEAD | cut -c 1-8`" > ../${dir}.meta && \
- echo "https://github.com/dlang-community/${dir}" >> ../${dir}.meta && \
- echo "Boost Software License 1.0 (BSL-1.0)" >> ../${dir}.meta && \
- cd {{gwd}} && \
- rm -rf {{gwd}}/${dir}/.git; \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \
+ echo "Boost Software License 1.0 (BSL-1.0)" >> ../$${dir}.meta && \
+ cd $${gwd} && \
+ rm -rf $${gwd}/$${dir}/.git; \
+ elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \
+ echo $${gwd}/$${dir} && \
+ rm -rvf $${gwd}/$${dir} && \
+ git clone --depth=1 https://github.com/dlang-community/$${dir} && \
+ cd $${gwd}/$${dir} && \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \
+ echo "Boost Software License 1.0 (BSL-1.0)" >> ../$${dir}.meta && \
+ cd $${gwd} && \
+ rm -rf $${gwd}/$${dir}/.git; \
fi; \
fi; \
done; \
- cd {{hwd}}
+ cd $${hwd}
# get and set project external dependencies
depends_set: depends_get
dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json
-# markup_samples:
-# find data/pod -name pod.manifest | cut -f 1-3 -d / | sort; \
-# find data/sisudir/media/text -name *.ss[tm] | sort
-#
-# markup_pod_samples:
-# find data/pod -name pod.manifest | cut -f 1-3 -d / | sort
-#
-# markup_dir_samples:
-# find data/sisudir/media/text -name *.ss[tm] | sort
-#
-version_tag:
- echo "DRV=0.12.0; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \
- echo "git tag -f doc-reform_v0.12.0 -m\"doc-reform spine-0.12.0\" HEAD"
-
changelog_:
git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" > CHANGELOG_
@@ -489,11 +457,6 @@ gitArchive:
git archive -v --format=tar --prefix=spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)/ HEAD | gzip > ./tarballGitHEAD/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \
echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz"
-# git archive project, produce current state .tar.gz
-# gitArchive:
-# git archive -v --format=tar --prefix="spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}/" HEAD | gzip > ./tarballGitHEAD/spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz && \
-# echo "to unzip: tar -xzf spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz"
-
# remove test tarball dir
nixGitHEADtarballClean:
if [ -d "./tarballGitHEAD" ]; then \
@@ -505,23 +468,22 @@ nixGitHEADtarballTar:
if [ ! -d "./tarballGitHEAD" ]; then \
mkdir ./tarballGitHEAD; \
fi; \
- git archive -v --format=tar --prefix="spine-${PROG_VER_DECLARED}/" HEAD | \
- gzip > ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz && \
- cp -v ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz ./tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz && \
- echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz"; \
- echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}.tar.gz"
+ git archive -v --format=tar --prefix="spine-$${PROG_VER_DECLARED}/" HEAD | \
+ gzip > ./tarballGitHEAD/spine-$${PROG_VER_DECLARED}-tag-$${PROG_VER_GIT}.tar.gz && \
+ cp -v ./tarballGitHEAD/spine-$${PROG_VER_DECLARED}-tag-$${PROG_VER_GIT}.tar.gz ./tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz && \
+ echo "to unzip: tar -xzf spine-$${PROG_VER_DECLARED}-tag-$${PROG_VER_GIT}.tar.gz"; \
+ echo "to unzip: tar -xzf spine-$${PROG_VER_DECLARED}.tar.gz"
# check test tarball
nixGitHEADtarballCheck:
- nix flake check file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz; \
- nix flake lock file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz; \
- nix flake show file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz;
+ nix flake check file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz; \
+ nix flake lock file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz; \
+ nix flake show file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz;
# build test tarball
nixGitHEADtarballBuild:
- echo "nix build file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs"
- nix build file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs
- #nix build "./tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz#spine" --print-build-logs
+ echo "nix build file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs"; \
+ nix build file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs
# clean create check & build test tarball
nixGitHEADtarball: nixGitHEADtarballClean nixGitHEADtarballTar nixGitHEADtarballCheck nixGitHEADtarballBuild
@@ -588,22 +550,17 @@ set_latest: set_depends flake_update rm_flakelock
dub_upgrade:
$(DUB) upgrade
-default: ldc
+dc: ldc
+
+compile: ldc
all: dmd ldc gdc
all_ver: dmd_ver ldc_ver gdc_ver
-all_debug: dmd_debug gdc_debug ldc_debug
-
meson_clean_build_dir:
rm -r build; mkdir build
-meson_build: meson_clean_build_dir
- meson --buildtype=debugoptimized build
- ninja -C build
- notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine'
-
meson_redo: meson_clean_build_dir meson_build
meson_project_build_clean: clean skel tangle dub_upgrade meson_build
@@ -614,46 +571,33 @@ all_clean: clean tangle dmd ldc gdc
all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver
-all_debug_ver: dmd_debug_ver gdc_debug_ver ldc_debug_ver
-
-all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver
-
dmd: dub_upgrade
- $(DUB) --compiler=dmd --config=dmd --build=release-nobounds
+ $(DUB) --compiler=dmd --build=dmd --build=release-nobounds
notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd'
-dmd_debug:
- $(DUB) --compiler=dmd --config=dmd --build=debug
-
# assumes git tags with program version
dmd_ver: dub_upgrade
- $(DUB) --compiler=dmd --config=dmd-version
+ $(DUB) --compiler=dmd --build=dmd-version
mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd
notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd'
dmd_clean_ver: clean tangle dmd_ver
dmd_rel: expunge skel tangle
- $(DUB) --compiler=dmd --config=spine-release
+ $(DUB) --compiler=dmd --build=spine-release
dmd_rel_tangle: tangle
- $(DUB) --compiler=dmd --config=spine-dmd
+ $(DUB) --compiler=dmd --build=spine-dmd
dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle
-dmd_debug_tangle: tangle
- $(DUB) --compiler=dmd --config=spine-dmd-debug
-
gdc: dub_upgrade
- $(DUB) --compiler=gdc --config=gdc
+ $(DUB) --compiler=gdc --build=gdc
notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc'
-gdc_debug:
- $(DUB) --compiler=gdc --config=gdc --build=debug
-
# assumes git tags with program version
gdc_ver: dub_upgrade
- $(DUB) --compiler=gdc --config=gdc-version
+ $(DUB) --compiler=gdc --build=gdc-version
mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc
notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc'
@@ -667,16 +611,10 @@ gdc_rel_tangle: tangle
gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle
-gdc_debug_tangle: tangle
- $(DUB) --compiler=gdc --config=spine-gdc-debug
-
ldc: dub_upgrade
- $(DUB) --compiler=ldc2 --config=ldc --build=release
+ $(DUB) --compiler=ldc2 --build=ldc2 --build=release
notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc'
-ldc_debug:
- $(DUB) --compiler=ldc2 --config=ldc --build=debug
-
# assumes git tags with program version
ldc_ver: dub_upgrade
$(DUB) --compiler=ldc2 --config=ldc-version
@@ -693,9 +631,6 @@ ldc_rel_tangle: tangle
ldc_rel_expunge_tangle: expunge skel tangle ldc_rel_tangle
-ldc_debug_tangle: tangle
- $(DUB) --compiler=ldc2 --config=spine-ldc-debug
-
reinit: clean skel tangle
skel:
@@ -780,6 +715,122 @@ restart: clean tangle
find_pods:
$(SiSU_MARKUP_SAMPLES_FIND_PODS)
+testrun_find:
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_pod \
+ data/pod/sisu-manual
+
+testrun_find_pod_source:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --source \
+ --output-dir=tmp/program_output_pod
+
+testrun_find_pod_pod:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --pod \
+ --output-dir=tmp/program_output_pod
+
+testrun_find_pod_html:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --html \
+ --output-dir=tmp/program_output_pod
+
+testrun_find_pod_epub:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --epub \
+ --output-dir=tmp/program_output_pod
+
+testrun_find_pod_all:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_pod
+
+testrun_paths:
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_pod \
+ data/pod/sisu-manual
+
+testrun_paths_pod_source:
+ spine -v --source \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
+
+testrun_paths_pod_pod:
+ spine -v --pod \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
+
+testrun_paths_pod_html:
+ spine -v --html \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
+
+testrun_paths_pod_epub:
+ spine -v --epub \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
+
+testrun_paths_pod_all:
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
+
+testrun_find_dir_source:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --source \
+ --output-dir=tmp/program_output_dir
+
+testrun_find_dir_pod:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --pod \
+ --output-dir=tmp/program_output_dir
+
+testrun_find_dir_html:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --html \
+ --output-dir=tmp/program_output_dir
+
+testrun_find_dir_epub:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --epub \
+ --output-dir=tmp/program_output_dir
+
+testrun_find_dir_all:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_dir
+
+testrun_filelist_dir_source:
+ spine -v --source \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
+
+testrun_filelist_dir_pod:
+ spine -v --pod \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
+
+testrun_filelist_dir_html:
+ spine -v --html \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
+
+testrun_filelist_dir_epub:
+ spine -v --epub \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
+
+testrun_filelist_dir_all:
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
+
dmd_testrun_find:
./bin/spine-dmd -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -1160,9 +1211,6 @@ tangle_maker:
(org-babel-tangle) \
(kill-buffer)) '($$ORGFILES)))" 2>&1
-lorri_shell:
- lorri shell
-
# nix-shell
nix-shell:
nix-shell -I .envrc
@@ -1172,7 +1220,7 @@ nix-shell-pure:
# nix-shell (with local tools, presumably latest dlang compiler & build tools (ldc & dub))
nix-shell-updated:
- nix-shell -I nixpkgs=/nix/nixpkgs --pure
+ nix-shell -I nixpkgs=/srv/nix/nixpkgs --pure
# shell.nix (with shebang)
shell:
@@ -1214,7 +1262,7 @@ _flake-show-derivation:
nix show-derivation |jq;
nix-develop:
- nix develop -f default.nix -I nixpkgs=/nix/nixpkgs
+ nix develop -f default.nix -I nixpkgs=/srv/nix/nixpkgs
# nix flake show
flake-show: _flake-show-package _flake-show-name _flake-show-derivation
@@ -1227,13 +1275,9 @@ flake-build: _flake-show-name
flake-reset-build: _flake-lock-reset _flake-show-name
nix build --print-build-logs
-# nix-build flake spine debug
-flake-build-debug:
- nix build --debug
-
# nix-build spine (with local tools, presumably latest dlang compiler & build tools (ldc & dub))
flake-build-use-tools-new:
- nix build --print-build-logs -I nixpkgs=/nix/nixpkgs
+ nix build --print-build-logs -I nixpkgs=/srv/nix/nixpkgs
# tangle-build-flake
flake-tangle-build: org-tangle flake-build
@@ -1253,6 +1297,10 @@ flake-build-search:
gitsnapshot: distclean tangle
git commit -a
-.PHONY : all build rebuild debug release \
+version_tag:
+ echo "DRV=0.12.0; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform spine-$$\{DRV}\" HEAD"; \
+ echo "git tag -f doc-reform_v0.12.0 -m\"doc-reform spine-0.12.0\" HEAD"
+
+.PHONY : all build rebuild release \
distclean init \
tangle gitsnapshot
diff --git a/org/config_git.org b/org/config_git.org
index 592021d..8c164e9 100644
--- a/org/config_git.org
+++ b/org/config_git.org
@@ -17,7 +17,7 @@
- [[./doc-reform.org][doc-reform.org]] [[./][org/]]
-* spine
+* git
** .gitignore :gitignore:
#+HEADER: :tangle "../.gitignore"
diff --git a/org/config_make.org b/org/config_make.org
index 9dca7f9..7315a8d 100644
--- a/org/config_make.org
+++ b/org/config_make.org
@@ -6,7 +6,7 @@
#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
#+COPYRIGHT: Copyright (C) 2015 - 2023 Ralph Amissah
#+LANGUAGE: en
-#+STARTUP: content hideblocks hidestars noindent entitiespretty
+#+STARTUP: show4levels hideblocks hidestars noindent entitiespretty
#+PROPERTY: header-args :exports code
#+PROPERTY: header-args+ :noweb yes
#+PROPERTY: header-args+ :results no
@@ -48,84 +48,10 @@
#+HEADER: :tangle ../makefile
#+HEADER: :noweb yes
#+BEGIN_SRC makefile
-<<make_set_var_git_version>>
-<<make_set_var_dub>>
-<<make_set_var_project_details>>
-<<make_set_var_emacs_org>>
-<<make_set_var_markup_samples_pods>>
-# <<make_set_var_markup_samples_search_dirs>>
-<<make_initialize>>
-<<make_set_nix>>
-<<make_cmd_list>>
-<<make_cmd_org>>
-<<make_cmd_project>>
-<<make_cmd_output_doc>>
-<<make_cmd_search_project>>
-<<make_cmd_search_markup_samples>>
-<<make_cmd_dev_misc>>
-# <<make_find_markup_samples_0_pod_and_dir>>
-# <<make_find_markup_samples_1_pod>>
-# <<make_find_markup_samples_2_dir>>
-<<make_version_tag>>
-<<make_changelog>>
-<<make_project_zip_archive>>
-<<nixGitHEADtarball>>
-<<make_get_project_dependencies_github>>
-<<make_dub_upgrade>>
-<<make_compile_compiler_default>>
-<<make_compile_compiler_all>>
-<<make_meson_build>>
-<<make_clean_tangle_compile_all_clean>>
-<<make_dub_compile_dmd_default>>
-<<make_dub_compile_dmd_release>>
-<<make_dub_compile_gdc_default>>
-<<make_dub_compile_gdc_release>>
-<<make_dub_compile_ldc_default>>
-<<make_dub_compile_ldc_release>>
-<<make_initialization_operations_parts>>
-<<make_initialization_operations_git_version>>
-<<make_initialization_operations_assemble>>
-<<make_project_testrun_0_find_pods>>
-<<make_project_testrun_1>>
-<<make_project_testrun_2>>
-<<make_project_testrun_3>>
-<<make_project_testrun_4>>
-<<make_project_testrun_5>>
-<<make_project_testrun_6>>
-<<make_project_testrun_7>>
-<<make_project_testrun_8>>
-<<make_project_testrun_9>>
-<<make_project_testrun_10>>
-<<make_project_testrun_11>>
-<<make_project_testrun_12>>
-<<make_tangle_0>>
-<<make_tangle_1>>
-<<make_nix_project>>
-<<make_git_snapshot>>
-<<make_phony>>
-#+END_SRC
-
-*** settings [+2] :settings:
-**** git version stamp :git:version:
-
-#+NAME: make_set_var_git_version
-#+BEGIN_SRC makefile
PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`)
PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`)
-#+END_SRC
-
-**** dub (build tool) :dub:
-
-#+NAME: make_set_var_dub
-#+BEGIN_SRC makefile
DUB=dub
DUB_FLAGS=-v --force --compiler=
-#+END_SRC
-
-**** Project Details :project:spine:
-
-#+NAME: make_set_var_project_details
-#+BEGIN_SRC makefile
PRG_NAME=doc-reform
PRG_NICKAME=spine
PRG_NAME_DIR=$(shell echo `echo $(PRG_NAME) | sed -e "s/-/_/g"`)
@@ -134,12 +60,6 @@ PRG_SRCDIR=./src
PRG_BIN=$(PRG_NAME)
PRG_BINDIR=./bin
PRG_DOCDIR=./docs
-#+END_SRC
-
-**** Emacs Org settings :settings:emacs:org:tangle:
-
-#+NAME: make_set_var_emacs_org
-#+BEGIN_SRC makefile
EMACSLISP=/usr/share/emacs/site-lisp
ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`)
EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VER_AVAILABLE)))
@@ -148,13 +68,6 @@ EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_CONT
ORGFILELIST=$(shell echo `ls -1 org/*.org`)
ORGFILES=""
ORGDIR :=$(shell echo `pwd`)
-#+END_SRC
-
-**** Markup Samples
-***** pods
-
-#+NAME: make_set_var_markup_samples_pods
-#+BEGIN_SRC makefile
SiSU_MARKUP_SAMPLES_FIND_PODS= \
find data/pod -maxdepth 2 -name pod.manifest | cut -f 1-3 -d / | sort
@@ -185,88 +98,49 @@ data/pod/through_the_looking_glass.lewis_carroll \
data/pod/two_bits.christopher_kelty \
data/pod/un_contracts_international_sale_of_goods_convention_1980 \
data/pod/viral_spiral.david_bollier
-#+END_SRC
-
-***** dir
-
-#+NAME: make_set_var_markup_samples_search_dirs
-#+BEGIN_SRC makefile
-SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND = \
-find data/sisudir/media/text -name *.ss[tm] | sort | xargs
-
-SiSU_MARKUP_SAMPLES_DIR = \
-data/sisudir/media/text/accelerando.charles_stross.sst \
-data/sisudir/media/text/alices_adventures_in_wonderland.lewis_carroll.sst \
-data/sisudir/media/text/content.cory_doctorow.sst \
-data/sisudir/media/text/democratizing_innovation.eric_von_hippel.sst \
-data/sisudir/media/text/down_and_out_in_the_magic_kingdom.cory_doctorow.sst \
-data/sisudir/media/text/ffa_tmp.sst \
-data/sisudir/media/text/for_the_win.cory_doctorow.sst \
-data/sisudir/media/text/free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman.sst \
-data/sisudir/media/text/free_culture.lawrence_lessig.sst \
-data/sisudir/media/text/free_for_all.peter_wayner.sst \
-data/sisudir/media/text/gpl2.fsf.sst \
-data/sisudir/media/text/gpl3.fsf.sst \
-data/sisudir/media/text/gullivers_travels.jonathan_swift.sst \
-data/sisudir/media/text/little_brother.cory_doctorow.sst \
-data/sisudir/media/text/sisu_markup.sst \
-data/sisudir/media/text/sisu_markup_stress_test.sst \
-data/sisudir/media/text/sisu_markup_test.sst \
-data/sisudir/media/text/table_special_markup.sst \
-data/sisudir/media/text/the_autonomous_contract.ralph_amissah.sst \
-data/sisudir/media/text/the_cathedral_and_the_bazaar.eric_s_raymond.sst \
-data/sisudir/media/text/the_public_domain.james_boyle.sst \
-data/sisudir/media/text/the_wealth_of_networks.yochai_benkler.sst \
-data/sisudir/media/text/through_the_looking_glass.lewis_carroll.sst \
-data/sisudir/media/text/two_bits.christopher_kelty.sst \
-data/sisudir/media/text/un_contracts_international_sale_of_goods_convention_1980.sst \
-data/sisudir/media/text/viral_spiral.david_bollier.sst
-
-#+END_SRC
-
-****** sample markup file list
-
-#+NAME: make_find_markup_samples_0_pod_and_dir
-#+BEGIN_SRC makefile
-markup_samples:
- find data/pod -name pod.manifest | cut -f 1-3 -d / | sort; \
- find data/sisudir/media/text -name *.ss[tm] | sort
-
-#+END_SRC
-
-#+NAME: make_find_markup_samples_1_pod
-#+BEGIN_SRC makefile
-markup_pod_samples:
- find data/pod -name pod.manifest | cut -f 1-3 -d / | sort
-
-#+END_SRC
-
-#+NAME: make_find_markup_samples_2_dir
-#+BEGIN_SRC makefile
-markup_dir_samples:
- find data/sisudir/media/text -name *.ss[tm] | sort
-
-#+END_SRC
-
-**** nix
+Date := `date "+%Y%m%d"`
+SpineBIN := "$${SpineBIN}" # './result/bin'
+SpineOUT := "$${SpineOUT}" # '/srv/www/spine'
+SpinePOD := "$${SpinePOD}" # '~/grotto/repo/git.repo/projects/doc-reform/data/markup/spine-samples/markup/pod'
+SpineSearchActionLocal := 'http://localhost/spine_search'
+SpineSearchActionRemote := 'https://sisudoc.org/spine_search'
+SpineCGIform := 'spine_search'
+SpineSQLdb := 'spine.search.db'
+hwd := `pwd`
+gwd := `pwd` + "/src/ext_depends"
+deps := "`ls -gx './src/ext_depends'`"
+dirs_loc := "`ls -gx '.'`"
+#dirs := "`ls -gx $${gwd}`"
+
+default: flake-check
+
+flake-check:
+ nix flake update; \
+ nix flake check; \
+ echo -e 'nix flake show ❯❯\n'; \
+ nix flake show; \
+ echo -e '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh\n'; \
+ echo -e '❯❯ nix develop\n❯❯ nix develop -c zsh\n'; \
+ echo -e '❯❯ nix build ".#spine-ldc" --print-build-logs |& nom\n❯❯ nix build ".#spine-dmd" --print-build-logs |& nom\n'; \
+ echo -e '❯❯ make -s\n❯❯ make -s nix-build-ldc\n❯❯ make -s nix-build-dmd\n'; \
+ echo -e '❯❯ make -s ldc\n❯❯ make -s dmd\n'; \
+ echo -e '❯❯ $(DUB) --compiler=ldc2 --build=ldc2\n❯❯ $(DUB) --compiler=dmd --build=dmd\n';
-#+NAME: make_set_nix
-#+BEGIN_SRC makefile
nix-devshell:
- echo -ne "\n- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell\n\n- nix build .#default --print-build-logs\n- nix build .#spine-dmd --print-build-logs\n- nix build .#spine-ldc --print-build-logs\n- nix build .#spine-gdc --print-build-logs\n\n"; \
- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
+ echo -ne '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell"\n\n❯❯ nix build ".#default" --print-build-logs\n❯❯ nix build ".#spine-dmd" --print-build-logs\n❯❯ nix build ".#spine-ldc" --print-build-logs\n❯❯ nix build ".#spine-gdc" --print-build-logs\n\n'; \
+ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell"
nix-build-default:
- nix build .#default --print-build-logs
+ nix build ".#default" --print-build-logs
nix-build-dmd:
- nix build .#spine-dmd --print-build-logs
+ nix build ".#spine-dmd" --print-build-logs
nix-build-ldc:
- nix build .#spine-ldc --print-build-logs
+ nix build ".#spine-ldc" --print-build-logs
nix-build-gdc:
- nix build .#spine-gdc --print-build-logs
+ nix build ".#spine-gdc" --print-build-logs
buildPhase:
HOME=$${PWD}; \
@@ -284,7 +158,7 @@ buildPhase:
fi; \
echo "$${DC_} used as D compiler to build $${pname}"; \
export DFLAGS="-O2 -inline"; \
- dub build --compiler=$${DC} --build=release --combined --skip-registry=all;
+ dub build --compiler=$${DC} --build=$${DC_} --combined --skip-registry=all;
checkPhase:
runHook preCheck; \
@@ -303,131 +177,70 @@ postInstall:
echo "$${out}/share/cgi-bin"; \
echo `ls -la $${out}/bin/spine`
-#+END_SRC
-
-*** initialize
-
-#+NAME: make_initialize
-#+BEGIN_SRC makefile
-Date := `date "+%Y%m%d"`
-SpineBIN := "${SpineBIN}" # './result/bin'
-SpineOUT := "${SpineOUT}" # '/srv/www/spine'
-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'
-SpineSQLdb := 'spine.search.db'
-hwd := `pwd`
-gwd := `pwd` + "/src/ext_depends"
-deps := "`ls -gx './src/ext_depends'`"
-dirs_loc := "`ls -gx '.'`"
-#dirs := "`ls -gx {{gwd}}`"
-
-#+END_SRC
-
-*** commands
-
-
-#+NAME: make_cmd_list
-#+BEGIN_SRC makefile
commands:
- rg --color=always -B1 "^[a-z]\w+:" makefile | less
+ rg --color=always -B1 "^[a-zA-Z_-]+:" makefile | page
-cmd:
- rg --color=always -B1 "^[a-z]\w+:" makefile | bat
-
-#+END_SRC
+cmds:
+ rg --color=always -B1 "^[a-zA-Z_-]+:" makefile | page
-**** org tangle
-
-#+NAME: make_cmd_org
-#+BEGIN_SRC makefile
# tangle org files
org-tangle:
cd ./org; \
org-tangle *.org; \
cd -
-#+END_SRC
-
-**** project
-
-#+NAME: make_cmd_project
-#+BEGIN_SRC makefile
-# project vim
-proj-v:
- nvim ./org/doc-reform.org
-
-# project emacs, cli (single instance open)
-proj-e:
- emacsclient -F -c -a -f ./org/doc-reform.org
-
-# project emacs, cli (multiple instance, no copy & paste)
-proj:
- emacsclient -nw -a -f ./org/doc-reform.org
-
-# project emacs, gui
-proj-emacs:
- emacs ./org/doc-reform.org &
-
-#+END_SRC
-
-**** generate output
-
-#+NAME: make_cmd_output_doc
-#+BEGIN_SRC makefile
# epub output
out-epub:
- {{SpineBIN}}/spine -v \
- --epub --output={{SpineOUT}} {{SpinePOD}}/*
+ $${SpineBIN}/spine -v \
+ --epub --output=$${SpineOUT} $${SpinePOD}/*
# html output with local search links
out-html:
- {{SpineBIN}}/spine -v --generated-by \
+ $${SpineBIN}/spine -v --generated-by \
--curate \
- --html --html-link-search --html-link-curate --cgi-url-action="{{SpineSearchActionLocal}}" \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --html --html-link-search --html-link-curate --cgi-url-action="$${SpineSearchActionLocal}" \
+ --output=$${SpineOUT} $${SpinePOD}/*
# latex output
out-latex:
- {{SpineBIN}}/spine -v \
+ $${SpineBIN}/spine -v \
--latex \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --output=$${SpineOUT} $${SpinePOD}/*
# odf output
out-odf:
- {{SpineBIN}}/spine -v \
+ $${SpineBIN}/spine -v \
--odf \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --output=$${SpineOUT} $${SpinePOD}/*
# sqlite output
out-sqlite:
- {{SpineBIN}}/spine -v \
- --sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ $${SpineBIN}/spine -v \
+ --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \
+ --output=$${SpineOUT} $${SpinePOD}/*
# generate markup sample output with local search links
output-samples-local:
- {{SpineBIN}}/spine -v \
+ $${SpineBIN}/spine -v \
--latex --latex-init \
--epub \
--html --html-link-search --html-link-pdf --html-link-curate --html-link-markup \
- --cgi-sqlite-search-filename="{{SpineCGIform}}" --cgi-url-action="{{SpineSearchActionLocal}}" \
+ --cgi-sqlite-search-filename="$${SpineCGIform}" --cgi-url-action="$${SpineSearchActionLocal}" \
--curate \
- --sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \
+ --output=$${SpineOUT} $${SpinePOD}/*
# generate markup sample output with remote search links
output-samples-remote:
- {{SpineBIN}}/spine -v \
+ $${SpineBIN}/spine -v \
--generated-by \
--latex --latex-init \
--epub \
--html --html-link-search --html-link-pdf --html-link-curate \
- --cgi-sqlite-search-filename="{{SpineCGIform}}" --cgi-url-action="{{SpineSearchActionRemote}}" \
+ --cgi-sqlite-search-filename="$${SpineCGIform}" --cgi-url-action="$${SpineSearchActionRemote}" \
--curate \
- --sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \
- --output={{SpineOUT}} {{SpinePOD}}/*
+ --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \
+ --output=$${SpineOUT} $${SpinePOD}/*
# generate markup sample output with local search links
output-samples: output-samples-local
@@ -438,14 +251,90 @@ generate-output-remote: nix-build output-samples-remote
# nix build (local) run
generate-output-local: nix-build output-samples-local
-#+END_SRC
+# project vim
+proj-v:
+ vim ./org/doc-reform.org
-**** search project
+# project emacs, cli (single instance open)
+proj-e:
+ emacsclient -F -c -a -f ./org/doc-reform.org
+
+# project emacs, cli (multiple instance, no copy & paste)
+proj:
+ emacsclient -nw -a -f ./org/doc-reform.org
+
+# project emacs, gui
+proj-emacs:
+ emacs ./org/doc-reform.org &
+
+# search project
+fzf:
+ echo -n "what to search project for?: "; \
+ read FIND; \
+ rg --files-with-matches --no-messages "$${FIND}" | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(vim -c \"silent! /$${FIND}\" {1})";
+
+# search org files directory
+fzf-org:
+ echo -n "what to search org directory for?: "; \
+ read FIND; \
+ cd ./org; \
+ rg --files-with-matches --no-messages "$${FIND}" | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(vim -c \"silent! /$${FIND}\" {1})"; \
+ cd -;
+
+# search org files directory, emacs editor
+fzf-org-e:
+ echo -n "what to search org directory for?: "; \
+ read FIND; \
+ cd ./org; \
+ rg --files-with-matches --no-messages "$${FIND}" | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(emacsclient -F -c -a -f {1})"; \
+ cd -;
+
+# search org files directory
+fzf-nix:
+ echo -n "what to search nix files for?: "; \
+ read FIND; \
+ rg --files-with-matches --no-messages "$${FIND}" *.nix makefile .envrc | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(vim -c \"silent! /$${FIND}\" {1})";
+
+# search org files directory
+fzf-nix-e:
+ echo -n "what to search nix files for? (emacs): "; \
+ read FIND; \
+ rg --files-with-matches --no-messages "$${FIND}" *.nix makefile .envrc | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(emacsclient -F -c -a -f {1})";
+
+# search project source files directory
+fzf-src:
+ echo -n "what to search source files for?: "; \
+ read FIND; \
+ cd ./src/doc_reform; \
+ rg --files-with-matches --no-messages "$${FIND}" | \
+ fzf --multi --ansi --print0 \
+ --preview-window=right:66% \
+ --preview="rg --pretty --after-context 3 --before-context 2 -- \"$${FIND}\" {}" \
+ --bind="enter:execute(vim -c \"silent! /$${FIND}\" {1})";
+ cd -;
-#+NAME: make_cmd_search_project
-#+BEGIN_SRC makefile
# preview org files vim
-files-vim:
+files-vi:
fd --max-depth 6 --type file -g "*" | sort \
| fzf \
--preview='bat --color "always" {}' \
@@ -453,7 +342,7 @@ files-vim:
--bind="enter:execute(nvim {})"; \
# preview org files emacs
-files-emacs:
+files-e:
fd --max-depth 6 --type file -g "*" | sort \
| fzf \
--preview='bat --color "always" {}' \
@@ -461,7 +350,7 @@ files-emacs:
--bind="enter:execute(emacsclient -nw -a -f {})"; \
# preview org files vim
-org-vim:
+org-v:
cd ./org; \
fd --max-depth 5 --type file -g "*.org" | sort \
| fzf \
@@ -471,7 +360,7 @@ org-vim:
cd -
# preview org files emacs
-org-emacs:
+org-e:
cd ./org; \
fd --max-depth 5 --type file -g "*.org" | sort \
| fzf \
@@ -480,114 +369,48 @@ org-emacs:
--bind="enter:execute(emacsclient -nw -a -f {})"; \
cd -
-## search org files (view in vim)
-#org-v find:
-# cd ./org; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(nvim -c \"silent! /{{find}}\" {1})"; \
-# cd -
-#
-## search org files (view in emacsclient)
-#org-e find:
-# cd ./org; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(emacsclient -nw -a -f {})"; \
-# cd -
-#
-## search tips.org files (view in emacs)
-#org-E find:
-# cd ./org; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(emacs {} &)"; \
-# cd -
-#
-## search for in directory specified (view in vim, uses rg & fzf) ["find" for emacs]
-#sDir-v find dir:
-# cd {{dir}}; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(nvim -c \"silent! /{{find}}\" {1})"; \
-# cd -
-#
-## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs]
-#sDir-e find dir:
-# cd {{dir}}; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(emacsclient -nw -a -f {})"; \
-# cd -
-#
-## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs]
-#sDir-E find dir:
-# cd {{dir}}; \
-# rg --files-with-matches --no-messages "{{find}}" | \
-# fzf --multi --ansi --print0 \
-# --preview-window=right:66% \
-# --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \
-# --bind="enter:execute(emacs {} &)"; \
-# cd -
-
-#+END_SRC
-
-**** search markup samples
-
-#+NAME: make_cmd_search_markup_samples
-#+BEGIN_SRC makefile
# show markup pod source selections
markup:
- ls -1 --color=always {{SpinePOD}}
- ls -1 -d --color=always {{SpinePOD}}/*/
+ ls -1 --color=always $${SpinePOD}
+ ls -1 -d --color=always $${SpinePOD}/*/
# show markup pod source tree
markup-pod-tree:
- exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpinePOD} | less -R
+ exa -alT --git -I'.git|.dub|*_' --color=always -L5 $${SpinePOD} | less -R
# show markup pod source tree
tree-src:
- exa -alT --git -I'*_' --color=always -L5 ${SpineSRC}/doc_reform ${SpinePROJ}/views | less -R
+ exa -alT --git -I'*_' --color=always -L5 $${SpineSRC}/doc_reform $${SpinePROJ}/views | less -R
## show markup pod source tree
#tree-src-omit:
-# exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpineSRC} ${SpinePROJ}/views | less -R
+# exa -alT --git -I'.git|.dub|*_' --color=always -L5 $${SpineSRC} $${SpinePROJ}/views | less -R
# show markup pod source tree
tree-src-search-cgi:
- exa -alT --git -I'*_' --color=always -L5 ${SpineSearchCGI}/src ${SpineSearchCGI}/views | less -R
+ exa -alT --git -I'*_' --color=always -L5 $${SpineSearchCGI}/src $${SpineSearchCGI}/views | less -R
# show markup files
markup-files:
- cd {{SpinePOD}}; \
+ cd $${SpinePOD}; \
find . -type f -iname "*sst"; \
cd -; \
- echo {{SpinePOD}}
-# find {{SpinePOD}}/. -type f -iname "*sst"
+ echo $${SpinePOD}
+# find $${SpinePOD}/. -type f -iname "*sst"
# preview markup files vim
-markup-files-vim:
- cd {{SpinePOD}}; \
+markup-files-vi:
+ cd $${SpinePOD}; \
fd --max-depth 5 --type file -g "*.ss?" | sort \
| fzf \
--preview='bat --color "always" {}' \
--preview-window=right:66% \
- --bind="enter:execute(nvim {})"; \
+ --bind="enter:execute(vim {})"; \
cd -
# preview markup files emacs
-markup-files-emacs:
- cd {{SpinePOD}}; \
+markup-files-e:
+ cd $${SpinePOD}; \
fd --max-depth 5 --type file -g "*.ss?" | sort \
| fzf \
--preview='bat --color "always" {}' \
@@ -607,86 +430,74 @@ markup-samples: markup-pod-samples markup-file-samples
# markup samples pod manifests
markup-pod-samples:
- echo "{{SpinePOD}}"; \
- find {{SpinePOD}} -name pod.manifest | sort
+ echo "$${SpinePOD}"; \
+ find $${SpinePOD} -name pod.manifest | sort
-#find {{SpinePOD}} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:'
+#find $${SpinePOD} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:'
# markup samples sst files
markup-file-samples:
- echo "{{SpinePOD}}"; \
- find {{SpinePOD}} -name *.ss[tm] | sort
-
-# markup_dir_samples:
-# find data/sisudir/media/text -name *.ss[tm] | sort
-
-#+END_SRC
-
-**** dev: git, depends
-
-#+NAME: make_cmd_dev_misc
-#+BEGIN_SRC makefile
-# version_tag:
-# echo "DRV=0.12.0; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \
-# echo "git tag -f doc-reform_v0.12.0 -m\"doc-reform spine-0.12.0\" HEAD"
+ echo "$${SpinePOD}"; \
+ find $${SpinePOD} -name *.ss[tm] | sort
# archive spine output (www)
spineWWWarchive:
cd /srv/www ; \
- rm spine_output.{{Date}}.tar.bz2 ; \
- sudo tar --exclude='./spine/latex' --exclude='./spine/pod' --exclude='./spine/*_' -cjf spine_output.{{Date}}.tar.bz2 ./spine ; \
+ rm spine_output.$${Date}.tar.bz2 ; \
+ sudo tar --exclude='./spine/latex' --exclude='./spine/pod' --exclude='./spine/*_' -cjf spine_output.$${Date}.tar.bz2 ./spine ; \
cd -
# rsync archived spine output to Linode
spineWWWrsyncLinode:
- rsync -v /srv/www/spine_output.{{Date}}.tar.bz2 linode:./stage/. ; \
+ rsync -v /srv/www/spine_output.$${Date}.tar.bz2 linode:./stage/. ; \
rsync -v /var/www/sqlite/spine.search.db linode:./stage/. ; \
- echo "tar -xf ../spine_output.{{Date}}.tar.bz2"
+ echo "tar -xf ../spine_output.$${Date}.tar.bz2"
# get project external dependencies
depends_get:
dub upgrade; \
- cd {{gwd}} && \
- echo "{{dirs_loc}}" && \
- for dir in {{dirs_loc}}; do \
- if [[ -d ${dir} ]]; then \
- echo {{gwd}}/${dir} && \
- if [[ "imageformats" == ${dir} ]]; then \
- echo {{gwd}}/${dir} && \
- rm -rvf {{gwd}}/${dir} && \
- git clone --depth=1 https://github.com/tjhann/${dir} && \
- cd ${dir} && \
+ cd $${gwd} && \
+ echo "$${dirs_loc}" && \
+ for dir in $${dirs_loc}; do \
+ if [[ -d $${dir} ]]; then \
+ echo $${gwd}/$${dir} && \
+ if [[ "imageformats" == $${dir} ]]; then \
+ echo $${gwd}/$${dir} && \
+ rm -rvf $${gwd}/$${dir} && \
+ git clone --depth=1 https://github.com/tjhann/$${dir} && \
+ cd $${dir} && \
echo $$PWD && \
- echo "${dir} `git rev-parse HEAD | cut -c 1-8`" > ../${dir}.meta && \
- echo "https://github.com/tjhann/${dir}" >> ../${dir}.meta && \
- echo "Boost Software License 1.0 (BSL-1.0)" >> ../${dir}.meta && \
- cd {{gwd}} && \
- rm -rf {{gwd}}/${dir}/.git; \
- elif [[ "d2sqlite3" == ${dir} || "D-YAML" == ${dir} || "tinyendian" == ${dir} ]]; then \
- echo {{gwd}}/${dir} && \
- rm -rvf {{gwd}}/${dir} && \
- git clone --depth=1 https://github.com/dlang-community/${dir} && \
- cd {{gwd}}/${dir} && \
- echo "${dir} `git rev-parse HEAD | cut -c 1-8`" > ../${dir}.meta && \
- echo "https://github.com/dlang-community/${dir}" >> ../${dir}.meta && \
- echo "Boost Software License 1.0 (BSL-1.0)" >> ../${dir}.meta && \
- cd {{gwd}} && \
- rm -rf {{gwd}}/${dir}/.git; \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \
+ echo "Boost Software License 1.0 (BSL-1.0)" >> ../$${dir}.meta && \
+ cd $${gwd} && \
+ rm -rf $${gwd}/$${dir}/.git; \
+ elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \
+ echo $${gwd}/$${dir} && \
+ rm -rvf $${gwd}/$${dir} && \
+ git clone --depth=1 https://github.com/dlang-community/$${dir} && \
+ cd $${gwd}/$${dir} && \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \
+ echo "Boost Software License 1.0 (BSL-1.0)" >> ../$${dir}.meta && \
+ cd $${gwd} && \
+ rm -rf $${gwd}/$${dir}/.git; \
fi; \
fi; \
done; \
- cd {{hwd}}
+ cd $${hwd}
# get and set project external dependencies
depends_set: depends_get
dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json
-#+END_SRC
+changelog_:
+ git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" > CHANGELOG_
-*** make archive
+# git changelog for project
+changelog:
+ git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" | sed "s/ \+$//" > CHANGELOG_
-#+NAME: make_project_zip_archive
-#+BEGIN_SRC makefile
gitZip:
git archive -v --format=tar --prefix=`echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)`/ HEAD | gzip > ./tarballGitHEAD/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \
echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz"
@@ -696,18 +507,6 @@ gitArchive:
git archive -v --format=tar --prefix=spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)/ HEAD | gzip > ./tarballGitHEAD/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \
echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz"
-# git archive project, produce current state .tar.gz
-# gitArchive:
-# git archive -v --format=tar --prefix="spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}/" HEAD | gzip > ./tarballGitHEAD/spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz && \
-# echo "to unzip: tar -xzf spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz"
-
-#+END_SRC
-
-*** nixGitHEADtarball
-
-#+NAME: nixGitHEADtarball
-#+HEADER: :noweb yes
-#+BEGIN_SRC makefile
# remove test tarball dir
nixGitHEADtarballClean:
if [ -d "./tarballGitHEAD" ]; then \
@@ -719,187 +518,139 @@ nixGitHEADtarballTar:
if [ ! -d "./tarballGitHEAD" ]; then \
mkdir ./tarballGitHEAD; \
fi; \
- git archive -v --format=tar --prefix="spine-${PROG_VER_DECLARED}/" HEAD | \
- gzip > ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz && \
- cp -v ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz ./tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz && \
- echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz"; \
- echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}.tar.gz"
+ git archive -v --format=tar --prefix="spine-$${PROG_VER_DECLARED}/" HEAD | \
+ gzip > ./tarballGitHEAD/spine-$${PROG_VER_DECLARED}-tag-$${PROG_VER_GIT}.tar.gz && \
+ cp -v ./tarballGitHEAD/spine-$${PROG_VER_DECLARED}-tag-$${PROG_VER_GIT}.tar.gz ./tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz && \
+ echo "to unzip: tar -xzf spine-$${PROG_VER_DECLARED}-tag-$${PROG_VER_GIT}.tar.gz"; \
+ echo "to unzip: tar -xzf spine-$${PROG_VER_DECLARED}.tar.gz"
# check test tarball
nixGitHEADtarballCheck:
- nix flake check <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz; \
- nix flake lock <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz; \
- nix flake show <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz;
+ nix flake check file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz; \
+ nix flake lock file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz; \
+ nix flake show file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz;
# build test tarball
nixGitHEADtarballBuild:
- echo "nix build <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs"
- nix build <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs
- #nix build "./tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz#spine" --print-build-logs
+ echo "nix build file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs"; \
+ nix build file://$${hwd}/tarballGitHEAD/spine-$${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs
# clean create check & build test tarball
nixGitHEADtarball: nixGitHEADtarballClean nixGitHEADtarballTar nixGitHEADtarballCheck nixGitHEADtarballBuild
-#+END_SRC
-
-**** Url nixGitHEADtarball
-
-#+NAME: nixGitUrl
-#+BEGIN_SRC makefile
-file://${hwd}/tarballGitHEAD
-#+END_SRC
-
-*** _make_ commands [+2] :make:commands:
-
-- build commands
- - build
- - debug
- - release
-- init, clean, distclean etc.
- - init
- - clean
- - expunge
- - distclean
- - distclean_and_init
-- org babel tangle
- - tangle
-- git snapshot
- - gitsnapshot
-
-**** version tag, stamp
-
-#+NAME: make_version_tag
-#+HEADER: :noweb yes
-#+BEGIN_SRC makefile
-version_tag:
- echo "DRV=<<spine_version_set>>; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \
- echo "git tag -f doc-reform_v<<spine_version_set>> -m\"doc-reform spine-<<spine_version_set>>\" HEAD"
-
-#+END_SRC
+get_depends:
+ hwd=$$(echo `pwd`) && \
+ gwd="$${hwd}/src/ext_depends" && \
+ dirs=$$(echo `ls -gx $${gwd}`) && \
+ license_bsl="Boost Software License 1.0 (BSL-1.0)" && \
+ echo $${hwd} && \
+ echo $${gwd} && \
+ echo $${deps} && \
+ dub upgrade; \
+ cd $${gwd} && \
+ for dir in $${deps}; do \
+ if [ -d $${dir} ]; then \
+ echo $${dir} && \
+ if [ "imageformats" == $${dir} ]; then \
+ echo $${dir} && \
+ rm -rf $${dir} && \
+ git clone --depth=1 https://github.com/tjhann/$${dir} && \
+ cd $${dir} && \
+ echo $$PWD && \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \
+ echo "$${license_bsl}" >> ../$${dir}.meta && \
+ cd $${gwd} && \
+ rm -rf $${dir}/.git; \
+ elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \
+ echo $${dir} && \
+ rm -rf $${dir} && \
+ git clone --depth=1 https://github.com/dlang-community/$${dir} && \
+ cd $${dir} && \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \
+ echo "$${license_bsl}" >> ../$${dir}.meta && \
+ cd $${gwd} && \
+ rm -rf $${dir}/.git; \
+ fi; \
+ fi; \
+ done; \
+ cd $${hwd}
-**** changelog
+set_depends: get_depends
+ dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json
-#+NAME: make_changelog
-#+BEGIN_SRC makefile
-changelog_:
- git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" > CHANGELOG_
+rm_flakelock:
+ git reset HEAD flake.lock && \
+ touch flake.lock \
+ git rm -f flake.lock
-# git changelog for project
-changelog:
- git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" | sed "s/ \+$//" > CHANGELOG_
+flake_update:
+ git add .; \
+ nix flake lock && \
+ git reset HEAD flake.lock; \
+ cp flake.lock flake.lock_
-#+END_SRC
+flake_update_move_lock: flake_update
+ touch flake.lock \
+ git rm -f flake.lock
-**** build commands [+1] :build:compile:
-***** _dub_ build rebuild :dub:
-****** all compiler builds :all:dmd:gdc:ldc:
-******* all builds
-******** default
+set_latest: set_depends flake_update rm_flakelock
-#+NAME: make_dub_upgrade
-#+BEGIN_SRC makefile
dub_upgrade:
$(DUB) upgrade
-#+END_SRC
+dc: ldc
-#+NAME: make_compile_compiler_default
-#+BEGIN_SRC makefile
-default: ldc
+compile: ldc
-#+END_SRC
-
-******** quick :quick:
-********* default :default:
-
-#+NAME: make_compile_compiler_all
-#+BEGIN_SRC makefile
all: dmd ldc gdc
all_ver: dmd_ver ldc_ver gdc_ver
-all_debug: dmd_debug gdc_debug ldc_debug
-
-#+END_SRC
-******** clean & tangle :clean:tangle:
-********* default :default:
-
-#+NAME: make_clean_tangle_compile_all_clean
-#+BEGIN_SRC makefile
-all_clean: clean tangle dmd ldc gdc
+meson_clean_build_dir:
+ rm -r build; mkdir build
-all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver
+meson_redo: meson_clean_build_dir meson_build
-all_debug_ver: dmd_debug_ver gdc_debug_ver ldc_debug_ver
+meson_project_build_clean: clean skel tangle dub_upgrade meson_build
-all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver
+meson: meson_clean_build_dir dub_upgrade meson_build
-#+END_SRC
+all_clean: clean tangle dmd ldc gdc
-****** individual compiler builds :each:
-******* dmd :dmd:
-******** quick builds :quick:
+all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver
-#+NAME: make_dub_compile_dmd_default
-#+BEGIN_SRC makefile
dmd: dub_upgrade
- $(DUB) --compiler=dmd --config=dmd --build=release-nobounds
+ $(DUB) --compiler=dmd --build=dmd --build=release-nobounds
notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd'
-dmd_debug:
- $(DUB) --compiler=dmd --config=dmd --build=debug
-
# assumes git tags with program version
dmd_ver: dub_upgrade
- $(DUB) --compiler=dmd --config=dmd-version
+ $(DUB) --compiler=dmd --build=dmd-version
mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd
notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd'
-#+END_SRC
-
-******** clean & tangle :clean:tangle:
-
-#+NAME: make_dub_compile_dmd_release
-#+BEGIN_SRC makefile
dmd_clean_ver: clean tangle dmd_ver
dmd_rel: expunge skel tangle
- $(DUB) --compiler=dmd --config=spine-release
+ $(DUB) --compiler=dmd --build=spine-release
dmd_rel_tangle: tangle
- $(DUB) --compiler=dmd --config=spine-dmd
+ $(DUB) --compiler=dmd --build=spine-dmd
dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle
-dmd_debug_tangle: tangle
- $(DUB) --compiler=dmd --config=spine-dmd-debug
-
-#+END_SRC
-
-******* gdc :gdc:
-******** quick builds :quick:
-
-#+NAME: make_dub_compile_gdc_default
-#+BEGIN_SRC makefile
gdc: dub_upgrade
- $(DUB) --compiler=gdc --config=gdc
+ $(DUB) --compiler=gdc --build=gdc
notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc'
-gdc_debug:
- $(DUB) --compiler=gdc --config=gdc --build=debug
-
# assumes git tags with program version
gdc_ver: dub_upgrade
- $(DUB) --compiler=gdc --config=gdc-version
+ $(DUB) --compiler=gdc --build=gdc-version
mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc
notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc'
-#+END_SRC
-
-******** clean & tangle :clean:tangle:
-
-#+NAME: make_dub_compile_gdc_release
-#+BEGIN_SRC makefile
gdc_clean_ver: clean tangle gdc_ver
gdc_rel: expunge skel tangle
@@ -910,23 +661,10 @@ gdc_rel_tangle: tangle
gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle
-gdc_debug_tangle: tangle
- $(DUB) --compiler=gdc --config=spine-gdc-debug
-
-#+END_SRC
-
-******* ldc :ldc:
-******** quick builds :quick:
-
-#+NAME: make_dub_compile_ldc_default
-#+BEGIN_SRC makefile
ldc: dub_upgrade
- $(DUB) --compiler=ldc2 --config=ldc --build=release
+ $(DUB) --compiler=ldc2 --build=ldc2 --build=release
notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc'
-ldc_debug:
- $(DUB) --compiler=ldc2 --config=ldc --build=debug
-
# assumes git tags with program version
ldc_ver: dub_upgrade
$(DUB) --compiler=ldc2 --config=ldc-version
@@ -935,12 +673,6 @@ ldc_ver: dub_upgrade
ldc_clean_ver: clean tangle ldc_ver
-#+END_SRC
-
-******** clean & tangle :clean:tangle:
-
-#+NAME: make_dub_compile_ldc_release
-#+BEGIN_SRC makefile
ldc_rel: expunge skel tangle
$(DUB) --compiler=ldc2 --config=spine-release
@@ -949,16 +681,6 @@ ldc_rel_tangle: tangle
ldc_rel_expunge_tangle: expunge skel tangle ldc_rel_tangle
-ldc_debug_tangle: tangle
- $(DUB) --compiler=ldc2 --config=spine-ldc-debug
-
-#+END_SRC
-
-****** generic
-******* init clean distclean etc. :clean:
-
-#+NAME: make_initialization_operations_parts
-#+BEGIN_SRC makefile
reinit: clean skel tangle
skel:
@@ -1021,21 +743,9 @@ distclean_and_init: expunge
mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \
mkdir -p $(PRG_BINDIR);
-#+END_SRC
-
-******* version :version:
-
-#+NAME: make_initialization_operations_git_version
-#+BEGIN_SRC makefile
ver:
echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)
-#+END_SRC
-
-******* tangle build rebuild :clean:tangle:build:
-
-#+NAME: make_initialization_operations_assemble
-#+BEGIN_SRC makefile
clean_tangle_build: clean tangle build
tangle_build: tangle build
@@ -1052,115 +762,125 @@ makefile_new:
restart: clean tangle
-#+END_SRC
+find_pods:
+ $(SiSU_MARKUP_SAMPLES_FIND_PODS)
-**** get project dependencies
+testrun_find:
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_pod \
+ data/pod/sisu-manual
-#+NAME: make_get_project_dependencies_github
-#+BEGIN_SRC makefile
-get_depends:
- hwd=$$(echo `pwd`) && \
- gwd="$${hwd}/src/ext_depends" && \
- dirs=$$(echo `ls -gx $${gwd}`) && \
- license_bsl="Boost Software License 1.0 (BSL-1.0)" && \
- echo $${hwd} && \
- echo $${gwd} && \
- echo $${deps} && \
- dub upgrade; \
- cd $${gwd} && \
- for dir in $${deps}; do \
- if [ -d $${dir} ]; then \
- echo $${dir} && \
- if [ "imageformats" == $${dir} ]; then \
- echo $${dir} && \
- rm -rf $${dir} && \
- git clone --depth=1 https://github.com/tjhann/$${dir} && \
- cd $${dir} && \
- echo $$PWD && \
- echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
- echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \
- echo "$${license_bsl}" >> ../$${dir}.meta && \
- cd $${gwd} && \
- rm -rf $${dir}/.git; \
- elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \
- echo $${dir} && \
- rm -rf $${dir} && \
- git clone --depth=1 https://github.com/dlang-community/$${dir} && \
- cd $${dir} && \
- echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
- echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \
- echo "$${license_bsl}" >> ../$${dir}.meta && \
- cd $${gwd} && \
- rm -rf $${dir}/.git; \
- fi; \
- fi; \
- done; \
- cd $${hwd}
+testrun_find_pod_source:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --source \
+ --output-dir=tmp/program_output_pod
-set_depends: get_depends
- dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json
+testrun_find_pod_pod:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --pod \
+ --output-dir=tmp/program_output_pod
-rm_flakelock:
- git reset HEAD flake.lock && \
- touch flake.lock \
- git rm -f flake.lock
+testrun_find_pod_html:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --html \
+ --output-dir=tmp/program_output_pod
-flake_update:
- git add .; \
- nix flake lock && \
- git reset HEAD flake.lock; \
- cp flake.lock flake.lock_
+testrun_find_pod_epub:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --epub \
+ --output-dir=tmp/program_output_pod
-flake_update_move_lock: flake_update
- touch flake.lock \
- git rm -f flake.lock
+testrun_find_pod_all:
+ $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_pod
-set_latest: set_depends flake_update rm_flakelock
+testrun_paths:
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_pod \
+ data/pod/sisu-manual
-#+END_SRC
+testrun_paths_pod_source:
+ spine -v --source \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
-gitDir=dub2nix; git clone --depth=1 https://github.com/lionello/${gitDir} | rm -rf ${gitDir}/.git
+testrun_paths_pod_pod:
+ spine -v --pod \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
-**** _meson_ build :meson:
+testrun_paths_pod_html:
+ spine -v --html \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
-meson using dub
-- works & looks pretty clean
-- but subprojects built externally & not suitable for debian packaging
+testrun_paths_pod_epub:
+ spine -v --epub \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
-#+NAME: make_meson_build
-#+BEGIN_SRC makefile
-meson_clean_build_dir:
- rm -r build; mkdir build
+testrun_paths_pod_all:
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_pod \
+ ./markup/pod/*
-meson_build: meson_clean_build_dir
- meson --buildtype=debugoptimized build
- ninja -C build
- notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine'
+testrun_find_dir_source:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --source \
+ --output-dir=tmp/program_output_dir
-meson_redo: meson_clean_build_dir meson_build
+testrun_find_dir_pod:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --pod \
+ --output-dir=tmp/program_output_dir
-meson_project_build_clean: clean skel tangle dub_upgrade meson_build
+testrun_find_dir_html:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --html \
+ --output-dir=tmp/program_output_dir
-meson: meson_clean_build_dir dub_upgrade meson_build
+testrun_find_dir_epub:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --epub \
+ --output-dir=tmp/program_output_dir
-#+END_SRC
+testrun_find_dir_all:
+ $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_dir
-**** testrun (program against document markup) :markup:sample:
-***** pods :pod:
-******* find files
+testrun_filelist_dir_source:
+ spine -v --source \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
-#+NAME: make_project_testrun_0_find_pods
-#+BEGIN_SRC makefile
-find_pods:
- $(SiSU_MARKUP_SAMPLES_FIND_PODS)
+testrun_filelist_dir_pod:
+ spine -v --pod \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
-#+END_SRC
+testrun_filelist_dir_html:
+ spine -v --html \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
-****** dmd
-******* find files
+testrun_filelist_dir_epub:
+ spine -v --epub \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
+
+testrun_filelist_dir_all:
+ spine -v --source --html --epub --sqlite-discrete \
+ --sqlite-create --sqlite-update \
+ --output-dir=tmp/program_output_dir \
+ $(SiSU_MARKUP_SAMPLES_DIR)
-#+NAME: make_project_testrun_1
-#+BEGIN_SRC makefile
dmd_testrun_find:
./bin/spine-dmd -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -1193,12 +913,6 @@ dmd_testrun_find_pod_all:
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod
-#+END_SRC
-
-******* path list
-
-#+NAME: make_project_testrun_2
-#+BEGIN_SRC makefile
dmd_testrun_paths_pod_source:
./bin/spine-dmd -v --source \
--output-dir=tmp/program_output_pod \
@@ -1225,13 +939,6 @@ dmd_testrun_paths_pod_all:
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
-#+END_SRC
-
-****** gdc
-******* find files
-
-#+NAME: make_project_testrun_3
-#+BEGIN_SRC makefile
gdc_testrun_find:
./bin/spine-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -1264,12 +971,6 @@ gdc_testrun_find_pod_all:
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod
-#+END_SRC
-
-******* path list
-
-#+NAME: make_project_testrun_4
-#+BEGIN_SRC makefile
gdc_testrun_paths:
./bin/spine-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -1302,13 +1003,6 @@ gdc_testrun_paths_pod_all:
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
-#+END_SRC
-
-****** ldc
-******* find files
-
-#+NAME: make_project_testrun_5
-#+BEGIN_SRC makefile
ldc_testrun_find:
./bin/spine-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -1341,12 +1035,6 @@ ldc_testrun_find_pod_all:
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod
-#+END_SRC
-
-******* path list
-
-#+NAME: make_project_testrun_6
-#+BEGIN_SRC makefile
ldc_testrun_paths:
./bin/spine-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -1379,14 +1067,6 @@ ldc_testrun_paths_pod_all:
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
-#+END_SRC
-
-***** dir :dir:
-****** dmd
-******* find files
-
-#+NAME: make_project_testrun_7
-#+BEGIN_SRC makefile
dmd_testrun_find_dir_source:
$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/spine-dmd -v --source \
@@ -1413,12 +1093,6 @@ dmd_testrun_find_dir_all:
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir
-#+END_SRC
-
-******* file list
-
-#+NAME: make_project_testrun_8
-#+BEGIN_SRC makefile
dmd_testrun_filelist_dir_source:
./bin/spine-dmd -v --source \
--output-dir=tmp/program_output_dir \
@@ -1445,13 +1119,6 @@ dmd_testrun_filelist_dir_all:
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
-#+END_SRC
-
-****** gdc
-******* find files
-
-#+NAME: make_project_testrun_9
-#+BEGIN_SRC makefile
gdc_testrun_find_dir_source:
./bin/spine-gdc -v --source \
--output-dir=tmp/program_output_dir \
@@ -1478,12 +1145,6 @@ gdc_testrun_find_dir_all:
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir
-#+END_SRC
-
-******* file list
-
-#+NAME: make_project_testrun_10
-#+BEGIN_SRC makefile
gdc_testrun_filelist_dir_source:
./bin/spine-gdc -v --source \
--output-dir=tmp/program_output_dir \
@@ -1510,13 +1171,6 @@ gdc_testrun_filelist_dir_all:
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
-#+END_SRC
-
-****** ldc
-******* find files
-
-#+NAME: make_project_testrun_11
-#+BEGIN_SRC makefile
ldc_testrun_find_dir_source:
$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/spine-ldc -v --source \
@@ -1543,12 +1197,6 @@ ldc_testrun_find_dir_all:
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir
-#+END_SRC
-
-******* file list
-
-#+NAME: make_project_testrun_12
-#+BEGIN_SRC makefile
ldc_testrun_filelist_dir_source:
./bin/spine-ldc -v --source \
--output-dir=tmp/program_output_dir \
@@ -1575,13 +1223,6 @@ ldc_testrun_filelist_dir_all:
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
-#+END_SRC
-
-**** org babel tangle batch process command :tangle:
-***** tangle: org babel tangle *.org
-
-#+NAME: make_tangle_0
-#+BEGIN_SRC makefile
tangle: skel
for f in $(ORGFILELIST); do \
ORGFILES="$$ORGFILES \"$$f\""; \
@@ -1601,12 +1242,6 @@ tangle: skel
(org-babel-tangle) \
(kill-buffer)) '($$ORGFILES)))" 2>&1
-#+END_SRC
-
-***** tangle maker: org babel tangle makefile new
-
-#+NAME: make_tangle_1
-#+BEGIN_SRC makefile
tangle_maker:
for f in $(ORGFILELIST); do \
ORGFILES="\"org/dr_build_scaffold.org\""; \
@@ -1626,15 +1261,6 @@ tangle_maker:
(org-babel-tangle) \
(kill-buffer)) '($$ORGFILES)))" 2>&1
-#+END_SRC
-
-***** tangle nix project
-
-#+NAME: make_nix_project
-#+BEGIN_SRC makefile
-lorri_shell:
- lorri shell
-
# nix-shell
nix-shell:
nix-shell -I .envrc
@@ -1644,7 +1270,7 @@ nix-shell-pure:
# nix-shell (with local tools, presumably latest dlang compiler & build tools (ldc & dub))
nix-shell-updated:
- nix-shell -I nixpkgs=/nix/nixpkgs --pure
+ nix-shell -I nixpkgs=/srv/nix/nixpkgs --pure
# shell.nix (with shebang)
shell:
@@ -1686,7 +1312,7 @@ _flake-show-derivation:
nix show-derivation |jq;
nix-develop:
- nix develop -f default.nix -I nixpkgs=/nix/nixpkgs
+ nix develop -f default.nix -I nixpkgs=/srv/nix/nixpkgs
# nix flake show
flake-show: _flake-show-package _flake-show-name _flake-show-derivation
@@ -1699,13 +1325,9 @@ flake-build: _flake-show-name
flake-reset-build: _flake-lock-reset _flake-show-name
nix build --print-build-logs
-# nix-build flake spine debug
-flake-build-debug:
- nix build --debug
-
# nix-build spine (with local tools, presumably latest dlang compiler & build tools (ldc & dub))
flake-build-use-tools-new:
- nix build --print-build-logs -I nixpkgs=/nix/nixpkgs
+ nix build --print-build-logs -I nixpkgs=/srv/nix/nixpkgs
# tangle-build-flake
flake-tangle-build: org-tangle flake-build
@@ -1722,64 +1344,15 @@ flake-build-search:
nix build --print-build-logs \
cd -
-#+END_SRC
-
-**** git snapshot
-
-#+NAME: make_git_snapshot
-#+BEGIN_SRC makefile
gitsnapshot: distclean tangle
git commit -a
-#+END_SRC
-
-*** phony :phony:
+version_tag:
+ echo "DRV=<<spine_version_set>>; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform spine-$$\{DRV}\" HEAD"; \
+ echo "git tag -f doc-reform_v<<spine_version_set>> -m\"doc-reform spine-<<spine_version_set>>\" HEAD"
-#+NAME: make_phony
-#+BEGIN_SRC makefile
-.PHONY : all build rebuild debug release \
+.PHONY : all build rebuild release \
distclean init \
tangle gitsnapshot
-
-#+END_SRC
-
-** .env/local
-
-#+HEADER: :NO-tangle ../.env/local
-#+BEGIN_SRC sh
-export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
-#export NIX_PATH=nixpkgs=/nix/nixpkgs
-#export NIX_PATH=/nix/nixpkgs
-# reload when these files change
-# watch_file flake.nix
-# watch_file flake.lock
-## load the flake devShell
-# 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/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
-export SpineDBpath=/var/www/sqlite
-#use nix
-if [ -e .env/echo-nixNote ]; then
- source .env/echo-nixNote
-fi
#+END_SRC
-* www dr spine latex
-
-- /srv/www/spine/latex
-
-** notes
-
-- vim {the_wealth_of_networks.yochai_benkler,two_bits.christopher_kelty,viral_spiral.david_bollier}.en.a4.portrait.tex
-- emacs {the_wealth_of_networks.yochai_benkler,two_bits.christopher_kelty,viral_spiral.david_bollier}.en.a4.portrait.tex
-
-- evince the_wealth_of_networks.yochai_benkler.en.a4.portrait.pdf
-- evince two_bits.christopher_kelty.en.a4.portrait.pdf
-- evince viral_spiral.david_bollier.en.a4.portrait.pdf
diff --git a/org/config_nix.org b/org/config_nix.org
index 1953533..9c68f88 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -6,7 +6,7 @@
#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
#+COPYRIGHT: Copyright (C) 2015 - 2023 Ralph Amissah
#+LANGUAGE: en
-#+STARTUP: content hideblocks hidestars noindent entitiespretty
+#+STARTUP: show4levels hideblocks hidestars noindent entitiespretty
#+PROPERTY: header-args :exports code
#+PROPERTY: header-args+ :noweb yes
#+PROPERTY: header-args+ :results no
@@ -35,45 +35,23 @@
#+HEADER: :tangle ../.envrc
#+BEGIN_SRC sh
-use flake .
-#use flake .#default
NIX_ENFORCE_PURITY=1
+# - https://github.com/nix-community/nix-direnv
NixDirEnvVersion="2.2.1"
+NixDirEnvSHA="sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
+#NixDirEnvSHAget="sha256-0000000000000000000000000000000000000000000="
if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then
-# - https://github.com/nix-community/nix-direnv
-# source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000="
- source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
+ source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}"
fi
watch_file flake.lock
watch_file flake.nix
-if [ -f .envrc-local ]; then
- source_env_if_exists .envrc-local || source .envrc-local
-fi
+watch_file makefile
+#if [ -f .envrc-local ]; then
+# source_env_if_exists .envrc-local || source .envrc-local
+#fi
PATH_add result/bin
-#nix flake update && nix flake check --show-trace && nix flake show
-# echo "
-#
-# - nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
-#
-# - nix build .#default --print-build-logs
-# - nix build .#spine-dmd --print-build-logs
-# - nix build .#spine-ldc --print-build-logs
-# - nix build .#spine-gdc --print-build-logs
-#
-# - nix develop
-# - nix develop .#devShell --print-build-logs
-# - nix develop .#devShell-html --print-build-logs
-# - nix develop .#devShell-epub --print-build-logs
-# - nix develop .#devShell-latex-pdf --print-build-logs
-# - nix develop .#devShell-sqlite --print-build-logs
-# - nix develop .#devShell-i18n --print-build-logs
-#
-# nix run .#default --print-build-logs
-#
-# nix develop --build .#default --print-build-logs
-#
-# nix-shell '<nixpkgs>' -A nix --pure
-# "
+use flake .
+#use flake .#default
#+END_SRC
**** .envrc-local CHECK MODIFY
@@ -103,8 +81,7 @@ export SpineSQLdb='spine.search.db'
#+END_SRC
*** flake :flake:
-**** flake
-***** flake.nix
+**** flake.nix
#+HEADER: :tangle ../flake.nix
#+HEADER: :noweb yes
@@ -150,7 +127,7 @@ export SpineSQLdb='spine.search.db'
inherit shell;
inherit devEnv;
buildInputs = [ sqlite ];
- nativeBuildInputs = [ dub dmd ldc gdc gnumake ]; # [ dub dmd ]; [ dub ldc ]; [ dub gdc ];
+ nativeBuildInputs = [ dub ldc gnumake ]; # [ dub dmd ]; [ dub ldc ]; [ dub gdc ];
buildPhase = ''
runHook preBuild
for DC_ in dmd ldmd2 ldc2 gdc gdmd; do
@@ -205,25 +182,25 @@ export SpineSQLdb='spine.search.db'
inherit installPhase;
inherit postInstall;
};
- spine-gdc = stdenv.mkDerivation {
- inherit pname;
- inherit version;
- meta.mainProgram = "spine-gdc";
- executable = true;
- src = self;
- inherit shell;
- inherit devEnv;
- buildInputs = [ sqlite ];
- nativeBuildInputs = [ dub gdc gnumake ];
- buildPhase = ''
- runHook preBuild
- dub build --compiler=$(type -P gdc) --build=gdc --combined --skip-registry=all
- runHook postBuild
- '';
- inherit checkPhase;
- inherit installPhase;
- inherit postInstall;
- };
+ #spine-gdc = stdenv.mkDerivation {
+ # inherit pname;
+ # inherit version;
+ # meta.mainProgram = "spine-gdc";
+ # executable = true;
+ # src = self;
+ # inherit shell;
+ # inherit devEnv;
+ # buildInputs = [ sqlite ];
+ # nativeBuildInputs = [ dub gdc gnumake ];
+ # buildPhase = ''
+ # runHook preBuild
+ # dub build --compiler=$(type -P gdc) --build=gdc --combined --skip-registry=all
+ # runHook postBuild
+ # '';
+ # inherit checkPhase;
+ # inherit installPhase;
+ # inherit postInstall;
+ #};
#vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
});
apps = forAllSystems (system: {
@@ -266,24 +243,24 @@ export SpineSQLdb='spine.search.db'
#export spineSqlite="spine --very-verbose --sqlite-update --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\" --output=\"\$SpineOUT\" $SpinePOD/*"
'';
in with pkgs; {
- devShell = mkShell rec {
- name = "spine dev shell default";
+ devShell = mkShell {
+ name = "spine base dev shell";
inherit shell;
inherit devEnv;
#buildInputs = [ sqlite ];
#nativeBuildInputs = [ dub dmd ldc gdc gnumake ];
packages = [
sqlite
- dub dmd ldc gdc gnumake
+ dub dmd ldc gnumake
];
inherit shellHook;
};
- devShell-epub = mkShell rec {
- name = "spine dev shell for epub output";
+ devShell-epub = mkShell {
+ name = "spine dev shell for epub output";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
libxml2
html-tidy
@@ -302,22 +279,22 @@ export SpineSQLdb='spine.search.db'
];
inherit shellHook;
};
- devShell-html = mkShell rec {
- name = "spine dev shell for latex & pdf output";
+ devShell-html = mkShell {
+ name = "spine dev shell for latex & pdf output";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
];
inherit shellHook;
};
- devShell-latex-pdf = mkShell rec {
- name = "spine dev shell for latex & pdf output";
+ devShell-latex-pdf = mkShell {
+ name = "spine dev shell for latex & pdf output";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
source-sans-pro
source-serif-pro
@@ -326,26 +303,28 @@ export SpineSQLdb='spine.search.db'
];
inherit shellHook;
};
- devShell-sqlite = mkShell rec {
- name = "spine dev shell for latex & pdf output";
+ devShell-sqlite = mkShell {
+ name = "spine dev shell for latex & pdf output";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
];
inherit shellHook;
};
devShell-i18n = mkShell {
+ name = "spine dev shell internationalization, po4a";
inherit shell;
inherit devEnv;
- packages = [
- dub dmd ldc gdc gnumake
+ packages = [
+ dub dmd ldc gnumake
sqlite
perl534Packages.Po4a
];
inherit shellHook;
};
+ default = import ./shell.nix { inherit pkgs; };
});
};
}
@@ -566,74 +545,6 @@ src = fetchTarball {
};
#+END_SRC
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-{
- description = "a sisu like parser & document generator";
- inputs = {
- flake-utils.url = "github:numtide/flake-utils";
- nixpkgs.url = "<<nixpkgs_url>>";
- };
- outputs = { self, nixpkgs, flake-utils }:
- let
- pkgs = nixpkgs.legacyPackages.x86_64-linux;
- in {
- packages.x86_64-linux.spine = pkgs.stdenv.mkDerivation {
- name = "spine";
- inherit self;
- src = self;
- shell = ./shell.nix;
- installPhase = ''
- install -m755 spine $out/bin/spine
- '';
- };
- defaultPackage.x86_64-linux = self.packages.x86_64-linux.spine;
- };
-}
-#+END_SRC
-
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-{
- description = "a sisu like document parser";
- inputs = {
- flake-utils.url = "github:numtide/flake-utils";
- nixpkgs.url = "<<nixpkgs_url>>";
- d2sqlite3 = {
- url = "github:dlang-community/d2sqlite3";
- flake = false;
- };
- tinyendian = {
- url = "github:kiith-sa/tinyendian";
- flake = false;
- };
- dyaml = {
- url = "github:dlang-community/D-YAML";
- flake = false;
- };
- imageformats = {
- url = "github:lgvz/imageformats";
- flake = false;
- };
- };
- outputs = { self, d2sqlite3, tinyendian, dyaml, imageformats, nixpkgs, flake-utils }:
- let
- pkgs = nixpkgs.legacyPackages.x86_64-linux;
- in {
- packages.x86_64-linux.spine = pkgs.stdenv.mkDerivation {
- name = "spine";
- inherit self;
- src = self;
- shell = ./shell.nix;
- installPhase = ''
- install -m755 spine $out/bin/spine
- '';
- };
- defaultPackage.x86_64-linux = self.packages.x86_64-linux.spine;
- };
-}
-#+END_SRC
-
*** shell.nix :shell:
**** tangle
@@ -646,34 +557,39 @@ src = fetchTarball {
with pkgs;
mkShell {
buildInputs = [
+ # ❯❯❯ nix_related
#nix
direnv
+ #cachix
nixVersions.unstable #nixFlakes
nix-prefetch-git
validatePkgConfig
- nix-tree jq nix-output-monitor
+ nix-output-monitor
+ nix-tree
+ jq
git
gnumake
ps
- ### d_build_related
+ # ❯❯❯ d_build_related
+ # ❯❯ package manager
dub
- ## compiler
+ # ❯❯ compiler
ldc
- rund
- ## linker
+ #rund
+ # ❯❯ linker
#lld
#mold
- ## builder
+ # ❯❯ builder
#ninja
#meson
- ### sqlite search related
+ # ❯❯❯ sqlite search related
sqlite
- ### pdf_latex_related
+ # ❯❯❯ pdf_latex_related
# source-sans-pro
# source-serif-pro
# source-code-pro
# texlive.combined.scheme-full
- ### xml_and_epub_related
+ # ❯❯❯ xml_and_epub_related
# libxml2
# html-tidy
# xmlstarlet
@@ -683,68 +599,33 @@ mkShell {
# sigil
# calibre #(suite includes: ebook-viewer)
# foliate
- ### i18n translation related
+ # ❯❯❯ i18n translation related
# perl534Packages.Po4a
];
shellHook = ''
- #if [[ -f ".envrc" ]]; then
- # source .envrc
- #fi
nix flake update
- echo ""
- echo "nix flake metadata:"
- nix flake metadata
- echo ""
- echo "nix flake check:"
nix flake check
- echo ""
- echo "nix flake show:"
nix flake show
- echo "
- nix flake update
- nix flake metadata
- nix flake check
- nix flake show
-
- nix build or nix develop? (suggestions):
-
- - nix build
- nix build .#default --print-build-logs
- nix build --print-build-logs
- nix build .#default --print-build-logs |& nom
-
- - nix run
- nix run .#default --print-build-logs
- nix run default.nix --print-build-logs
-
- - nix shell
- nix shell --print-build-logs --command spine -v
-
- - nix develop
- nix develop --build .#default --print-build-logs
- nix develop --build -f derivation.nix -I .envrc --print-build-logs
- nix develop ; eval \$buildPhase
+ echo '
+ shell.nix echo ❯❯
- nix-build |& nom
+ ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
- spine -v
+ ❯❯ nix develop
+ ❯❯ nix develop -c zsh
- nix-instantiate | nix show-derivation | jq
- nix-build . --no-out-link | xargs -o nix-tree
- nix-tree --derivation .#default
-
- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
- nix build .#default --print-build-logs
-
- - nix build .#spine-dmd --print-build-logs
- - nix build .#spine-ldc --print-build-logs
- - nix build .#spine-gdc --print-build-logs
- "
- #echo "ldc `${pkgs.ldc}/bin/ldc2 -v`"
+ ❯❯ nix build
+ ❯❯ nix build ".#default" --print-build-logs
+ ❯❯ nix build ".#spine-dmd" --print-build-logs |& nom
+ ❯❯ nix build ".#spine-ldc" --print-build-logs |& nom
+ ❯❯ nix build ".#spine-gdc" --print-build-logs |& nom
+ '
'';
}
#+END_SRC
+echo "ldc `${pkgs.ldc}/bin/ldc2 -v`"
+
**** Notes
#+BEGIN_SRC text
@@ -867,100 +748,6 @@ mkShell {
./result/bin/spine
#+END_SRC
-**** shell parts (packages)
-***** packages nix related
-
-#+NAME: shell_packages_nix_related
-#+BEGIN_SRC nix
-### nix_related
-direnv
-nixVersions.unstable #nixFlakes
-nix-prefetch-git
-validatePkgConfig
-jq
-git
-ps
-#+END_SRC
-
-***** packages d build related
-
-#+NAME: shell_packages_d_build_related
-#+BEGIN_SRC nix
-### d_build_related
-## package manager
-dub
-## compiler
-ldc
-rund
-## linker
-#lld
-#mold
-## builder
-#ninja
-#meson
-#+END_SRC
-
-***** packages tools
-
-#+NAME: shell_packages_tool_download
-#+BEGIN_SRC nix
-### tools
-#curl
-#wget
-aria
-#+END_SRC
-
-***** packages candy
-
-#+NAME: shell_packages_candy
-#+BEGIN_SRC nix
-### candy
-starship
-#+END_SRC
-
-***** packages search sqlite related
-
-#+NAME: shell_packages_search_related_sqlite
-#+BEGIN_SRC nix
-### sqlite search related
-sqlite
-#+END_SRC
-
-***** packages pdf latex related
-
-#+NAME: shell_packages_pdf_latex_related
-#+BEGIN_SRC nix
-### pdf_latex_related
-source-sans-pro
-source-serif-pro
-source-code-pro
-texlive.combined.scheme-full
-#+END_SRC
-
-***** packages xml epub related
-
-#+NAME: shell_packages_xml_and_epub_related
-#+BEGIN_SRC nix
-### xml_and_epub_related
-libxml2
-html-tidy
-xmlstarlet
-epubcheck
-ebook_tools
-epr
-sigil
-calibre #(suite includes: ebook-viewer)
-foliate
-#+END_SRC
-
-***** packages i18n_translation related
-
-#+NAME: shell_packages_i18n_translation
-#+BEGIN_SRC nix
-### i18n translation related
-perl534Packages.Po4a
-#+END_SRC
-
*** default.nix :default:
- default.nix -I nixpkgs=<provide local nix path>
@@ -1000,60 +787,38 @@ nix profile install .
#+HEADER: :tangle ../devenv.nix
#+HEADER: :tangle-mode (identity #o644)
-#+HEADER: :noweb yes
#+BEGIN_SRC nix
-# profile.nix
-{ pkgs ? import <nixpkgs> { }, name ? "user-env" }: with pkgs;
+{ pkgs ? import <nixpkgs> { }, name ? "user-env" }:
+with pkgs;
buildEnv {
inherit name;
- extraOutputsToInstall = [ "out" "man" "lib" ]; # to get all needed symlinks
+ extraOutputsToInstall = [ "out" "man" "lib" ]; # to get all needed symlinks
paths = [
+ # ❯❯❯ nix_related
#nix # if not on NixOS, this is needed
direnv
+ #cachix
nixVersions.unstable #nixFlakes
nix-prefetch-git
validatePkgConfig
- nix-tree jq nix-output-monitor
+ nix-output-monitor
+ nix-tree
+ jq
git
+ gnumake
ps
- ### d_build_related
+ # ❯❯❯ d_build_related
+ # ❯❯ package manager
dub
- ## compiler
+ # ❯❯ compiler
dmd
ldc
- #gdc
- #rund
- ## linker
- #lld
- #mold
- ## builder
- #ninja
- #meson
- ### sqlite search related
+ # ❯❯❯ sqlite search related
sqlite
- # ### pdf_latex_related
- # source-sans-pro
- # source-serif-pro
- # source-code-pro
- # texlive.combined.scheme-full
- # ### xml_and_epub_related
- # libxml2
- # html-tidy
- # xmlstarlet
- # epubcheck
- # ebook_tools
- # epr
- # sigil
- # calibre #(suite includes: ebook-viewer)
- # foliate
- # ### i18n translation related
- # perl534Packages.Po4a
- ### candy
- #starship
# this will create a script that will rebuild and upgrade your setup; using shell script syntax
(writeScriptBin "nix-rebuild" ''
#!${stdenv.shell}
- cd <path-to-flake> || exit 1
+ #cd <path-to-flake> || exit 1
nix flake update
nix profile upgrade '.*'
'')
@@ -1293,6 +1058,8 @@ ldc
sqlite
nix-prefetch-git
validatePkgConfig
+nix-output-monitor
+nix-tree
jq
git
#+END_SRC
@@ -1434,6 +1201,8 @@ pkgs.mkShell {
nixVersions.unstable #nixFlakes
nix-prefetch-git
validatePkgConfig
+ nix-output-monitor
+ nix-tree
jq
git
fontconfig
diff --git a/shell.nix b/shell.nix
index c7eb24c..98902e2 100755
--- a/shell.nix
+++ b/shell.nix
@@ -4,34 +4,39 @@
with pkgs;
mkShell {
buildInputs = [
+ # ❯❯❯ nix_related
#nix
direnv
+ #cachix
nixVersions.unstable #nixFlakes
nix-prefetch-git
validatePkgConfig
- nix-tree jq nix-output-monitor
+ nix-output-monitor
+ nix-tree
+ jq
git
gnumake
ps
- ### d_build_related
+ # ❯❯❯ d_build_related
+ # ❯❯ package manager
dub
- ## compiler
+ # ❯❯ compiler
ldc
- rund
- ## linker
+ #rund
+ # ❯❯ linker
#lld
#mold
- ## builder
+ # ❯❯ builder
#ninja
#meson
- ### sqlite search related
+ # ❯❯❯ sqlite search related
sqlite
- ### pdf_latex_related
+ # ❯❯❯ pdf_latex_related
# source-sans-pro
# source-serif-pro
# source-code-pro
# texlive.combined.scheme-full
- ### xml_and_epub_related
+ # ❯❯❯ xml_and_epub_related
# libxml2
# html-tidy
# xmlstarlet
@@ -41,63 +46,26 @@ mkShell {
# sigil
# calibre #(suite includes: ebook-viewer)
# foliate
- ### i18n translation related
+ # ❯❯❯ i18n translation related
# perl534Packages.Po4a
];
shellHook = ''
- #if [[ -f ".envrc" ]]; then
- # source .envrc
- #fi
nix flake update
- echo ""
- echo "nix flake metadata:"
- nix flake metadata
- echo ""
- echo "nix flake check:"
nix flake check
- echo ""
- echo "nix flake show:"
nix flake show
- echo "
- nix flake update
- nix flake metadata
- nix flake check
- nix flake show
+ echo '
+ shell.nix echo ❯❯
- nix build or nix develop? (suggestions):
+ ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
- - nix build
- nix build .#default --print-build-logs
- nix build --print-build-logs
- nix build .#default --print-build-logs |& nom
+ ❯❯ nix develop
+ ❯❯ nix develop -c zsh
- - nix run
- nix run .#default --print-build-logs
- nix run default.nix --print-build-logs
-
- - nix shell
- nix shell --print-build-logs --command spine -v
-
- - nix develop
- nix develop --build .#default --print-build-logs
- nix develop --build -f derivation.nix -I .envrc --print-build-logs
- nix develop ; eval \$buildPhase
-
- nix-build |& nom
-
- spine -v
-
- nix-instantiate | nix show-derivation | jq
- nix-build . --no-out-link | xargs -o nix-tree
- nix-tree --derivation .#default
-
- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
- nix build .#default --print-build-logs
-
- - nix build .#spine-dmd --print-build-logs
- - nix build .#spine-ldc --print-build-logs
- - nix build .#spine-gdc --print-build-logs
- "
- #echo "ldc `${pkgs.ldc}/bin/ldc2 -v`"
+ ❯❯ nix build
+ ❯❯ nix build ".#default" --print-build-logs
+ ❯❯ nix build ".#spine-dmd" --print-build-logs |& nom
+ ❯❯ nix build ".#spine-ldc" --print-build-logs |& nom
+ ❯❯ nix build ".#spine-gdc" --print-build-logs |& nom
+ '
'';
}
diff --git a/test.nix b/test.nix
deleted file mode 100644
index bd1e469..0000000
--- a/test.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-# This file was generated by https://github.com/lionello/dub2nix v0.3.0
-
-{ pkgs ? import <nixpkgs> {} }:
-with import ./mkDub.nix { inherit pkgs; };
-
-mkDubDerivation {
- src = ./.;
- # version = "0.0.1";
- # buildInputs = [ add any runtime deps here ];
-}