pycontribs / ansi2html

Convert text with ansi color codes to HTML
GNU Lesser General Public License v3.0
389 stars 78 forks source link

Doesn't work with colourify / grc / generic colouriser #245

Open AGI-chandler opened 4 months ago

AGI-chandler commented 4 months ago

I don't understand why it doesn't work with a colorizer such as grc.

Once grc is installed and activated, it will add a bunch of aliases to your environment, such as alias ip="colourizer ip" which colorizes the output of ip addr like so:

_grc_ output of `ip addr`

Yet, neither ansi2html, aha, nor ansi2html.sh are able to process these ansi color codes, and their html output just has boring plain text.  Example from a 2nd machine:

_ansi2html_ output of _grc_ output of `ip addr`

Any idea why?  The colors from ls are captured just fine.  In fact, grc will add color to the other columns of ls -l:

_grc_ output of `ls -l`

Yet, ansi2html ignores the color added by grc while still parsing the color (and links!) added by ls:

_ansi2html_ output of _grc_ output of `ls -l`

Weird!