Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laktak/pipevcr
Like asciinema but for pipes
https://github.com/laktak/pipevcr
asciicast cli pipes recorder recording terminal terminal-recording
Last synced: 2 months ago
JSON representation
Like asciinema but for pipes
- Host: GitHub
- URL: https://github.com/laktak/pipevcr
- Owner: laktak
- License: mit
- Created: 2020-11-12T15:11:55.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-25T22:08:08.000Z (11 months ago)
- Last Synced: 2024-10-09T17:36:40.381Z (2 months ago)
- Topics: asciicast, cli, pipes, recorder, recording, terminal, terminal-recording
- Language: Python
- Homepage: https://pypi.org/project/pipevcr/
- Size: 7.81 KB
- Stars: 15
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pipevcr
Record and play back pipes. Similar to what `script` does with the terminal but for pipes.
This can be used for debugging or testing where timing matters.
## Installation
```
pip3 install --user pipevcr# or if you have pipx
pipx install pipevcr
```## Usage
```
usage: pipevcr [-h] [-r] [-s SPEED] [-m MAX_PAUSE] FILEpipevcr - the linux pipe recorder
positional arguments:
FILE data fileoptions:
-h, --help show this help message and exit
-r, --record record pipe
-s SPEED, --speed SPEED
playback speed, <1 to slow down, >1 to speed up
-m MAX_PAUSE, --max-pause MAX_PAUSE
max pause time between outputs in seconds
```## Record
You record a pipe with `-r`, e.g.:
```
(echo wait 1; sleep 1; echo wait 2; sleep 2; echo end) | pipevcr -r test.vcr
```## Playback
And play it back with:
```
pipevcr test.vcr
```## Faster
To speed it up (2=double):
```
pipevcr -s 2 test.vcr
```## Slower
To slow it down (.5=half):
```
pipevcr -s .5 test.vcr
```You can also set the maximum pause time separately:
```
pipevcr -m 1 test.vcr
```