asciinema / discussions

Public open-ended discussions about asciinema
https://github.com/orgs/asciinema/discussions
1 stars 2 forks source link

Extracting Text from the casts - or - pure text casts without terminal control codes (for written documentation) #44

Closed klartext closed 1 year ago

klartext commented 2 years ago

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)

bkil commented 2 years ago

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.

klartext commented 2 years ago

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 https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v2.md and so I started with writing my own tool for that task.

Maybe a seperate tool better matches the unix philosophy... ...but so far the code of the tool is only residing on my laptop. So, I will let the issue stay open.

bkil commented 2 years ago

Related: https://github.com/asciinema/asciinema-server/issues/111 https://github.com/asciinema/asciinema-player/issues/156