Skip to main content

A small Python tool to download and send ebooks from Project Gutenberg to a Kindle email address via SMTP

Project description

Gutenberg2Kindle

A small Python tool to download and send ebooks from Project Gutenberg to a Kindle email address via SMTP

What's this?

gutenberg2kindle is a small command-line interface tool that aims to automatically download an .epub book from Project Gutenberg's library of free books in the public domain, and then send the ebook's file to a Kindle email address (although, generally, it can be sent to any email address), with just one command.

The book is sent through a SMTP server with TLS, requiring the user to configure the server settings beforehand via tool commands.

Installation

You can use your Python package manager (e.g. pip) to install gutenberg2kindle.

pip install gutenberg2kindle

Usage

gutenberg2kindle comes with a command-line interface; its help text can be accessed via:

gutenberg2kindle --help

You can check the tool's current configuration via:

# will print all config variables with their current values
gutenberg2kindle get-config

# will print only the value for the key you're specifying
gutenberg2kindle get-config --name <key name>

You can set a value for any of the settings via:

gutenberg2kindle set-config --name <key name> --value <key value>

Or you can do it all at once interactively, being able to check (and modify, if needed) the current config, just by running:

gutenberg2kindle interactive-config

Finally, once you're done configuring your project, you can send any ebook via its Project Gutenberg book ID (with flags -b or --book-id):

gutenberg2kindle send -b <book id as an integer, e.g. 1>

You can send multiple books at the same time in the same run, the -b / --book-id flag accepts multiple arguments. Book will be downloaded and sent one by one, and if the download fails at some point execution will stop. In case you want to skip books that couldn't be downloaded, consider adding the -i / --ignore-errors flag.

gutenberg2kindle send -b <first book id> [<second book id> <third book id>...]
gutenberg2kindle send -i -b <first book id> [<second book id> <third book id>...]

Note that, if using Gmail as your SMTP server, you might need to set up an App Password to use instead of your regular password.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Contributions for issues that are already open by maintainers are welcome and encouraged.

Please make sure to update tests as appropriate; a minimum coverage of 85% is expected (and enforced by Github Actions!).

License

This project is licensed under the GNU Affero General Public License v3.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gutenberg2kindle-0.8.0.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gutenberg2kindle-0.8.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file gutenberg2kindle-0.8.0.tar.gz.

File metadata

  • Download URL: gutenberg2kindle-0.8.0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gutenberg2kindle-0.8.0.tar.gz
Algorithm Hash digest
SHA256 6e8bea396f6866088c01cb7e034197bb5aab25d20d40b9c308f08d556ef15bf7
MD5 1952bc898d5afb08d17e89797bc9c9ef
BLAKE2b-256 dcf50ab165bf98fffa63f9914aa3345b6b36f5ca479ecb225d80b983b0ca5d0d

See more details on using hashes here.

File details

Details for the file gutenberg2kindle-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gutenberg2kindle-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4338bacf615a875e376307166c3a838dcac548273e141d2f4f68b36026f06f69
MD5 1c49e6c62aeb5233de617f762ce2691e
BLAKE2b-256 5f15a60f59499b4917fca136f15ee26cc4a4b44871a302def2f1b70b352959c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page