[PR #492] [MERGED] Treat dash char (-) as stdout for output filename #1100

Closed
opened 2026-03-15 11:18:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/asciinema/asciinema/pull/492
Author: @ku1ik
Created: 4/27/2022
Status: Merged
Merged: 4/28/2022
Merged by: @ku1ik

Base: developHead: dashes


📝 Commits (2)

  • 20e04f7 Dummy default for on_error in file_writer
  • e481015 Treat dash char (-) as stdout for output filename

📊 Changes

4 files changed (+40 additions, -17 deletions)

View changed files

📝 asciinema/asciicast/raw.py (+12 -1)
📝 asciinema/asciicast/v2.py (+17 -6)
📝 asciinema/commands/record.py (+5 -1)
📝 asciinema/file_writer.py (+6 -9)

📄 Description

Allows easy piping of the resulting asciicast, e.g. for filtering or live streaming:

# terminal 1 (viewer)
nc -l 9999 | asciinema play -

# terminal 2 (streamer)
asciinema rec - | nc -N localhost 9999

Or the same, in raw mode:

# terminal 1 (viewer)
nc -l 9999

# terminal 2 (streamer)
asciinema rec --raw - | nc -N localhost 9999

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/asciinema/asciinema/pull/492 **Author:** [@ku1ik](https://github.com/ku1ik) **Created:** 4/27/2022 **Status:** ✅ Merged **Merged:** 4/28/2022 **Merged by:** [@ku1ik](https://github.com/ku1ik) **Base:** `develop` ← **Head:** `dashes` --- ### 📝 Commits (2) - [`20e04f7`](https://github.com/asciinema/asciinema/commit/20e04f73008ef711bb5c694361b7d7a3a65e0a58) Dummy default for on_error in file_writer - [`e481015`](https://github.com/asciinema/asciinema/commit/e481015934e1d6f9992569b58ae36bccb4173285) Treat dash char (-) as stdout for output filename ### 📊 Changes **4 files changed** (+40 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `asciinema/asciicast/raw.py` (+12 -1) 📝 `asciinema/asciicast/v2.py` (+17 -6) 📝 `asciinema/commands/record.py` (+5 -1) 📝 `asciinema/file_writer.py` (+6 -9) </details> ### 📄 Description Allows easy piping of the resulting asciicast, e.g. for filtering or live streaming: ```bash # terminal 1 (viewer) nc -l 9999 | asciinema play - # terminal 2 (streamer) asciinema rec - | nc -N localhost 9999 ``` Or the same, in raw mode: ```bash # terminal 1 (viewer) nc -l 9999 # terminal 2 (streamer) asciinema rec --raw - | nc -N localhost 9999 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 11:18:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#1100
No description provided.