Live data from Hacker News

Asciinema – Record and share terminal sessions

asciinema.org

31–40 of 103 posts

Re: Asciinema – Record and share terminal sessions

#31
post #22
post #18

Let me be the devil advocate: why not use ttyrec + seq2gif instead? Or check https://intoli.com/blog/terminal-recorders/ if you don't like my recommendation ttyrec is a standard format that most people and tools understand. And if you want something fancy that asciinema output, you can use seq2gif which support all the bells n whistles asciinema does, while allowing you to also upload the ttyrec file. However, I woul…

>Let me be the devil advocate: why not use ttyrec + seq2gif instead? GIFs look poor - they don't capture colours well. They're not accessible. They don't zoom. Copy and paste doesn't work. >And if you want something fancy that asciinema output, you can use seq2gif which support all the bell n whites asciinema does, while allowing you to also upload the ttyrec file. Unless I'm missing something obvious (possible!), se…

> Or are you saying the ttyrecord files are more accessible?

I do. You can edit them like if you made a typo. They are common, so there's an ecosystem of tools if you don't like raw edits.

Next to that, asciinema looks like reeinventing the wheel, except it's no longer round, so it requires special tools and roads now. But what's a few extra dependencies? It looks better and it's new!

> I have nothing on my system that can read it. I do have a web browser, though.

In general, I prefer a standard format supported by many free software tools that lets me create a file in another standard format that I can put on my website without requiring various other dependencies, like javascripts. Especially if I can pacman / apt-get install the tools.

> seq2gif makes a GIF file. How does this "support all

asciinema #1 use case is to show a recording with color, unicode, etc. I think that's a bad idea for accessibility. You want to show features, not look cool. Still seq2gif gives you that, and the output in a standard format. You can replay the original in a normal term, copy paste etc.

If you think copy & paste from the browser showing an animated replay of the terminal is an important use case #2, huh, we have different use cases, but I don't see how it couldn't be done as another target (seq2something_else, maybe seq2svg?) from a well known and accessible format like ttyrec

Re: Asciinema – Record and share terminal sessions

#32
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

That looks very cool, I will give it a go! I particularly like this feature

> Rendering of recordings in asciicast format made with asciinema

I quite like there being an intermediate file like there is in asciinema that you can edit by hand to remove your typos or speed boring bits up.

Re: Asciinema – Record and share terminal sessions

#33
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.

Re: Asciinema – Record and share terminal sessions

#36
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…

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.

Is it working relieably and reasonably fast?

Re: Asciinema – Record and share terminal sessions

#37
post #21
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…

> 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.

Re: Asciinema – Record and share terminal sessions

#38
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

That's great! I love the approach: a standalone ouput in a standard format.

Do you think you could also add support for ttyrec input?

This would allow converting existing ttyrecs and have a a full suite of tools creating all the options ready to upload between 1) standard text format record, 2) regular animated gif, 3) svg when saving space is important (while gaining zoom abilities as well!)

Re: Asciinema – Record and share terminal sessions

#40
post #38
post #27

Earlier quoted context omitted.

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

That's great! I love the approach: a standalone ouput in a standard format. Do you think you could also add support for ttyrec input? This would allow converting existing ttyrecs and have a a full suite of tools creating all the options ready to upload between 1) standard text format record, 2) regular animated gif, 3) svg when saving space is important (while gaining zoom abilities as well!)

It's a good idea. I don't have much time for termtosvg these days so I can't promise it'll get implemented but I've opened an issue to remember it [1].

[1] https://github.com/nbedos/termtosvg/issues/108

Post reply on HN