Introduction to GNU Teseq
This is the home page for GNU Teseq (the author pronounces it: "tea" + "seek"), a tool for analyzing files that contain control characters and terminal control sequences, by printing these control sequences and their meanings in readable English. It is intended to be useful for debugging terminal emulators, and programs that make heavy use of advanced terminal features such as cursor movement, coloring, and other effects.
Teseq is useful for:
- creating animated, interactive demos to run on the terminal (see here for a video on how to do this),
- knowing the exact output of a program (Did it have spaces at the end of the line? Or maybe it contains invisible control characters?),
- examining a text file's contents unambiguously, a la “cat -t” or the ed “l” command (but with much more information),
- stripping control sequences from a text file, e.g. to produce a plain ascii text file from a typescript file generated by the “script” command (see example below),
- examining invisible control sequences within a text file, that affect graphical formatting or character encoding, in order to understand how they work and where they appear in the file, or
- debugging graphical terminal applications, and terminal emulators (its originally-intended purpose).
It takes input like the following, containing various invisible formatting codes:
Hi there, world
And spits out something like:
: Esc [ 1 m & SGR: SELECT GRAPHIC RENDITION " Set bold text. |Hi| : Esc [ 0 m & SGR: SELECT GRAPHIC RENDITION " Clear graphic rendition to defaults. | there, world| . BS/^H BS/^H BS/^H BS/^H BS/^H |earth|.
(Coloring added for clarity; though Teseq does offer options for colorizing the output.)
You can strip out control sequences from a file with a command such as:
$ teseq -EDLC your-file.txt | reseq - - | col -b > new-file.txt
(See the manual for details on how this works.)
Downloading GNU Teseq
You can also browse or check out the current development sources at Savannah. Checking out the development sources requires Mercurial. Building from the development sources requires autoconf and automake (generate a “configure” script by running ./autogen.sh). Running some of the included test suites requires Check and Checkmk.
GNU Teseq documentation can be found here. You may also find more information about GNU Teseq by running info teseq, man teseq, or looking at /usr/share/doc/teseq/ or /usr/local/share/doc/teseq/ on your system (if you have GNU Teseq installed, that is).
For support, questions, suggestions, patches and bug reports, use the <email@example.com> mailing list.
Announcements about Teseq and most other GNU software are made on <firstname.lastname@example.org>.
To subscribe to these or any GNU mailing lists, please send an empty mail with a Subject: header line of just "subscribe" to the relevant -request list. For example, to subscribe yourself to <email@example.com>, you would send mail to <firstname.lastname@example.org> with no body and a Subject: header line of just "subscribe". Or you can use the mailing list web interface.
GNU Teseq is currently being maintained by <email@example.com>.