Skip to main content

Portable Wisdom

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

Before you begin, you'll need to request an Instapaper API key or copy one from a friend.

Python

  1. Download and install Portable Wisdom from PyPI:

     $ pip install portable-wisdom
    
  2. Run Portable Wisdom from the command line:

     $ portable-wisdom \
     	--instapaper-api-key KEY \
     	--instapaper-api-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.

Docker

Alternatively, using Docker, to download and execute Portable Wisdom from Docker Hub, run:

$ docker pull jacobbudin/portable-wisdom:latest
$ docker run jacobbudin/portable-wisdom:latest \
	--instapaper-api-key KEY \
	--instapaper-api-secret SECRET \
	--instapaper-login USER \
	--instapaper-password PASS

Environment

Alternatively, you can supply the Instapaper credentials via environment variables: INSTAPAPER_API_KEY, INSTAPAPER_API_SECRET, INSTAPAPER_LOGIN, and INSTAPAPER_PASSWORD.

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

Metadata

Release files for portable-wisdom 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for portable-wisdom 1.0.1
File Size Uploaded
portable_wisdom-1.0.1.tar.gz 78.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for portable-wisdom 1.0.1
File Interpreter ABI Platform
portable_wisdom-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 92.6 kB

Release files / portable_wisdom-1.0.1.tar.gz

Download URL portable_wisdom-1.0.1.tar.gz
Size 78.3 kB
Tags Source
SHA-256 checksum
How to use checksums
13d65a219d88f3dbc304f61b8a80ea1259023baac5ced5e3c3ed2be266c77833
BLAKE2b-256 checksum
How to use checksums
41c30edd3242bae182a85441bb3a61c390fae29f510bb594644bae19bd276bec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.4

Release files / portable_wisdom-1.0.1-py3-none-any.whl

Download URL portable_wisdom-1.0.1-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1272f18d74ce0f2f0998a854708d00b8c13cd0dac368c3ba6df316a02637e613
BLAKE2b-256 checksum
How to use checksums
d6d16fe68a456d6c5b31377ea18291e44b3954d8f11ea06ac908ed610371ff77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0

1 release file

0.9

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

3 release files

0.2

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page