aboutsummaryrefslogtreecommitdiff
path: root/make
blob: e4ced2b6ac13350f1357cffd7c87e99177ebe660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

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"
cd ..
mkdir graph
cd graph
python3 ../data.py depwid || python ../data.py depwid
python3 ../data.py nei || python ../data.py nei
cd ..
mkdir outputs
cd document
cp ../format.orig.tex ../format.tex
pdftex report.tex || echo "You must install \`pdftex\` (MacTeX, TeXLive, MikTeX, etc)"
mv pageno.tex ..
mv report.pdf ../outputs/report-double.pdf
sed ../format.orig.tex -e 's/\\baselineskip=24pt/\\baselineskip=14pt/g' >../format.tex
pdftex report.tex
mv report.pdf ../outputs/report-single.pdf
cd ..
pdftex pics.tex
mv pics.pdf outputs/pics.pdf
export pageno=$(cat pageno)
pdftk outputs/report-double.pdf cat $pageno-$(eval $pageno+5) output outputs/graphs-tables.pdf
rm *.log
rm document/report.log
cp assets/* outputs/
cd $orig
rm format.tex pageno.tex document/pageno.tex
}

create 2>/dev/null