• Stars
    star
    148
  • Rank 248,514 (Top 5 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 2 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a simple CLI tool to quickly download books from Library Genesis (libgen)

libby

libby is a simple CLI tool to quickly download books from Library Genesis.

This script was recently rewritten in Python, which (for whatever reason) made it significantly faster for me. This also helped iron out a few bugs regarding book titles.

As a consequence, much of the information below is out of date, but the script still works basically the same.

Demo

output

Installation

libby is available on the AUR as libby-git. If you have yay, you can install libby with:

yay -S libby-git

Or, to install it manually from this repo, run the following:

git clone https://github.com/carterprince/libby
sudo cp libby/libby /usr/bin/

Requirements

  • tqdm for download progress bar (pip install tqdm)

Optional

If you want the functionality these provide in libby, you have to install them yourself.

  • mutt/neomutt (optional)
  • rofi (optional)
  • calibre (optional)

Usage

Run libby with no arguments for help:

usage: libby [-h] [--mode MODE] [--mirror MIRROR] [--no-view] [--output-dir OUTPUT_DIR] [--viewer VIEWER] query [query ...]
libby: error: the following arguments are required: query

Things to consider

  • libby filters out all filetypes except ePUBs and PDFs.
  • By default, libby creates $HOME/books (lowercase 'b') if it does not already exist and saves all downloads there. This can be changed by adding
export LIBBY_OUTPUT_DIR="/foo/bar"

to your shell profile (.zprofile or .bash_profile).

  • By default, libby opens the downloaded file with xdg-open. This command can be changed by adding
export LIBBY_VIEWER="foobar"

to your shell profile (.zprofile or .bash_profile).

Why I made this

Because everything else was too slow, tried to do too much, or no longer worked. The whole point of having a cli is it's faster and more convenient than navigating to the download manually in your browser.