-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconvert2pdf.sh
43 lines (28 loc) · 907 Bytes
/
convert2pdf.sh
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
38
39
40
41
42
43
#files=$(ls -1 htmls)
#files=$(ls -1 aux | sed -e 's/\.html$//')
num=110
files=$(ls -1 htmls/lab${num} | sed -e 's/\.html$//')
number=$(ls htmls/lab${num} | wc -l)
echo "there are ${number} html files"
for file in $files
do
echo "converting ${file}.html to ${file}.pdf"
wkhtmltopdf --dpi 1000 htmls/lab${num}/${file}.html pdfs/lab${num}/${file}.pdf
done
num=111
files=$(ls -1 htmls/lab${num} | sed -e 's/\.html$//')
number=$(ls htmls/lab${num} | wc -l)
echo "there are ${number} html files"
for file in $files
do
echo "converting ${file}.html to ${file}.pdf"
wkhtmltopdf --dpi 1000 htmls/lab${num}/${file}.html pdfs/lab102/${file}.pdf
done
files=$(ls -1 aux | sed -e 's/\.html$//')
num=$(ls htmls | wc -l)
echo "there are ${num} html files"
for file in $files
do
echo "converting ${file}.html to ${file}.pdf"
wkhtmltopdf --dpi 1000 htmls/lab102/${file}.html pdfs/lab102/${file}.pdf
done