From a56ebe0498bcb8ad0e226f087980de75553c32f9 Mon Sep 17 00:00:00 2001 From: Nemo Date: Sat, 29 May 2021 02:14:21 +0530 Subject: [PATCH] More cleanup --- README.md | 13 ------------- generate.sh | 19 ++----------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 34dbc81..e52ad6f 100644 --- a/README.md +++ b/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: diff --git a/generate.sh b/generate.sh index 4dd4798..4a96ecc 100755 --- a/generate.sh +++ b/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"