More cleanup
This commit is contained in:
parent
21250cf83d
commit
a56ebe0498
13
README.md
13
README.md
|
@ -34,19 +34,6 @@ docker cp security-engineering-ebook:/security-engineering-ebook/security-engine
|
|||
|
||||
Once the script finishes running, check the `security-engineering-3rd-edition.pdf` file.
|
||||
|
||||
### More Options?
|
||||
|
||||
You can run with the following 2 options:
|
||||
|
||||
`--generate-metadata`
|
||||
|
||||
To generate the meta.txt file which contains the list of bookmarks to be inserted. This is required if you make changes to the file lists.
|
||||
This also requires `qpdf` to be installed.
|
||||
|
||||
`--download-cover-image`
|
||||
|
||||
Download the cover image. The repo already has [a `cover.pdf` file which](https://www.cl.cam.ac.uk/~rja14/Papers/SEv3-cover.pdf) is used by default. Do this if the cover URL changes. Requires `wget` to be installed.
|
||||
|
||||
## Support the Authors
|
||||
|
||||
Buy the second edition of the book from:
|
||||
|
|
19
generate.sh
19
generate.sh
|
@ -13,25 +13,10 @@ function assert_installed() {
|
|||
done
|
||||
}
|
||||
|
||||
assert_installed wget
|
||||
|
||||
if [[ $@ == *'--download-cover-image'* ]]; then
|
||||
echo "Downloading cover image"
|
||||
assert_installed convert
|
||||
wget --timeout=10 --timestamping "$COVER_URL" --output-document cover.pdf
|
||||
echo "Cover Image downloaded"
|
||||
fi
|
||||
|
||||
declare -a FILES_LIST
|
||||
|
||||
while IFS= read -r line
|
||||
do
|
||||
FILENAME=$(basename "$line")
|
||||
FILES_LIST+=("$FILENAME")
|
||||
done < "$INPUT_FILE"
|
||||
assert_installed wget pystitcher
|
||||
|
||||
echo "Starting PDF download"
|
||||
wget --timeout=10 --timestamping --input-file "urls.txt"
|
||||
echo "All PDFs downloaded"
|
||||
|
||||
pystitcher book.md
|
||||
pystitcher book.md "$FINAL_PDF"
|
||||
|
|
Loading…
Reference in New Issue