How to download Google Books in linux

The pysheng script, developed in Python by Arnau Sanchez, can download Google Books in PDF (images) or PNG (one for each page).

Install pysheng in terminal:

  1. Confirm which is the current pysheng version:
    w3m -dump http://code.google.com/p/pysheng/downloads/list | grep pysheng- | grep .tgz | awk '{ print $2 }' | head -n 1
  2. Create a temporary directory and access it. You can delete it after installing. Inside it, use these commands (replace VERSION by the current value that you discovered above):
    wget http://pysheng.googlecode.com/files/pysheng-VERSION.tgz
    tar xvzf pysheng-VERSION.tgz
    cd pysheng-VERSION
    sudo python setup.py install
  3. Install Report Lab:
    apt-get install python-reportlab python-reportlab-accel python-renderpm
  4. To use the graphic interface (and download as PNG or PDF), use the pysheng-gui command. To download all pages as PNG, in terminal, type pysheng <book_id>.

If you get an ValueError: cannot find glade file: main.glade, do the following:

sudo mkdir /usr/share/pysheng
ln -s /usr/local/share/pysheng/main.glade /usr/share/pysheng/main.glade

Find book Id

The book Id can be found in the URL: http://books.google.com.br/books?id=Gn2cnP0ZFUIC&printsec=frontcover&hl=pt-BR&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false

Copyrights

Google has a specific autorizations from books' authors to publish integral or partial contents. If in your country downloading it and/or reproducing is crime, I recommend that you use this information just for educational purposes.