Doitlive, a tool for live presentations in the terminal
doitlive.readthedocs.io
doitlive.readthedocs.io
If you are doing a presentation at some large conference where people will not be interrupting you with questions as you do your presentation, then I would recommend it. HOWEVER most of us do presentations to smaller more informal groups: coworkers, local coding meetups, etc. In those situations people are more likely to interrupt you and ask you something that would normally be doable IF you weren't running a script
So, IF you're going to use this in an interruptable situation I would strongly recommend mentioning BEFORE you start, that you are executing the commands live, but that you're using an interactive script to do it so that you don't screw anything up. Otherwise you look like a fraud when someones like "what about X" and you're all ... "well yes, but i can't do that right now because while it looks like I've been typing these commands, in reality I've been deceiving you and can't break out of this script or everything goes awry... but yes i could do that.... if i wasn't pretending i was actually typing this stuff." And yes, I'm speaking from experience, although i used different words. It's really awkward. Don't do it.
Because it is actually running your commands in an actual interpreter, executing unplanned commands is only a problem because you can't input it. Having a few keystrokes to go back, edit/enter a command, go to line N, would make this problem disappear.
Or do it the other way, and have a keystroke insert the next line from your script. Like Ctrl-R, but at the speed of my typing.
My use case for doitlive really is lightning talks.
>How does Jordi type commands so quickly?
I did wonder while watching the video if I would have thought the same thing if I wasn't coming from this thread. It was a little too subtle I guess.
I have two primary concerns:
1) When you’re doing a live presentation, making the occasional mistake is not only expected, it helps prove that what you’re doing is really live. With a tool like this, everything might be TOO perfect. Might have to start incorporating intentional flubs into the script to make things authentic.
2) I haven’t tried this out yet, but I wonder what happens when something goes wrong. I’ve had too many live situations impacted by some unforeseen thing. Forgot to clean up the working directory last time I ran the demo, or who knows what. I’d want to have the ability to take over the controls if needed.
And of course, the antidote to #2 is having very carefully planned repeatable steps with a “cleanup” at the beginning or end to prep for the next time around.
All said, very cool, and I’ll be trying this soon.
Edit: Downvotes, really?
^C and <esc> do interrupt the playback and print 'Aborted!' to stdout.
>Might have to start incorporating intentional flubs into the script to make things authentic
Unfortunately, flubs give a bit away by showing the temp file that's being run:
$ datl
/tmp/tmpzygMVj: line 4: datl: command not found
I also tried inserting some ^H backspaces in the script. It almost looks like it will work (shows the backspace and correction), then spits out "/tmp/tmp2qhBos: line 4: $'datl\be': command not found"Also for cleanup, wrap this command in its own shell script; for example:
#!/bin/bash
rm -rf temp || true
doitlive session.shI agree a few seem authentic but soon it just feels like a waste of time — and break in the flow of presentation.
I swear I've said these exact words.
If you need to add something because of an audience question you can just insert a new cell.
It looks live and in my opinion better than faffing in a terminal.
You also have the bonus of being able to provide the notebook to your audience after the talk (or they can follow along with you).
https://gist.github.com/bazzargh/a267b97a52f7a1f70c46
some slight differences; doitlive drives recording for you; I used ttyrec, so you get some more natural typing, like me editing the command line. I set it up so events within 20ms are fired by a single keypress; this makes for quicker typing in the replay while letting you insert natural gaps between commands. NB if your command output is slow, you'll need to type to make it replay, which is a bit weird.
The other thing is, I used this to intersperse the 'demo' portions with slides (the slides were just 'echo some text|figlet' recordings). In order to support multiple files like this, at the end of each recording, you need to press 'return' to move forward; but also, you can press backspace to go back to the start of the current script, or if at the start of a script, backspace again will jump to the start of the previous one.
I've done a couple of live presentations in my career (in fact I just did one last Friday). I think they're great for audiences, when the circumstances permit. People connect to the physicality of the typing in a way that looking at some screenshots just doesn't provide.
I found spielbash[1] recently which helps you automate asciinema recordings... though it was a bit broken and I ended up forking it and re-writing most of it [2] and adding a bunch of new features.
There's probably a way to merge the two ideas and have a way to automate live demos as well as have a mode that just spits out a asciinema recording.
[1] https://github.com/redhat-cip/spielbash [2] https://github.com/justinazoff/spielbash
I forked spielbash in order to add an option that lets it read `cloud-init`[1] YAML as input, and also noticed there were opportunities to improve the original. Will see if I can jump over to your fork.
It might also useful for for screencast recording / Youtube tutorial. Bisqwit has his own tool, running on DOS, that does something similar, which mimics him typing code on the editor. (https://www.youtube.com/watch?v=5Da6ZyQJjE0)
https://github.com/narendraj9/dot-emacs/blob/master/packages...
:)
I haven't implemented the next-position function for shell yet.
How is this different/better?
Reminds me of hackertyper: http://hackertyper.com/
Love the effect with a clickety keyboard ;)
First difference seems to be that do it live allows manual control of progressing through the session where as asciinema doesn't.
What else?
This also cannot follow cli sessions. If you open, say, a REPL, you're on your own.
That said, I would love for asciinema to get some "type to progress" capabilities.
But giving it its own extension might be a good idea either way.