From 84ac0c306db8ef90a29f0882d10a9fe7046e50c0 Mon Sep 17 00:00:00 2001 From: Ben Soroos Date: Sat, 16 Mar 2024 21:54:48 +0000 Subject: [PATCH] Further tooling: commit log generation & copy in codio --- .gitignore | 2 ++ flake.nix | 3 +++ justfile | 31 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/.gitignore b/.gitignore index 1756b52..90eb795 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /build/ /.direnv/ .DS_Store +/latex.out/ +built.tar.gz diff --git a/flake.nix b/flake.nix index 6b2428d..712dedc 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,9 @@ simple-http-server watchexec (python3.withPackages (ps: with ps; [jinja2])) + latexrun + texlive.combined.scheme-full + ansifilter ]; }; }); diff --git a/justfile b/justfile index b5d4dd8..6ebc347 100644 --- a/justfile +++ b/justfile @@ -19,3 +19,34 @@ serve: build watch: watchexec --restart -- just serve +log: + #!/usr/bin/env bash + set -exuo pipefail + { + cat < at %ai%n%b%n' -n 5 \ + | delta --light -w 110 --plus-style '"#339933" bold' --plus-emph-style '"#339933"' --minus-style 'red bold' --minus-emph-style 'red' --zero-style 'gray dim' --no-gitconfig --line-numbers --syntax-theme none \ + | ansifilter --latex -f \ + | sed -e '0,/(((RULE)))/s///' -e 's/(((RULE)))/\\hrule\n\\section*{}/g' + echo '\hrule' + echo '\end{document}' + } > build/commits.tex + latexrun -o build/commits.pdf build/commits.tex + rm build/commits.tex + +codio: build log + tar c build/ | gzip > built.tar.gz