Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 976 Bytes

README.md

File metadata and controls

52 lines (42 loc) · 976 Bytes

readability-cli

CLI wrapper for mozilla/readability.

Install

$ npm install -g

Examples

NOTE: readability can be replaced with node . in each example to run readability-cli from the repository root.

Fetch page and convert

$ curl -s https://blog.mozilla.org/firefox/reader-view/ \
    | tr -d "\n\r" \
    | readability

Create page to read

NOTE: This example requires jq.

$ rm -f read.html \
    && curl -s https://blog.mozilla.org/firefox/reader-view/ \
    | tr -d "\n\r" \
    | readability \
    | jq -r ".content" > read.html \
    && open read.html

Pipe multi-line string

$ cat <<EOF | tr -d "\n\r" | readability
<!DOCTYPE html>
<html>
    <head>
        <title>Readability</title>
    </head>
    <body>
        Hello, world!
    </body>
</html>
EOF

Uninstall

$ npm uninstall -g readability