a simple CLI tool to quickly download books from Library Genesis (libgen)
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.
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/
tqdm
for download progress bar (pip install tqdm
)If you want the functionality these provide in libby
, you have to install them yourself.
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
libby
filters out all filetypes except ePUBs and PDFs.libby
creates $HOME/books
(lowercase 'b') if it does not already exist and saves all downloads there. This can be changed by addingexport LIBBY_DIR="/foo/bar"
to your shell profile (.zshenv
, .zprofile
, or .bash_profile
).
libby
opens the downloaded file with xdg-open
. This command can be changed by addingexport LIBBY_VIEWER="foobar"
to your shell profile (.zshenv
, .zprofile
, or .bash_profile
).
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.