Adds title
This commit is contained in:
parent
bc8b4b4f2b
commit
d192c63a3c
16
generate.sh
16
generate.sh
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
COVER_URL=https://www.cl.cam.ac.uk/~rja14/Papers/SEv3-cover.jpg
|
COVER_URL=https://www.cl.cam.ac.uk/~rja14/Papers/SEv3-cover.jpg
|
||||||
|
|
||||||
wget --timestamping "$COVER_URL" --output-document cover.jpg
|
# wget --timestamping "$COVER_URL" --output-document cover.jpg
|
||||||
convert cover.jpg cover.pdf
|
# convert cover.jpg cover.pdf
|
||||||
|
|
||||||
wget --timestamping --input-file "urls.txt"
|
wget --timestamping --input-file "urls.txt"
|
||||||
|
|
||||||
|
@ -16,8 +16,17 @@ pdftk cover.pdf SEv3-pref-May16.pdf SEv3-ch1-dec18.pdf \
|
||||||
SEv3-ch18-dec18.pdf SEv3-ch19-dec18.pdf SEv3-ch26-dec18.pdf \
|
SEv3-ch18-dec18.pdf SEv3-ch19-dec18.pdf SEv3-ch26-dec18.pdf \
|
||||||
SEv3-bib-jan7.pdf cat output temp.pdf
|
SEv3-bib-jan7.pdf cat output temp.pdf
|
||||||
|
|
||||||
|
echo "InfoBegin" > meta.txt
|
||||||
|
echo "InfoKey: Title" >> meta.txt
|
||||||
|
echo "InfoValue: Security Engineering — Third Edition" >> meta.txt
|
||||||
|
|
||||||
|
echo "InfoBegin" >> meta.txt
|
||||||
|
echo "InfoKey: Author" >> meta.txt
|
||||||
|
echo "InfoValue: Ross Anderson" >> meta.txt
|
||||||
|
|
||||||
|
## We start from page 2 because first is cover and it is not included in urls.txt
|
||||||
PAGE_NUM=2
|
PAGE_NUM=2
|
||||||
echo "BookmarkBegin" > meta.txt
|
echo "BookmarkBegin" >> meta.txt
|
||||||
echo "BookmarkTitle: Cover" >> meta.txt
|
echo "BookmarkTitle: Cover" >> meta.txt
|
||||||
echo "BookmarkLevel: 1" >> meta.txt
|
echo "BookmarkLevel: 1" >> meta.txt
|
||||||
echo "BookmarkPageNumber: 1" >> meta.txt
|
echo "BookmarkPageNumber: 1" >> meta.txt
|
||||||
|
@ -33,7 +42,6 @@ do
|
||||||
echo "BookmarkLevel: 1" >> meta.txt
|
echo "BookmarkLevel: 1" >> meta.txt
|
||||||
echo "BookmarkPageNumber: $PAGE_NUM" >> meta.txt
|
echo "BookmarkPageNumber: $PAGE_NUM" >> meta.txt
|
||||||
PAGE_NUM=$((PAGE_NUM+PAGES))
|
PAGE_NUM=$((PAGE_NUM+PAGES))
|
||||||
echo "Current page is $PAGE_NUM"
|
|
||||||
done < "$input"
|
done < "$input"
|
||||||
|
|
||||||
pdftk temp.pdf update_info meta.txt output security-engineering-3rd-edition.pdf
|
pdftk temp.pdf update_info meta.txt output security-engineering-3rd-edition.pdf
|
||||||
|
|
Loading…
Reference in New Issue