Adding general overhauls, autobuild script and structuring

This commit is contained in:
🐙PiperYxzzy
2023-04-23 18:11:27 +02:00
parent 98138d0a21
commit 17665d538e
8 changed files with 545 additions and 237 deletions

22
build.sh Executable file
View File

@@ -0,0 +1,22 @@
#! /bin/bash
# Setup tmp folder
mkdir tmp
# Compile files & card items (incl. any args)
cp template/cards.tex tmp/cards.tex
go run main.go "$@" >> tmp/cards.tex
echo "\end{document}" >> tmp/cards.tex
# Compile!
pdflatex tmp/cards.tex
mv cards.pdf latest.pdf
if [ "$1" == "-snap" ]; then
cp tmp/cards.tex "snapshot/$(date +"%Y%m%d-%Hh%M").tex"
fi
rm cards.aux cards.log
rm tmp/*
rmdir tmp