Skip to content

A command line tool that uses wkhtmltopdf to generate PDFs for a list of websites specified in a site-list.txt file.

Notifications You must be signed in to change notification settings

somnolentPumpkin/sitelist_to_pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Site List to PDF

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.

Install wkhtmltopdf

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

Install + Run

  1. Download site_to_pdf.sh
  2. Run chmod +x site_to_pdf.sh
  3. 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.

Known Issues

  • Right now it doesn't handle subdomains very well. For example, en.wikipedia.org will generate a file called en.pdf instead of wikipedia.pdf
  • It doesn't handle long paths very well either. For example, example.com/edit/admin would create example-edit.pdf, and example.com/edit/user would also create example-edit.pdf, resulting in one overwriting the other.

About

A command line tool that uses wkhtmltopdf to generate PDFs for a list of websites specified in a site-list.txt file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages