@zechris thanks for this cool great tool! I'm using it e.g. here._
It occured to me that what would be cool is that in addition to generating a .cast
, it could also render an *.md
...
In my project's documentation I am putting the screencast of a demo on top of a page, and then also show the script and output as MD doc after it (to make it more easily readable, and copy/paste-able from, and search engine indexed).
My current approach is to asciinema cat *.cast
and then manually to remove the ANSI control codes; see here.
It occured to me that this is "sub-optimal"... as this asciinema-rec_script
already processes the source script file, it could make more sense for it to directly produce MD? That way comments could be put inline into the MD (with MD formatting, outside of the code block), output could be a bash
code-block - and perhaps cat
/ bat
files could be "inlined" with a code block depending on their extension.
I fully understand that while this works for a "simple" command, we could not transform a terminal session in the general case to markdown text, so this would not work for a more advanced "TUI"-like script and recording, like it does for simpler "call this command and show the output that produces".