[PR #80] [MERGED] New asciicast file format + saving/replaying locally #379

Closed
opened 2026-02-25 20:33:33 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/asciinema/asciinema/pull/80
Author: @ku1ik
Created: 2/24/2015
Status: Merged
Merged: 3/2/2015
Merged by: @ku1ik

Base: masterHead: decoupling


📝 Commits (10+)

  • f441986 New asciicast file format, ability to save asciicasts locally
  • aac8cea Add command for uploading locally saved asciicasts
  • 224fc8c Instruct user on how to retry upload when rec fails to do it
  • 83828d7 Better filename for tmp asciicast file
  • aa493e5 Document rec, play and upload commands
  • d8f84d9 Document asciicast file format
  • 2ec34ad Words
  • 17cadf6 Close tmp file instead of removing it
  • c5d3bbe Words
  • 0e0f333 Don't reinvent "marshal string to JSON" wheel

📊 Changes

17 files changed (+602 additions, -206 deletions)

View changed files

📝 README.md (+38 -9)
📝 api/api.go (+17 -67)
📝 api/http.go (+8 -6)
asciicast/asciicast.go (+75 -0)
asciicast/frame.go (+35 -0)
asciicast/frame_test.go (+80 -0)
asciicast/player.go (+34 -0)
asciicast/recorder.go (+62 -0)
asciicast/stream.go (+51 -0)
commands/play.go (+35 -0)
📝 commands/rec.go (+37 -74)
📝 commands/rec_test.go (+7 -46)
commands/upload.go (+38 -0)
doc/asciicast-v1.md (+62 -0)
📝 main.go (+6 -2)
📝 terminal/terminal.go (+16 -1)
📝 terminal/terminal_test.go (+1 -1)

📄 Description

This one allows recording to a local file with asciinema rec demo.json, in-terminal replay with asciinema play demo.json, and upload to asciinema.org with asciinema upload demo.json.

asciinema rec without filename argument works as before - uploads to asciinema.org after asking for confirmation. However, asciicast is saved to a tmp file before uploading, allowing user to retry upload later with asciinema upload /tmp/path/to/asciicast.json in case of upload error (like network connection issue etc).


🔄 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/80 **Author:** [@ku1ik](https://github.com/ku1ik) **Created:** 2/24/2015 **Status:** ✅ Merged **Merged:** 3/2/2015 **Merged by:** [@ku1ik](https://github.com/ku1ik) **Base:** `master` ← **Head:** `decoupling` --- ### 📝 Commits (10+) - [`f441986`](https://github.com/asciinema/asciinema/commit/f44198691c915b232a7fd46449c379bcbd4ccf19) New asciicast file format, ability to save asciicasts locally - [`aac8cea`](https://github.com/asciinema/asciinema/commit/aac8cea2cb8f07655f4ad5520999c5b763688233) Add command for uploading locally saved asciicasts - [`224fc8c`](https://github.com/asciinema/asciinema/commit/224fc8c12b5689e31b04f9f2a8cbeab96dfede71) Instruct user on how to retry upload when rec fails to do it - [`83828d7`](https://github.com/asciinema/asciinema/commit/83828d7ec0cb26eb1f7a4e35ffc4f491720a42b2) Better filename for tmp asciicast file - [`aa493e5`](https://github.com/asciinema/asciinema/commit/aa493e53967273f489354c1f5795441313576231) Document `rec`, `play` and `upload` commands - [`d8f84d9`](https://github.com/asciinema/asciinema/commit/d8f84d99f4376b3a2fef3556220aa27fb8b2be3b) Document asciicast file format - [`2ec34ad`](https://github.com/asciinema/asciinema/commit/2ec34ad98ddedcd27636f179657a277b3ec5b5b4) Words - [`17cadf6`](https://github.com/asciinema/asciinema/commit/17cadf64f94e1b1fd89a56144587fa4dd06d077e) Close tmp file instead of removing it - [`c5d3bbe`](https://github.com/asciinema/asciinema/commit/c5d3bbe9a18726cb1b5ba3a52f3da6e35af1080b) Words - [`0e0f333`](https://github.com/asciinema/asciinema/commit/0e0f33383c0c05ec5d78f9abec8de3a2e85c98b7) Don't reinvent "marshal string to JSON" wheel ### 📊 Changes **17 files changed** (+602 additions, -206 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+38 -9) 📝 `api/api.go` (+17 -67) 📝 `api/http.go` (+8 -6) ➕ `asciicast/asciicast.go` (+75 -0) ➕ `asciicast/frame.go` (+35 -0) ➕ `asciicast/frame_test.go` (+80 -0) ➕ `asciicast/player.go` (+34 -0) ➕ `asciicast/recorder.go` (+62 -0) ➕ `asciicast/stream.go` (+51 -0) ➕ `commands/play.go` (+35 -0) 📝 `commands/rec.go` (+37 -74) 📝 `commands/rec_test.go` (+7 -46) ➕ `commands/upload.go` (+38 -0) ➕ `doc/asciicast-v1.md` (+62 -0) 📝 `main.go` (+6 -2) 📝 `terminal/terminal.go` (+16 -1) 📝 `terminal/terminal_test.go` (+1 -1) </details> ### 📄 Description This one allows recording to a local file with `asciinema rec demo.json`, in-terminal replay with `asciinema play demo.json`, and upload to asciinema.org with `asciinema upload demo.json`. `asciinema rec` without filename argument works as before - uploads to asciinema.org after asking for confirmation. However, asciicast is saved to a tmp file before uploading, allowing user to retry upload later with `asciinema upload /tmp/path/to/asciicast.json` in case of upload error (like network connection issue etc). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 20:33:33 +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#379
No description provided.