3 ms·
As a shell script, feeding w3m directly (it will read stdin, as will lynx): #!/bin/sh set -e curl -s "${1}" | tr -cd '\11\12\15\40-\176' |
by dredmorbius 7y ago
As a shell script, feeding w3m directly (it will read stdin, as will lynx):
#!/bin/sh
set -e
curl -s "${1}" |
tr -cd '\11\12\15\40-\176' |
sed 's/</\n</g' |
sed -n '/./{/<p class=.font--body/,/<\/p>/p;}' |
/usr/bin/w3m -T text/html
I've called this "washpo".
The argument is the URL you want view.
If you're a stickler for well-formed HTML, you can add a pipeline for tidy as well ;-)
tidy -i -w 120 --quiet |
Immediately before your browser of choice.
And if you want to retain the title and dateline, use this version:
https://pastebin.com/raw/LcBp6gPB https://pastebin.com/raw/LcBp6gPB
- sogen 7y agow3m, nice! forgot I had it installed