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 32-bit sec range makes the format susceptible to the Year 2038 problem.

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 it is a standard feature of most Unix-like operating systems.

<span class="mw-page-title-main">BitchX</span> Free IRC client

BitchX is a free IRC client that has been regarded as the most popular ircII-based IRC client. The initial implementation, written by "Trench" and "HappyCrappy", was a script for the IrcII chat client. It was converted to a program in its own right by panasync. BitchX 1.1 final was released in 2004. It is written in C and is a TUI application utilizing ncurses. GTK+ toolkit support has been dropped. It works on all Unix-like operating systems, and is distributed under a BSD license. It was originally based on ircII-EPIC, and eventually it was merged into the EPIC IRC client. It supports IPv6, multiple servers and SSL, and a subset of UTF-8 with an unofficial patch.

<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 character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from Unicode Transformation Format – 8-bit. Almost every webpage is stored in UTF-8.

<span class="mw-page-title-main">UTF-16</span> Variable-width encoding of Unicode, using one or two 16-bit code units

UTF-16 (16-bit Unicode Transformation Format) is a character encoding method capable of encoding all 1,112,064 valid code points of Unicode. The encoding is variable-length as code points are encoded with one or two 16-bitcode units. UTF-16 arose from an earlier obsolete fixed-width 16-bit encoding now known as UCS-2 (for 2-byte Universal Character Set), once it became clear that more than 216 (65,536) code points were needed, including most emoji and important CJK characters such as for personal and place names.

A text file is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system.

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.

glob (programming) Patterns used in computer programming

glob is a libc function for globbing, which is the archetypal use of pattern matching against the names in a filesystem directory such that a name pattern is expanded into a list of names matching that pattern. Although globbing may now refer to glob -style pattern matching of any string, not just expansion into a list of filesystem names, the original meaning of the term is still widespread.

<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.

The following tables compare general and technical information for a number of file archivers. Please see the individual products' articles for further information. They are neither all-inclusive nor are some entries necessarily up to date. Unless otherwise specified in the footnotes section, comparisons are based on the stable versions—without add-ons, extensions or external programs.

This article provides basic comparisons for notable text editors. More feature details for text editors are available from the Category of text editor features and from the individual products' articles. This article may not be up-to-date or necessarily all-inclusive.

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 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.

.properties is a file extension for files mainly used in Java-related technologies to store the configurable parameters of an application. They can also be used for storing strings for Internationalization and localization; these are known as Property Resource Bundles.

<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.

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

BSON is a computer data interchange format. The name "BSON" is based on the term JSON and stands for "Binary JSON". It is a binary form for representing simple or complex data structures including associative arrays, integer indexed arrays, and a suite of fundamental scalar types. BSON originated in 2009 at MongoDB. Several scalar data types are of specific interest to MongoDB and the format is used both as a data storage and network transfer format for the MongoDB database, but it can be used independently outside of MongoDB. Implementations are available in a variety of languages such as C, C++, C#, D, Delphi, Erlang, Go, Haskell, Java, JavaScript, Julia, Lua, OCaml, Perl, PHP, Python, Ruby, Rust, Scala, Smalltalk, and Swift.

<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 mode available with punched cards.

References

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