record and replay interactive terminal sessions
Project description
Playitagainsam is a tool and a corresponding file format for recording and replaying interactive terminal sessions. It takes inspiration from the unix commands “script” and “ttyrec” and the python tool “playerpiano”.
Useful features include:
ability to replay with fake typing for enhanced “interactivity”
ability to replay synchronized output in multiple terminals
It’s early days, still kinda buggy and easy to crash. But I hope this will be resolved in short order!
Basic Usage
Run the software using either the included “pias” script, or using the python module-running syntax of “python -m playitagainsam”.
Record a session like this:
$ pias record <output-file>
This will drop you into a shell and record all the input and output that occurs during the session. Once you exit the shell, all activity will be written into the output file as a JSON document.
Replay a recorded session like this:
$ pias play <input-file>
This will start a simulated playback of the original shell. Press any keys to type, and hit “enter” when you reach the end of a line.
Extra Features
It’s possible to record activity in several terminals simultaneously as part of a single session, which can be useful for e.g. demonstrating a server process in one terminal and a client process in another. Join a new terminal to an existing recording session like this:
$ pias --join record <output-file>
There is also a javascript-based player that can be used to embed a recorded session into a HTML document. This is useful for websites and HTML-based presentations. The code is here:
And an example presentation using this code is at:
Gotchas
Getting this all running just right can be tricky business! Here’s some thing that you should be aware of:
All terminals should be using utf8 encoding, or you’ll see strange output and probably some outright errors.
All terminals in a session should be the same size. This restriction may go away in the future.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file playitagainsam-0.1.0.tar.gz
.
File metadata
- Download URL: playitagainsam-0.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77c708a38c1c4b586650acb0a08214f559491a4b965a34627b65565b96cd7d65 |
|
MD5 | feae4604afd53d7f2be22a6bb7291507 |
|
BLAKE2b-256 | c979948c1624fb37db562d46bd1302472feecd329898712dfa376dcbc437176d |