jeudi 15 juin 2017

Render HTML from standard input with w3m

From a very long time, I was using the links browser as my default browser. It allows quick testing of a web site with a simple

links -dump debian.org

Alas links does not support rendering html from standard input, so I finally switched to w3m, handles that well. So I could do:

cat bla.html | w3m -T text/html -dump

Using curl and any member of the Unix Toolkit gang, you see which possibilities it opens. Oh and UTF-8 works well too !

links -dump https://www.debian.org/index.ru.html | grep свободная
Debian — это свободная операционная система (ОС) для вашего компьютера.

свободная that’s Russian for Free.

Aucun commentaire: