Created
August 18, 2015 16:53
-
-
Save infusion/cf1d0eed5f02c8c28dd4 to your computer and use it in GitHub Desktop.
Download a website as PDF
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
#!/bin/bash | |
function url2pdf { | |
tmp_file=.tmp.html | |
res_file=${1//[^A-Za-z0-9.:-]/}.pdf | |
curl $1 > $tmp_file | |
cupsfilter -f $tmp_file > $res_file | |
rm $tmp_file | |
} | |
# url2pdf http://www.xarg.org | |
url2pdf $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment