Skip to content

goodlibs/goodlibs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

goodlibs

build Latest Version Supported Python Versions Code Style: Black

Download books from a Goodreads shelf using Library Genesis.

๐Ÿ“š Background

Goodreads is a social cataloging website that allows you to search for books and save them to reading lists, known as "shelves".

Library Genesis (Libgen) is a file-sharing website for scholarly journal articles, academic and general-interest books, images, comics, and magazines.

goodlibs is a simple utility that searches for and downloads all items from a Goodreads shelf using Libgen. It was built using betterreads and a modified fork of libgen.py.

In solidarity with Library Genesis. In memory of Aaron Swartz.

๐Ÿ› ๏ธ Installation

Install using pip:

pip3 install goodlibs

Goodreads setup

  1. Register for a Goodreads API key in order to access your list of books.
  2. Ensure your Goodreads account privacy settings allow for access to your shelves via the API.
    • Set Who can view my profile: to anyone (including search engines)
    • Check the box Allow partners of Goodreads to display my reviews

๐Ÿ’ป Usage

๐Ÿ’ฒ From the command line

For basic usage, start with the download command:

goodlibs download --help

If you want to save your options for later, use the configure command:

goodlibs configure --help

Typical usage:

goodlibs download -k yourgoodreadsapikey -u yourgoodreadsusername -e mobi -e epub -e pdf

๐Ÿ“ƒ From a script

from goodlibs import goodreads, libgen

# Get the list of books from Goodreads.
books = goodreads.get_books(api_key="yourgoodreadsapikey",
                            username="yourgoodreadsusername",
                            shelf_name="to-read")              # Optional.

# Query Libgen with the list of books.
libgen.download_books(books=books,
                      language="English",                      # Optional.
                      extensions=("mobi", "epub", "pdf"))      # Optional.

โš–๏ธ License

This code is licensed under the GNU General Public License v3.0. For more details, please take a look at the LICENSE file.

๐Ÿค Contributing

Contributions are welcome! Please feel free to open an issue or submit a pull request.