Replies: 9 comments 4 replies
-
Yes. It could even add light markdown (LaTeX, HTML, ...) formatting as well to differentiate between what you type and what appears on the screen and such. |
Beta Was this translation helpful? Give feedback.
-
When asking if it could be done, I meant: will there be the decision from the asciinema developers to add that feature and will it be added then. (And when will that happen?) But recently (two days ago) I found the documentation on the output format Maybe a seperate tool better matches the unix philosophy... |
Beta Was this translation helpful? Give feedback.
-
Related: https://github.com/asciinema/asciinema-server/issues/111 https://github.com/asciinema/asciinema-player/issues/156 |
Beta Was this translation helpful? Give feedback.
-
Listen to what Marcin Kulik talks about here: https://changelog.com/podcast/561 Listen at 1:03:37. That's what I want: the exportable "freezed" textversion of the terminal output. |
Beta Was this translation helpful? Give feedback.
-
In order to reliably convert captured recording to pure text it needs to run through some kind of terminal emulator and the text without color attributes needs to be extracted from terminal's screen buffer. All other approaches, like stripping certain sequences with regex etc, are brittle and give good results only in simple cases. avt, used by asciinema player, server and agg, can do this. This is Rust library which is embeded in the mentioned components, but it's not embedded in But avt can be invoked separately to do to-text conversion like this (in avt checkout, assuming you have Rust toolchain installed):
The above one converted arbitrary text with sequences in it. One below converts from .cast file:
See demo here: Ideally it would be something built in like, |
Beta Was this translation helpful? Give feedback.
-
As of today (via this commit) you can download pure text version of the recording from asciinema.org by appending For example, for the demo above which has URL https://asciinema.org/a/614835 you can download Need to add some link/button in the UI for easier discovery of this, but the endpoint is fully functional now ✨ |
Beta Was this translation helpful? Give feedback.
-
And it's now available via Download dropdown: |
Beta Was this translation helpful? Give feedback.
-
I stumbled here just to find out now there is: asciinema cat foo.cast |
Beta Was this translation helpful? Give feedback.
-
Good news: the upcoming asciinema CLI 3.0 supports recording and conversion to plain text files. Record to plain text file: asciinema rec foo.txt
asciinema rec foo.log --format txt Convert existing cast file to plain text: asciinema convert foo.cast foo.txt
asciinema convert foo.cast foo.log --format txt If you'd like to play with it then check here: https://github.com/asciinema/asciinema/releases/tag/v3.0.0-rc.1 You can either download a precompiled binary from the above page or build from source. |
Beta Was this translation helpful? Give feedback.
-
For documentation of "things I did in the terminal" I want to use asciinema for recording, and then extract the text parts,
so that these parts can then be imported into textfiles, markdown files or LaTeX files (as verbatim text).
Would be nice if asciinema could offer a "pure text" output format - without the terminal control codes.
I ask, if it would be possible to add this as an option to asciinema.
(some kind of 'raw' mode, just without the terminal symbls, so maybe 'rawtext' mode)
Beta Was this translation helpful? Give feedback.
All reactions