Created
October 28, 2013 10:33
-
-
Save erthalion/7194648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $1 - name of file, that contains urls list | |
# $2 - name of output pdf file | |
url_list=$1 | |
output=$2 | |
set -- $(cat $url_list); count=0; | |
pdf_list="" | |
for arg; | |
do | |
(( ++count )); | |
echo "Download ${arg}" | |
wkhtmltopdf ${arg} ${count}.pdf; | |
pdf_list="$pdf_list ${count}.pdf" | |
done | |
echo "Merge $pdf_list into ${output}" | |
pdfunite $pdf_list $output | |
rm $pdf_list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment