packt-ebook-downloader v1.0.0
packt-ebook-downloader
An easy way to download ebooks from your Packt account.
Based on the humblebundle-ebook-downloader tool.
Installation
To run the tool, you can either install NodeJS and use npm to install it, or install Docker and run it as a docker container.
NPM
To install it via npm, run:
$ npm install -g packt-ebook-downloader
You can now use the tool by running the packt-ebook-downloader
command.
Docker
To run the tool via Docker, run:
docker run -v $(PWD)/download:/download --rm -it packt-ebook-downloader -d /download --access-token "access_token_here" --refresh-token "refresh_token_here"
This will download the books to the download
folder in your current work directory.
Note that when using Docker the option to interactively log in isn't available, therefore you need to get your access and refresh tokens from the relevant cookies in your browser (access_token_live/refresh_token_live) after logging in to the Packt website.
When using the tool installed via npm, it will launch a browser and let you log in interactively instead.
Usage
$ packt-ebook-downloader --help
Usage: packt-ebook-downloader [options]
Options:
-V, --version output the version number
-d, --download-folder <download_folder> Download folder (default: "download")
-l, --download-limit <download_limit> Parallel download limit (default: 1)
-f, --format <format> What format to download the ebook in (all, epub, mobi, pdf) (default: "epub")
-a, --access-token <access_token> Optional: If you want to run headless, you can specify your access and refresh tokens from your browser
(access_token_live)
-r, --refresh-token <refresh_token>
(refresh_token_live)
--debug Enable debug logging
-h, --help output usage information
Contributors
Thanks to the contributors from the original humblebundle-ebook-downloader project.
- David Marby (original author)
- J. Longman
- Johannes Löthberg
- jaycuse
License
See LICENSE.md