Asciinema: Support following mode in `asciinema play` like `tail -f`

Created on 30 Mar 2018  ·  3Comments  ·  Source: asciinema/asciinema

The 2.0 file format already allow us to play a recording "live", i.e., while rec is still running. However there's still a small draw back, the playback finish immediately when it reaches EOF. This prevents us from watching and following the recording "live" over simple setup like an SSH connection to the same machine. Which I believe is a useful feature to have.

I'd like to add a new flag -f/--follow to asciinema play so that instead of exiting it will keep watching the file for new data and keep on playing it. And I can work on it but would like to hear from the maintainers first.

idea

Most helpful comment

Oh that's great! And sorry, I missed the blog post and thus the (now) obvious use of playing from stdin, my bad. I think this is good enough, asciinema is already super useful and let's not reinvent tail -f 😄

But perhaps adding this to README might make it easier to discover 🤔 ?

All 3 comments

There are several, already working options for this, see this blog post: http://blog.asciinema.org/post/two-point-o/ and specifically this comment by @benaryorg http://blog.asciinema.org/post/two-point-o/#comment-3764849151:

# record
asciinema rec file.cast

# play
tail -fn +1 file.cast | asciinema play -

# play via ssh
ssh example.com tail -fn +1 file.cast | asciinema play -

I definitely find this use case worth looking into. Not sure if it's worth implementing native support if you can do it with unix tools. Maybe, maybe not, let's discuss :)

Oh that's great! And sorry, I missed the blog post and thus the (now) obvious use of playing from stdin, my bad. I think this is good enough, asciinema is already super useful and let's not reinvent tail -f 😄

But perhaps adding this to README might make it easier to discover 🤔 ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karelbilek picture karelbilek  ·  9Comments

pfalcon picture pfalcon  ·  4Comments

Bux42 picture Bux42  ·  9Comments

bashfulrobot picture bashfulrobot  ·  11Comments

redaxmedia picture redaxmedia  ·  3Comments