Ttyrec

Last updated
A NetHack recording being replayed using termrec Termrec wwwwolf.png
A NetHack recording being replayed using termrec

ttyrec is a program or its file format capable of recording the TTY output of a text-mode program together with timestamps and then replaying it.

Contents

It is widely used for example in the NetHack community for storing game replays.

It is similar to the script command, but also allows for pausing, slowing down or speeding up playback. It can also stream the recording on the network and be used to transfer files with uudecode. [1]

Recorders and players

Playback only

Technical file format specification

Each chunk consists of a header using 32bit unsigned little-endian numbers:

and the actual payload written as text with vt100 control codes.

The format does not contain any information about the character set used nor about the terminal size needed to play back the file. termrec will inject this information as \e%G for UTF-8 or \e%@ for not UTF-8 and as \e[8;Y;Xt for size, but not all players will understand these codes.

Related Research Articles

<span class="mw-page-title-main">ASCII</span> American character encoding standard

ASCII, an acronym for American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. ASCII has just 128 code points, of which only 95 are printable characters, which severely limit its scope. The set of available punctuation had significant impact on the syntax of computer languages and text markup. ASCII hugely influenced the design of character sets used by modern computers, including Unicode which has over a million code points, but the first 128 of these are the same as ASCII.

<span class="mw-page-title-main">AWK</span> Programming language

AWK is a domain-specific language designed for text processing and typically used as a data extraction and reporting tool. Like sed and grep, it is a filter, and is a standard feature of most Unix-like operating systems.

<span class="mw-page-title-main">Perl</span> Interpreted programming language first released in 1987

Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".

UTF-8 is a variable-length character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from Unicode Transformation Format – 8-bit.

uuencoding is a form of binary-to-text encoding that originated in the Unix programs uuencode and uudecode written by Mary Ann Horton at the University of California, Berkeley in 1980, for encoding binary data for transmission in email systems.

<span class="mw-page-title-main">Daemon (computing)</span> Computer program that runs as a background process

In multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user. Traditionally, the process names of a daemon end with the letter d, for clarification that the process is in fact a daemon, and for differentiation between a daemon and a normal computer program. For example, syslogd is a daemon that implements system logging facility, and sshd is a daemon that serves incoming SSH connections.

In computer programming, glob patterns specify sets of filenames with wildcard characters. For example, the Unix Bash shell command mv *.txttextfiles/ moves all files with names ending in .txt from the current directory to the directory textfiles. Here, * is a wildcard and *.txt is a glob pattern. The wildcard * stands for "any string of any length including empty, but excluding the path separator characters ".

<span class="mw-page-title-main">PuTTY</span> Free and open-source terminal emulator, serial console and network file transfer application

PuTTY is a free and open-source terminal emulator, serial console and network file transfer application. It supports several network protocols, including SCP, SSH, Telnet, rlogin, and raw socket connection. It can also connect to a serial port. The name "PuTTY" has no official meaning.

Expect is an extension to the Tcl scripting language written by Don Libes. The program automates interactions with programs that expose a text terminal interface. Expect, originally written in 1990 for the Unix platform, has since become available for Microsoft Windows and other systems.

init UNIX system component

In Unix-based computer operating systems, init is the first process started during booting of the operating system. Init is a daemon process that continues running until the system is shut down. It is the direct or indirect ancestor of all other processes and automatically adopts all orphaned processes. Init is started by the kernel during the booting process; a kernel panic will occur if the kernel is unable to start it, or it should die for any reason. Init is typically assigned process identifier 1.

In Unix and Unix-like operating systems, write is a utility used to send messages to another user by writing a message directly to another user's TTY.

In computing, a shebang is the character sequence #!, consisting of the characters number sign and exclamation mark, at the beginning of a script. It is also called sharp-exclamation, sha-bang, hashbang, pound-bang, or hash-pling.

<span class="mw-page-title-main">W3Perl</span>

W3Perl is a free software logfile analyser, which can parse Web/FTP/Mail/CUPS/DHCP/SSH and Squid logfiles. Most major web logfile formats are supported, as well as split/compressed files. "Page tagging" and counter are also supported if you do not have logfiles access. The output is spread over HTML pages, with graphics and a sortable table. Stats can be run from a single command line or from a web browser.

utmp, wtmp, btmp and variants such as utmpx, wtmpx and btmpx are files on Unix-like systems that keep track of all logins and logouts to the system.

<span class="mw-page-title-main">Terminator (terminal emulator)</span> Open-source terminal emulator in Java

Terminator is an open-source terminal emulator programmed in Java. It is available on Microsoft Windows, macOS, Linux and other Unix systems that use the X Window System. Terminator will run on any modern POSIX system running Java 6 or later. Terminator is licensed under the GPL-2.0-or-later license.

In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions.

The script command is a Unix utility that records a terminal session. It dates back to the 1979 3.0 Berkeley Software Distribution (BSD).

<span class="mw-page-title-main">Scripting language</span> Programming language designed for scripting

In computing, a script is a relatively short and simple set of instructions that typically automate an otherwise manual process. The act of writing a script is called scripting. Scripting language or script language describes a programming language that it is used for scripting.

<span class="mw-page-title-main">Command-line interface</span> Computer interface that uses text

A command-line interface (CLI) is a means of interacting with a computer program by inputting lines of text called command-lines. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternative to the non-interactive interface available with punched cards.

In computing, tty is a command in Unix and Unix-like operating systems to print the file name of the terminal connected to standard input.

References

  1. 1 2 "Ttyrec: A tty recorder". Archived from the original on 2007-07-30. Retrieved 2006-07-06.
  2. "Term::TtyRec - handles ttyrec data - metacpan.org". Archived from the original on 2021-10-27. Retrieved 2013-09-16.
  3. "Term::TtyRec::Plus - read a ttyrec - metacpan.org". Archived from the original on 2021-10-27. Retrieved 2013-09-16.
  4. "Tie::Handle::TtyRec - write a ttyrec - metacpan.org". Archived from the original on 2021-10-27. Retrieved 2013-09-16.
  5. "1KB: Software/Termrec". Archived from the original on 2006-07-15. Retrieved 2006-07-06.
  6. "Ttyplayer". Archived from the original on 2012-02-11. Retrieved 2008-04-09.
  7. "IPBT: A high-tech ttyrec player for Unix". Archived from the original on 2006-06-30. Retrieved 2006-07-06.
  8. "Nethack Recorder/Player Version 1.0". Archived from the original on 2006-06-21. Retrieved 2006-07-06.
  9. "#68556 - [patch] adding timings to script - Debian Bug report logs". Archived from the original on 2019-04-10. Retrieved 2014-06-13.