ansi-escape

A library to convert ANSI escapes (terminal formatting/color codes) to HTML

I'm looking for a code library that converts ANSI escape sequences into HTML color, via plain tags or CSS. For example, something that would convert this: ESC[00mESC[01;34mbinESC[00m ESC[01;34mcodeESC[00m ESC[01;31mdropbox-lnx.x86-0.6.404.tar.gzESC[00m ESC[00mfooESC[00m Into this: <span style="color:blue">bin</span> <span style="colo...

Converting ANSI escape sequences to HTML using PHP

This is a similar question to this one. I would like to convert ANSI escape sequences, especially for color, into HTML. However, I would like to accomplish this using PHP. Are there any libraries or example code out there that do this? If not, anything that can get me part way to a custom solution? ...

python regex escape characters

Hi. We have: >>> str 'exit\r\ndrwxr-xr-x 2 root root 0 Jan 1 2000 \x1b[1;34mbin\x1b[0m\r\ndrwxr-xr-x 3 root root 0 Jan 1 2000 \x1b[1;34mlib\x1b[0m\r\ndrwxr-xr-x 10 root root 0 Jan 1 1970 \x1b[1;34mlocal\x1b[0m\r\ndrwxr-xr-x 2 root root 0 Jan 1 2000 \x1b[1...