[HN Gopher] Make your CLI demos a breeze with zero stress and ze...
___________________________________________________________________
Make your CLI demos a breeze with zero stress and zero mistakes
Author : heinzm
Score : 97 points
Date : 2023-04-04 14:14 UTC (1 days ago)
(HTM) web link (martinheinz.dev)
(TXT) w3m dump (martinheinz.dev)
| jack_riminton wrote:
| Would be nice to have some realistic variations in typing speeds
| as well as realistic key sound affects too :)
| brainzap wrote:
| I just record it with the OS screen recording tool.
| debarshri wrote:
| Asciicinema [1] is stil the most robust terminal capture I have
| seen.
|
| [1] https://asciinema.org/
| denvaar wrote:
| Why not use the built in `script` program?
| https://man7.org/linux/man-pages/man1/script.1.html
| sdsd wrote:
| How is it possible, that I've worked as a Linux sysadmin,
| backend engineer, security developer, and technical writer
| (regularly sharing CLI snippets in articles), and regularly
| document my CLI work on my blog, and I'm just learning about
| this.
|
| Thank you for this comment lol
| tyingq wrote:
| It's called "script" and it's default output file is called
| "typescript". Makes it pretty hard to Google for :)
| avgcorrection wrote:
| Because the CLI is not discoverable. :)
| simmonmt wrote:
| script seems to require you to type the demo commands perfectly
| and at the right pace for the demo. That openssl command, for
| example. Contrast with this tool, where you can get the command
| right at your leisure then apply magic to look like it's being
| typed in interactively. The two steps (running commands,
| interactive typing with desired timing) are much easier to get
| right separately than together.
| tyingq wrote:
| It can export timing data that you can tweak. Pretty manual,
| though it does work.
| gglitch wrote:
| I'm sure the linked tools are awesome, but if I were trying to in
| some way stage a "live" demo, I'd first check Expect.
| seedie wrote:
| For live demos "its a live" [0] by @stavros is also great.
|
| From the Readme:
|
| _It 's a Live lets you write commands and keystrokes in a
| file, which it will then read and open a new terminal for you.
| Every time you press a key, It's a Live will write one
| character from the file into the terminal, making it look like
| you're typing every single command with the practiced ease of a
| consummate professional._
|
| [0] https://gitlab.com/stavros/itsalive
| eterps wrote:
| This looks nice, but if there is a script anyway isn't making an
| animated GIF of it a relatively poor use of capabilities? Why not
| have a result that is able to go backward and forward (like a
| slideshow), the ability to pause/resume, or to copy/paste text
| from it.
| Dzugaru wrote:
| He actually mentions the tool [0] that has all of this, in the
| end. It records your screen and compiles a demo that runs in
| any browser by the looks of it.
|
| [0] https://www.terminalizer.com
| tsukurimashou wrote:
| looks very similar to https://asciinema.org/
| chrisweekly wrote:
| Thanks for sharing! Good post, useful libs explained well.
| amtamt wrote:
| https://asciinema.org/ can do this pretty well too.
| ivanche wrote:
| If I'm not mistaken, asciinema covers only the second part of
| the article, i.e., recording. It can't do or control the actual
| demo.
| amtamt wrote:
| Full demo can be recorded and edited to add/ remove parts.
| Also, there is a js player that can be used to provide video
| player like user interface.
| esposito wrote:
| An ASCII enema sounds very uncomfortable.
| sjg wrote:
| I recently used VHS for this https://github.com/charmbracelet/vhs
| - nice set of tools there to do various cli stuff
| zachallaun wrote:
| Same, I've been working on a command line tool and set up VCR
| to record demos (https://github.com/zachallaun/mneme/blob/main/
| examples/demo....). I'd be very interested if anyone could
| speak to the fundamental differences between VCR and the tools
| referenced in the OP.
___________________________________________________________________
(page generated 2023-04-05 23:02 UTC)