Download articles for offline viewing as simple HTML, themed html, epub or markdown.
Go to file
lee2sman 6409513609 Merge branch 'master' into dev 2021-12-31 04:00:17 -05:00
lib add comments 2021-07-20 17:19:49 -04:00
themes rename bookmobile 2021-12-31 03:52:36 -05:00
.gitignore add .gitignore 2021-07-20 20:16:09 -04:00
LICENSE add LICENSE 2021-12-31 03:52:45 -05:00
README.md update README.md 2021-12-31 03:54:17 -05:00
bookmobile add support for arguments 2021-12-31 03:53:25 -05:00
nyt-medium.jpg add screenshot of reader view 2021-07-21 02:47:33 -04:00

README.md

Bookmobile

Command line script to download articles for offline viewing as simple HTML, themed html, epub or markdown.

This is a brute force fishscript (shell) gluing together pandoc and a Node.js package that implements the Firefox reader view. It uses a NPM package implementing Mozilla's Readability script to scrape off ads, sidebars, footers, headers, etc. If that's not the right solution for you, jump down to the alternatives section at the end.

For example:

rendered NYTimes article
Example New York Times article rendered in the reader view with the 'Medium' theme

Currently, I use this as an alternative to Wallabag or Pocket to download articles I've meant to read later, converting them to epubs with bookmobile. Once a week I drop them on my micro-sd card and load it in my 10 year old offline e-ink e-reader (a Nook Simple Touch, ultra-cheap on eBay!).

Dependencies

  • fish shell
  • Pandoc
  • Node.js / NPM

Install

npm install readability-cli
git clone https://tildegit.org/exquisitecorp/bookmobile.git

Usage

Basic:

By default bookmobile will save the article to the current directory as a simple HTML document.

Bookmobile: Simple command line script to download articles for offline reading as html, epub or markdown. Saves a simplified html document to current directory as default.

Optionally, you can specify a theme, format and output directory

Usage: ./bookmobile url [ --theme THEME ] [ --format FORMAT ] [ --output OUTPUT ]
                        [-h | --help ]

Options:

    --help
    -h         Display usage info

    --theme THEME
    -t THEME   Set theme for reader format. Default: medium
               Theme options: 
github
gmi
medium
now
pandoc
sakura

    --format FORMAT
    -f FORMAT  Set file format (html, reader, markdown, epub)
               default: html

    --output OUTPUT
    -o OUTPUT  Set output location
               default: current directory

To add themes

The themes subdirectory contains several custom simple themes for rendering a nice reader view. You can edit or add themes here and they will display in the usage help.

Alternatives

Currently there are a number of CLI programs that are ports of the Readability project. These may serve your needs better.

A partial listing can be found here

Contributing

Polite issues and pull requests will be considered!

License

Public Domain