A bash script that uses wkhtmltopdf to generate PDFs for a list of websites specified in a site-list.txt file. Its primary purpose is to quickly create a batch dummy PDFs for testing.
Note: This tool is very bare bones, and has a lot of room for improvement. I most likely won't update it, so feel free to steal it and improve it.
Mac / OS X: To install on a mac, simply do: brew cask install wkhtmltopdf
Linux: To install on a debian-based machine, do: sudo apt install wkhtmltopdf
- Download site_to_pdf.sh
- Run
chmod +x site_to_pdf.sh
- Run
./site_to_pdf.sh
The tool will loop through all of the websites listed in site-list.txt. If there is no site-list.txt, the program will create one containing example.com
and generate a PDF for it.
- Right now it doesn't handle subdomains very well. For example,
en.wikipedia.org
will generate a file calleden.pdf
instead ofwikipedia.pdf
- It doesn't handle long paths very well either. For example,
example.com/edit/admin
would createexample-edit.pdf
, andexample.com/edit/user
would also createexample-edit.pdf
, resulting in one overwriting the other.