Skip to content

Instantly share code, notes, and snippets.

@NargiT
Last active April 25, 2019 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NargiT/718d77151ab88f23771d968e5ac3389b to your computer and use it in GitHub Desktop.
Save NargiT/718d77151ab88f23771d968e5ac3389b to your computer and use it in GitHub Desktop.
terminal demo maker

Do a gif

asciinema rec -i 2.5 -c "doitlive play -p nicolauj -q -S /bin/bash session.sh" session.cast
docker run --rm -v $PWD:/data asciinema/asciicast2gif session.cast session.gif

Do a video

asciinema rec -i 2.5 -c "doitlive play -p nicolauj -q -S /bin/bash session.sh" session.cast
curl -sOL https://github.com/asciinema/asciinema-player/releases/download/v2.6.1/asciinema-player.css
curl -sOL https://github.com/asciinema/asciinema-player/releases/download/v2.6.1/asciinema-player.js
echo '
<html>
<head>
  <link rel="stylesheet" type="text/css" href="asciinema-player.css" />
</head>
<body>
  <asciinema-player src="session.cast" poster="npt:0:08" font-size="medium" loop="loop" preload="true" cols="150" title="demo" author="NargiT" author-img-url="https://avatars2.githubusercontent.com/u/3153333" ></asciinema-player>
  <script src="asciinema-player.js"></script>
</body>
</html>
' > session.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment