aboutsummaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-01-20 21:20:16 -0500
committerHolden Rohrer <hr@hrhr.dev>2020-01-20 21:21:01 -0500
commit1163971656fe0253ac56bbb2e060a2bc78d39d72 (patch)
treefc03ef8baa6eaf85ee90f3332d1f4b7410688da5 /make
parent9e9750705d3f003e30d405de6afcea136dd46344 (diff)
make now creates a qr code
Diffstat (limited to 'make')
-rwxr-xr-xmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/make b/make
index 3a7a5e3..2d61236 100755
--- a/make
+++ b/make
@@ -3,7 +3,6 @@
export orig="$(pwd)"
export dir="$(dirname $0)"
create(){
-cd $dir
mkdir imgs
cd imgs
python3 ../data.py img || python ../data.py img || echo "You must install python3"
@@ -30,8 +29,11 @@ pdftk outputs/report-double.pdf cat $(expr $(cat pageno.tex) + 1)-$(expr $(cat p
rm *.log
rm document/report.log
cp assets/* outputs/
-rm format.tex pageno.tex document/pageno.tex pageno2.tex document/pageno2.tex
-cd $orig
+qrencode https://hrhr.dev/r -o qr.png || echo "For QR code, install \`qrencode\`"
+magick qr.png -gravity south -background white -splice 0x10 -draw 'text 0,0 hrhr.dev/r' outputs/qr.png || echo 'Install imagemagick for qr code'
+rm format.tex pageno.tex document/pageno.tex pageno2.tex document/pageno2.tex qr.svg
}
+cd $dir
create 2>/dev/null
+cd $orig