diff --git a/.gitignore b/.gitignore index 1756b52..55f125a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /build/ /.direnv/ .DS_Store +/latex.out/ 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..e5b9845 100644 --- a/justfile +++ b/justfile @@ -19,3 +19,33 @@ 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 + +codio: build log + cp -r build/* ../