I have a Monit instance managing several daemons and processes on a VPS. I don't want to expose the Monit endpoint over the internet but I do want to be able to quickly view my system's status. Monit serves their status page as HTML which isn't the easiest thing to read from the console. So I installed
html2text and now I can
curl the HTML response into
html2text and see a pretty formatted text output that is close enough to the HTML layout to be useful.
curl -sSB http://localhost:2812 | html2text -ascii
curl -s silences the progress bar output.
curl -S allows for showing errors.
curl -B converts the output to ASCII.
html2text seemed to have issues with rendering Unicode/UTF-8 output and since that support wasn't necessary for me I chose to simply go with the ASCII character set and avoid any warnings from
html2text -ascii let's it know to expect ASCII format.
Now instead of a mangled mess of HTML I see a nicely formatted table.