How to convert Linux's shell output to HTML?

html, linux, shell

Solution

There's `ansifilter` plus some tools like `highlight` will produce colorized html from plain text such as source files.

Both available here.

Problem

Is there any easy way to convert bash output to HTML? For example, if I have some colorized output in bash (something like `htop`), how can I convert it to HTML, with corresponding stylings/tags/css/etc.

Original source

Related problems