Is there any tool that translates text with ANSI code to text-like output?
tput cap names or the like?
Reason for the inquiry is that I would like to use
script or the like and view the resulting file without having to decipher ANSI sequences. I know some, but not all, and a textual output would be easier to read.
In most cases I can look at source code for script or program that produces the ANSI text, but would be nice if there was a "debug" like tool.
The best would likely be C ? variable names, i.e.:
^[[K -> <clr_eol>
Know I can write a script for it ... for example:
sed 's/$/<newline>/' rec001.txt | \ sed 's/\x07/\n<bell>/g' | \ sed 's/\x1b\[K/\n<clr_eol>/g' | \ sed 's/\x1b\[?12l\x1b\[?25h/\n<cursor_normal>/g' | \ sed 's/\x1b\[\([0-9]\+\);\([0-9]\+\)H/\n<cursor_position(\1, \2)>/g' | \ sed 's/\x1b\[?1049h/\n<enter_ca_mode>/g' | \ sed 's/\x1b\[?25l/\n<cursor_invisible>/g' | \ sed 's/\x0d/<CR>/g' | \ ...
which is part of a quick test I did on a Irssi recording.
But wondering if there are any existing tool for the job.
As a side note we have
aha, Ansi HTML adapter, which converts ANSI to HTML. But that is not the adapter I am looking for.