Skip to main content

A command-line utility for extracting and packaging web content for offline reading.

Project description

PyPI Tests

A CLI utility for extracting readable content from web pages. Converts web articles to clean HTML or plain text using mozilla/readability. Extracted content can be packaged into EPUB or printed to stdout.

Includes Send to Kindle integration via the stkclient, allowing sending created EPUB articles directly to your Kindle device for offline reading.

Installation

Install using uv or pip:

uv tool install readerlet
pip install readerlet

Note that this utility requires Node.js.

For convenience, the nodejs-bin package containing node binary & npm can be installed optionally as an extra dependency:

uv tool install 'readerlet[node]'
pip install 'readerlet[node]'

Usage

For help, run:

readerlet --help

The readerlet send packages web content as EPUB file and sends it to your Kindle. You must first authorize the application with readerlet kindle-login. This feature stores credentials locally.

readerlet kindle-login
readerlet send <url>

To send local file instead:

readerlet send <path/to/local/file>

The extract command extracts content from URL and outputs an EPUB file to specified directory if used with -e flag:

readerlet extract <url> -e <output-dir>
readerlet extract https://example.com -e .

To print the extracted content to stdout as html or just text:

readerlet extract <url> -o html
readerlet extract <url> -o text

Both extract and send commands accept -i and -h flags that remove image-related elements and hyperlinks from content.

Remove hyperlinks:

readerlet extract <url> -h
readerlet send <url> -h

Remove images and hyperlinks:

readerlet extract <url> -i -h -o html
readerlet send <url> -i -h

Development

First checkout the code. Then create a new virtual environment:

cd readerlet
python -m venv venv
source venv/bin/activate

Install the dependencies and dev/test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

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

readerlet-0.2.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

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

readerlet-0.2.1-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file readerlet-0.2.1.tar.gz.

File metadata

  • Download URL: readerlet-0.2.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for readerlet-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a83b4db765de3d77820f69418ed699cabe4d9e9837aabc5c1e28b129b0e42947
MD5 a9bcbe299ac5cc60d6beb4d40312edeb
BLAKE2b-256 eeef1490f8e76374d62a0f9d8df409072d4288bf1d2600d6b25b031f14ba35af

See more details on using hashes here.

File details

Details for the file readerlet-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: readerlet-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for readerlet-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f21ecac6d12477e3ffec891404bd4b24cb4410ba032e9457a792b08ac7e20c3f
MD5 12e22536c85250c077173149e83dca60
BLAKE2b-256 e5caeaabf78d93e2331fe58fa852ee2d7d1351c9d6f48bdc6af33d970b929c39

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