From e581bd2ab44ea97f432adf5d9f121153d4e3286e Mon Sep 17 00:00:00 2001 From: Sheppy Date: Thu, 5 Nov 2015 17:25:36 +0100 Subject: [PATCH] added file to download and build AstroSkript from svg files on website --- Scripts/buildAstroPDF | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 Scripts/buildAstroPDF diff --git a/Scripts/buildAstroPDF b/Scripts/buildAstroPDF new file mode 100755 index 0000000..22c6afc --- /dev/null +++ b/Scripts/buildAstroPDF @@ -0,0 +1,28 @@ +#!/bin/bash +echo "Stept 1/4 Downloading" +for i in {1..9}; + do + wget -nv "http://hydrus.sternwarte.uni-erlangen.de/~wilms/teach/intro1516/page000${i}.svg" + done +for i in {10..99}; + do + wget -nv "http://hydrus.sternwarte.uni-erlangen.de/~wilms/teach/intro1516/page00${i}.svg" + done +for i in {100..219}; + do + wget -nv "http://hydrus.sternwarte.uni-erlangen.de/~wilms/teach/intro1516/page0${i}.svg" + done + +echo "Step 2/4 : Converting.." +for file in $PWD/*.svg; + do + inkscape "$file" -d 1200 -A "${file%.svg}.pdf" + done + +echo "Step 3/4 : Merging PDFs.." +pdfunite *.pdf AstroFull.pdf +echo "Step 4/4 : Compressing..." +gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dBATCH -dQUIET -sOutputFile=output.pdf input.pdf +rm page*.pdf +rm AstroFull.pdf +echo "Done!"