recipe-book/render.sh

33 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"
# these are so that later it can be edited through the web on gitea and automagically recompile without having to run anything on the webserver manually. MUST be commented out when modifying/running locally. I'm not gonna maintain two copies just for that automation, especially while I'm still actively creating stuff
#git fetch --all
#git reset --hard origin/master
printf "\n-_-_-_-_-_-_-_-_- Main -_-_-_-_-_-_-_-_-\n"
pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname=Recipes main.tex
pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname=Recipes main.tex
printf "\n-_-_-_-_-_-_-_-_- Booklet -_-_-_-_-_-_-_-_-\n"
# https://github.com/jenom/pdfbook2
pdfbook2 --no-crop --top-margin=5 --bottom-margin=5 --outer-margin=0 --inner-margin=0 --short-edge --paper=letterpaper Recipes.pdf
mv -v -t /home/david/fileshare/LaTeX/Recipes Recipes.pdf Recipes-book.pdf
#printf "\n-_-_-_-_-_-_-_-_- Meal Planner -_-_-_-_-_-_-_-_-\n"
#pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname="Meal Planner" meal-planner.tex
#pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname="Meal Planner" meal-planner.tex
#mv -v -t /home/david/fileshare/LaTeX/Recipes "Meal Planner.pdf"
printf "\n-_-_-_-_-_-_-_-_- Shopping List -_-_-_-_-_-_-_-_-\n"
pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname="Shopping List" shopping-list.tex
pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname="Shopping List" shopping-list.tex
mv -v -t /home/david/fileshare/LaTeX/Recipes "Shopping List.pdf"
rm *.aux *.out *.log *.toc *.fls *.fdb_latexmk
#printf "\n-_-_-_-_-_-_-_-_- FF -_-_-_-_-_-_-_-_-\n"
#cd "Dependance on Deities"
#lualatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname=FF main.tex
#lualatex -file-line-error -interaction nonstopmode -shell-escape -jobname=FF main.tex
#rm *.aux *.out *.log *.toc
#mv -v FF.pdf /home/david/fileshare/LaTeX/Recipes/.FF.pdf