This program is a minimalist and incomplete headless terminal emulation.
Its aim is to be able to process a typescript like the one generated by codes like ptylie or the well known script utility and render it in a virtual screen.
The resulting output is the screen after all the typescript content has been interpreted.
If the -n option is not present, then each screen line will be followed by an attributes line which can be empty if no attribute has been set in this line.
This program uses VTParse (https://github.com/haberman/vtparse) by Joshua Haberman kindly put in the public domain, enhanced to support UTF-8. in fact the supported encodings and only UTF-8 and ASCII 7-bit.
This program take its input from the standard input write to the standard output.
hlvt [-l screen_lines] [-f] [-n]
-l | describes the number of lines of the virtual screen, the number of columns is not limited. By default, the virtual screen has 24 lines. |
-f | adds some formatting to the outputs and is not needed in most cases. |
-n | disables the output of the attribute lines. |
- WARNING
- Only the latest (screen_lines) lines displayed on the virtual screen will be shown, the scrolled up ones will be lost.
- IMPORTANT
For now and until I find a solution, is is capital to interpret a typescript made immediately after having clearing the screen because some escape sequences such as CUP address the cursor with absolute coordinates.
If these numbers are below the bottom of the virtual screen, this will result in garbage when running this program. So remember to use the clear command before recording some terminal activities.
- NOTE
- The understood terminal sequences are those parsed by VTParse, see http://vt100.net/emu/dec_ansi_parser.html for more details.
The content of the archive is complete and a single configure/make/make
install should be enough. A build.sh
script is also included.
Notice that the files VTParse_table.[ch] are generated from the ruby files, hence ruby is required at least once.
Have fun.
License: GPLv2