2024-12-10
readable
For a couple of years I use readablitiy-cli to have the Firefox reader view in my terminal. But for a true offline experience I created a simple shell script `readable.sh` that combines readability-cli and w3m to ouput any website as a plain text:
#!/usr/bin/env bash
#$1 = URL
#Use readable and w3m to format HTML content:
echo "$1" | xargs readable -q -K -l force | w3m -T text/html -cols 80 -dump
Now I can use it to save any longer article for offline reading:
./readable.sh https://100r.co/site/working_offgrid_efficiently.html > readlater.txt
less readlater.txt
I used it to save the chapters of a short story without the HTML clutter:
./readable.sh https://marshallbrain.com/manna1 > manna_chapter1.txt