asciiscript

command module
v0.0.0-...-6d6457a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 11 Imported by: 0

README

asciiscript

Create asciicasts without your fingers getting in the way.

Ever tried to record the perfect demo, but couldn't stop missing keys and having to restart? asciiscript lets you record pre-scripted terminal sessions that look human.

Example

First, create a script.

echo "Hello, world..."
echo "Here's a demo of asciiscript."

# Comments with a '$' are control commands.

#$ delay 100  - Time between keypresses for subsequent commands (milliseconds).
echo "We can type slow..."
#$ delay 10
echo "Or quite fast."

#$ wait 100  - Time between commands for subsequent commands (milliseconds)
sleep 1  && echo "We can wait for output..."
#$ wait 10
echo "Because otherwise, things could get a bit weird."

echo "I hope you like it!"

Then run it with asciinema.

$ asciiscript demo.sh demo.cast

asciicast

Arguments

asciiscript passes on all arguments it receives to asciinema rec, except for the script filename.

Note

There's currently a bug that stops the upload prompt from showing until after you respond to it. Therefore, it's recommended to use asciiscript with a file argument, like so:

$ asciiscript script.sh output.cast
$ asciinema upload output.cast

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL