Live data from Hacker News

Asciinema – Record and share terminal sessions

asciinema.org

41–50 of 103 posts

Re: Asciinema – Record and share terminal sessions

#41
post #25

'script' also does something similar, and is one of the lesser known commands. from the man page: script makes a typescript of everything displayed on your ter‐ minal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the type‐ script file can be printed out later with lpr(1).

script unfortunately messes with SIGWINCH for terminal resizes - asciinema seems to work better in that case.

can script record vim editing session?

Re: Asciinema – Record and share terminal sessions

#42
post #6
post #2

Don't know if I want to a script that records my terminal session and upload the recording to an external server. Is there a way to keep the recording local?

asciinema is open-source and the file format is publicly documented (asciicast)[1]. You can run `asciinema rec filename.json` to save the file locally and self-host it with asciinema-player[2]. Alternatively, there's also asciicast2gif[3] that converts asciicast json to GIF image. [1]: https://github.com/asciinema/asciinema/blob/master/doc/ascii... [2]: https://github.com/asciinema/asciinema-player [3]: https://githu…

Whether it is FOSS doesn't really contribute anything to solve the problem GP mentions though. The default behavior is to nudge the user to upload. One must assume this is the part of the design which allows potential monetization one day. Obviously the author may not be keen to point out this giant gap in the security of their design (it is in fact the main feature).

Users might not even think about the security risks this could create. From an enterprise security perspective this is indistinguishable from any (malicious) data-exfiltration tool. It should come with a giant warning and better defaults imo.

Re: Asciinema – Record and share terminal sessions

#44
I've been using this for years and have been really happy with it. IMO it beats other video/gif recordings because of the way it stores the data files. It records all input and output individually, so you can copy-paste from the recordings. I think it would be invaluable in a classroom setting.

Re: Asciinema – Record and share terminal sessions

#45
My team wrote our own implementation with a similar API to get around Asciinema's weird support for React [0]. We've been using it in our web application to play back historic terminal sessions recorded by our agent. Unfortunately it hasn't been split out from the main application code yet. Open sourcing it is on the list.

[0] https://github.com/asciinema/asciinema-player/issues/72

Re: Asciinema – Record and share terminal sessions

#46
post #6

Earlier quoted context omitted.

asciinema is open-source and the file format is publicly documented (asciicast)[1]. You can run `asciinema rec filename.json` to save the file locally and self-host it with asciinema-player[2]. Alternatively, there's also asciicast2gif[3] that converts asciicast json to GIF image. [1]: https://github.com/asciinema/asciinema/blob/master/doc/ascii... [2]: https://github.com/asciinema/asciinema-player [3]: https://githu…

Has anyone experiences with asciicast2gif? On the surface this looks just like what's needed to make this work for me: I like the recording tools, but don't want to be forced to embed a player from a third party service. Looks like asciinema2gif relies on PhantomJs which brings withit an entire browser and is also no longer maintained. This looks very bloaty for a tool that should convert terminal input to a gif file…

I've only tried it few times via their official docker image; it's reasonably fast (a minute of asciicast took about a minute to convert), but PhantomJS/ImageMagick do put some load on the CPU while it's generating/combining frames. I never had any problems when I need to make a GIF, but the conversion process does indeed seems very wasteful.

Re: Asciinema – Record and share terminal sessions

#47
post #6

Earlier quoted context omitted.

asciinema is open-source and the file format is publicly documented (asciicast)[1]. You can run `asciinema rec filename.json` to save the file locally and self-host it with asciinema-player[2]. Alternatively, there's also asciicast2gif[3] that converts asciicast json to GIF image. [1]: https://github.com/asciinema/asciinema/blob/master/doc/ascii... [2]: https://github.com/asciinema/asciinema-player [3]: https://githu…

Whether it is FOSS doesn't really contribute anything to solve the problem GP mentions though. The default behavior is to nudge the user to upload. One must assume this is the part of the design which allows potential monetization one day. Obviously the author may not be keen to point out this giant gap in the security of their design (it is in fact the main feature). Users might not even think about the security ris…

> The default behavior is to nudge the user to upload.

It's not that bad, if you do not provide a filename, by default it asks for confirmation before uploading. It's still easy to upload by accident[1] though, which I know is no-go in some environment.

[1]: https://github.com/asciinema/asciinema/issues/316

Re: Asciinema – Record and share terminal sessions

#48
post #21

Earlier quoted context omitted.

> please consider using plain text instead You do understand this is a false dichotomy? You can have both. Some people would rather watch a video and follow along, whereas others get more out of reading text... and both fit neatly on a page right next to one another.

For double the effort, which not many people go to.

sure, if you're going to be lazy and only do one do text. HOWEVER advocating for the lazy path amongst fellow practitioners is not a great strategy to promote quality output.

Documentation is hard. Good documentation is harder. There are many occasions where video and video-like things are good for getting a feel for something and just plain text is good for reference. We shouldn't be saying "just use text because you probably won't bother doing everything you should". We should be saying "Hey, video, still images, and text all combine to make great documentation and help people to understand and use your tool / product." They take time, but we should care about our users, and thus we should take the time to support them.

Re: Asciinema – Record and share terminal sessions

#49
post #17
post #9

If you feel like using asciinema or similar on your readme - please consider using plain text instead. This fancy players: - are unfriendly to visually impaired people - are unfriendly to the many people with low bandwith in the global south - require you to watch the play instead of scanning through text with your eyes - cannot be searched for text strings easily - cannot be easily used in a terminal or without a br…

Uploading ascii equivalents is a great idea! I usually do that, so I can later reconvert if needed. Can you tell me if your text browser/Braille reader works well with https://github.com/csdvrx/pg_csdvrx/blob/master/pg_csdvrx.tt... ? This is my latest recording. I removed color and unicode to be more accessible but I still have some Ansi.

easy way to test if a web page sucks for blind people: Use Lynx[1] to browse it. It's not a perfect representation of what they experience but it's a very easy way to get a good impression.

[1]: https://lynx.browser.org/

Re: Asciinema – Record and share terminal sessions

#50
post #27
post #3

Are there any alternatives (just want to see alternatives to find which is best for my use). Either way, looks nice! Although a bit irrelevant, like the gradient!

I wrote termtosvg as an alternative [1]. It's a python program that records a shell session as a standalone SVG animation. Animations produced by termtosvg can be embedded in Markdown files or HTML pages. [1] https://github.com/nbedos/termtosvg

Awesome alternative! I like how it is all in one format.

Fits right into a document I am developing.

Post reply on HN