Fix error deleting nonexistent characters; add BEL
Add program
A simple python program to render a file with ansi codes into plain text.
The main use case is to render the output of the Linux 'script' command into a sensible-looking log of a terminal session.
This is a very basic script and so doesn't handle all ANSI escape codes, only those which I have come across.
The rendered output will stop when the terminal enters the 'alternate screen' (i.e. in a pager or an editor), and resume when it is exited. This means that the output of less/vim/whatever won't be included in the result. There is no sensible or easy way to render the output of an interactive session into a static text file!
Input is read from stdin and written to stdout.