From a62a7cbad7f7d8a3cb73c5d16a42e73ab9f13e03 Mon Sep 17 00:00:00 2001 From: lee2sman Date: Fri, 31 Dec 2021 03:54:17 -0500 Subject: [PATCH] update README.md --- README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7871c8d..3c8a812 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,84 @@ # Bookmobile -Simple command line script to download articles for offline viewing as markdown, simplified clean HTML and epub. +Command line script to download articles for offline viewing as simple HTML, themed html, epub or markdown. -This is a fishscript (shell) gluing together pandoc and a Node.js package that implements the Firefox reader view. It uses a NPM package that uses Mozilla's own reability javascript. If that's not the right solution for you, jump down to the alternatives section at the end. +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](nyt-medium.jpg) *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 +- fish shell - Pandoc - Node.js / NPM -Note: you must have the following sub-directories: originals/ reader/ epubs/ markdown/ - ### Install ``` npm install readability-cli git clone https://tildegit.org/exquisitecorp/bookmobile.git -cd bookmobile -chmod +x bookmobile.fish ``` ### Usage +Basic: + +By default bookmobile will save the article to the current directory as a simple HTML document. + ``` -./bookmobile.fish URL +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 ``` -Output: -A simplified HTML document will be saved to originals. A reader view with chosen (or default) theme will be saved to reader/. An epub in epubs/ and a markdown file to markdown sub-directory. -### To change themes +### To add themes -The themes subdirectory contains several custom simple themes for rendering a nice reader view. You can edit these or add your own custom theme to this folder. Change the theme selection in line 3 of the bookmobile.fish file. +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](https://github.com/masukomi/arc90-readability#readability-10) + + +### Contributing + +Polite issues and pull requests will be considered! + +### License + +Public Domain