lee2sman c43b775923 | ||
---|---|---|
lib | ||
themes | ||
.gitignore | ||
LICENSE | ||
README.md | ||
bookmobile | ||
bookmobile-gui | ||
epubmobile.fish | ||
nyt-medium.jpg |
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:
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
By default bookmobile will download the specified url and save to the current directory as a simplified html document with readability.
./bookmobile http://article.url
Full usage:
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, filename and output directory
Usage: ./bookmobile url [ --theme THEME ] [ --format FORMAT ] [ --name FILENAME ] [ --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
--format FORMAT
-f FORMAT Set file format (html, reader, markdown, epub)
default: html
--name NAME
-n NAME Set specified file name instead of defaulting to article title
--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.
GUI
A simple yad-based GUI application is included as well.
To install on Debian/*buntu-based systems: apt install yad
.
It can be launched from the command line with ./bookmobile-gui
or you can create an executable.
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