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