Giter Site home page Giter Site logo

web2pdf's Introduction

web2pdf

Convert webpages to PDFs for offline reading.

Installation

First, install PhantomJS.

Second, clone this repository:

$ git clone https://github.com/morninj/web2pdf.git

Third, add web2pdf to your path:

$ cp screenshot.js /usr/local/bin/
$ cp web2pdf.py /usr/local/bin/web2pdf
$ chmod +x /usr/local/bin/web2pdf

Use

Archive a Single URL

$ web2pdf -u http://www.nytimes.com/

This will save the page as archive.pdf. You can change the default filename:

$ web2pdf -u http://www.nytimes.com/ -o nytimes.pdf

Archive Multiple URLs

Create a file named input.txt (or anything else) with one URL per line, like this:

http://www.nytimes.com/
http://news.ycombinator.com/
http://www.reddit.com/

Then, run:

$ web2pdf -f input.txt

This will save each page in a new folder named archives. You can also change the name of the folder:

$ web2pdf.py -f input.txt -d my_folder

web2pdf's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.