Skip to main content

Generate EPUB from Instapaper

Project description

Portable Wisdom

Build Status

Portable Wisdom is a command-line tool to generate an EPUB file from your unread articles in Instapaper. You can then copy this file to your ereader.

Preview of a Portable Wisdom-generated ebook on an ereader

Technologies

  • Python 3

Features

  • Retrieves unread articles from Instapaper
  • Finds and downloads articles' images from the web, downsizes them, converts them to greyscale, and embeds them into the file
  • Caches articles and images, runs fast for frequent users
  • Creates well-formatted EPUB files tailored for your ereader

Quick Start

  1. Download and install Portable Wisdom from PyPI:

     $ pip install portable-wisdom
    
  2. Request an Instapaper API key. (Or copy one from a friend.)

  3. Run Portable Wisdom from the command line:

     $ portable-wisdom --instapaper-key KEY \
     	--instapaper-secret SECRET \
     	--instapaper-login USER \
     	--instapaper-password PASS
    

On success, the script will print the output filename. To view all of the options, run $ portable-wisdom -h.

Transformers

Transformers are functions that modify the EPUB before writing the file to disk. There are many built-in transformers including:

  • beautify_hr — converts lines of asterisks to horizontal rules
  • remove_duplicative_blockquotes — removes magazine-style "pull quotes"
  • strip_emojis — replaces emojis with shortcodes
  • strip_links — removes a elements
  • embed_images — embeds remote web images

Compatibility

Portable Wisdom uses EbookLib to create EPUB files. These files are compatible with most ereaders—including Nook, Kobo, and Sony—as well as most ebook software. Kindle owners can use Pandoc or a similar tool to convert from EPUB to MOBI.

Styles

Portable Wisdom supports styles (--style) to create EPUB files optimized for your ereader's rendering engine. These styles are regular CSS files. They specify header sizes, image layout, quote formatting, etc. Use the default style or create your own.

Contributing

To report a bug or request a feaure, create an issue on GitHub. Developers are welcome and encouraged to submit pull requests, but contributors should strongly consider creating an issue and requesting comments before starting work.

Source

You can run Portable Wisdom from its source like so:

$ python3 -m portable_wisdom.wisdom

Guidelines

  • Comply with PEP 8 (use Flake8 to confirm, autopep8 can help)
  • Run and pass all tests
    • Create new tests or refine existing ones, if necessary

License

MIT License

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

portable_wisdom-0.2.2.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

portable_wisdom-0.2.2-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file portable_wisdom-0.2.2.tar.gz.

File metadata

  • Download URL: portable_wisdom-0.2.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for portable_wisdom-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7b829dc29eae6c7da309035e0e006d6c9834b171c2dc3aa2d96c07d7bcb0c08f
MD5 9a265bdb387a344d6b778b974a8aae0a
BLAKE2b-256 6610451fafd5663f5ee4a9a0aaaf08cb76b26e30a82bb81fe7e89c4eeb8f7ed1

See more details on using hashes here.

Provenance

File details

Details for the file portable_wisdom-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for portable_wisdom-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b94c943e68503a3c36041a420e3281cf89559795bd64363017e3477bed68e2ed
MD5 7e7abbecafdee3a09c9e212b2655f844
BLAKE2b-256 81998151c745131996d0d50b1ee98bdc1189bb04e39e02c8ffedce2b05d32836

See more details on using hashes here.

Provenance

Supported by

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