From 039c7e925a745b6392e8ce4d6d85c7faa807a289 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 16 Jan 2022 10:44:26 -0800 Subject: [PATCH] Minor edits to new custom reader example. --- doc/custom-readers.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/custom-readers.md b/doc/custom-readers.md index 6d8333d14..be14a1154 100644 --- a/doc/custom-readers.md +++ b/doc/custom-readers.md @@ -683,7 +683,7 @@ function Reader (input, opts) end ``` -# Example: "readable HTML" reader +# Example: extracting the content from web pages This reader uses the command-line program `readable` (install via `npm install -g readability-cli`) @@ -691,10 +691,12 @@ to clean out parts of HTML input that have to do with navigation, leaving only the content. ``` lua --- Custom reader for "readable HTML." This pipes HTML content --- through the 'readable' program (npm install -g readability-cli) --- and then calls the HTML reader. In addition, Divs that seem --- to have only a layout function are removed to avoid clutter. +-- Custom reader that extracts the content from HTML documents, +-- ignoring navigation and layout elements. This preprocesses input +-- through the 'readable' program (which can be installed using +-- 'npm install -g readability-cli') and then calls the HTML reader. +-- In addition, Divs that seem to have only a layout function are removed +-- to avoid clutter. function make_readable(source) local result