Convert escape sequences to html
Design goals and features:
- Convert a reasonable subset of ANSI standard and nonstandard escape sequences to html
- Optionally include Sixel graphics
- Filter out sequences that have no appropriate representation in html, e.g. cursor movement
- See
test.ansi
andtest.sixel
for a list of currently supported sequences - This is not a terminal emulator
- Clone this repository
- Make sure that you have a C++20 capable compiler installed, then type
make
sudo make install
Input is read from stdin, output is written to stdout. Use the -h
option for a list of available options.
Basic example:
cat test.ansi test.sixel | esc2html > test.html
Use the -s
option to convert sixel graphics, requires imagemagick convert
and base64
:
cat test.ansi test.sixel | esc2html -s > test.html
Use the -t
and -f
options to set the document title and font:
esc2html -t title -f monospace < test.ansi > test.html
Your pull requests are welcome.
GNU GPLv3 or later, see LICENSE.