DEV Community

Ben Halpern
Ben Halpern

Posted on

I'm very interested in integrating asciinema "natively" in dev.to

I only recently discovered asciinema and I'm fairly enthralled by it. It's an incredibly useful and efficient way to share and teach. Its functionality could blend really well into our interface and it opens the door to other neat integrations.

This will involve deciding how we could do this best, writing a bit of code and having some direct correspondence with Marcin Kulik. None of this has happened and it probably fits in as something we do after open-sourcing our codebase. We'll have a better timeline on that shortly as well.

Just tossing this thought out there if anyone has anything to add on this or adjacent topics. 😊

Latest comments (12)

Collapse
 
hbibzdeploy profile image
Muhammad Habib Jawady

Actually I would recommend it !! That would be awesome in demos which require terminal usage and we won't be obliged to screenshot everything (that's very unpleasant ) . I actually integrated a video in my blog S3curi7y.tn ...

Collapse
 
developius profile image
Finnian Anderson

Please! asciinema is super awesome

Collapse
 
metacritical profile image
Pankaj Doharey • Edited

Use Builtin Unix Command instead of Asciicinema

You dont need any fancy command like asciicinema, you can do this from age old builtin unix command called "script" so no need to install anything, making people install stuff is hard, use whatever is already there on their machine.

Record a terminal session

script -r capture.txt

Play a terminal session

script -p capture.txt

It works exactly like asciicinema. Once that is done the only thing that you need to replay this in the browser is a scriptplayer like this one
Script Play Js

Also the other benefit is people dont really have to go to Asciicast in order to get the link they can just upload their recorded session on the dev.to site itself and done. Also there is no need for an image preview since the session can keep playing repeatedly. Otherwise it would be a fun project to modify the player.

Would like to help if you need any.

Collapse
 
bgadrian profile image
Adrian B.G.

It's cool but it could only solve one type of problems.

Something more generic like tech.io is there open source? but used as a problem solver (user post it's problem and other users write solutions) or showcase for a tech/framework/coding examples.

Collapse
 
nektro profile image
Meghan (she/her)

Love the idea! Maybe with a liquid tag sort of like posts and tweets?

Collapse
 
foresthoffman profile image
Forest Hoffman • Edited

That's actually very cool. If it seems worth it from a technical debt point of view, implement it. I would definitely give it a try.

Collapse
 
alexdreptu profile image
Alexandru Dreptu

That's a great idea. I've known about asciinema for some time and I also thought it was really cool when I discovered it. A few days ago I also discovered scrimba which is similar in a way but for code and can also be narrated.

Collapse
 
anonjr profile image
Mark Bussell Jr

After a very brief once-over, it does look neat; and I can certainly see where it could help with some of the dev.to articles.

What (if anything) would be the downside of integrating it and getting limited usage?

Collapse
 
ben profile image
Ben Halpern

Well the player has an embed we could use right away with an iframe, but I feel like we could make it more native immediately. But this could possibly be a time-wasting rabbit hole to go down or lead to an unnecessary lack of maintainability.

Collapse
 
imthedeveloper profile image
ImTheDeveloper

Remember the posts around building for the future too soon! MVP in my opinion.. iframe and review it's usage. If it becomes popular then let's work on deeper integrations.

Collapse
 
matscode profile image
Michael Akanji

I trust the embed approach can be used for now... then move on to develop the native.

Thread Thread
 
imthedeveloper profile image
ImTheDeveloper

Agree!!πŸ¦„πŸ‘