From caf2695784115ead98839d24f37329d18e7b477f Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Tue, 27 Jun 2023 23:55:53 +0200 Subject: [PATCH] feat: added articles about recording terminal sessions with asciinema --- knowledge base/agg.md | 40 +++++++++++++ knowledge base/asciinema.md | 59 +++++++++++++++++++ knowledge base/log a terminal session.md | 3 - .../log aka record a terminal session.md | 6 ++ 4 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 knowledge base/agg.md create mode 100644 knowledge base/asciinema.md delete mode 100644 knowledge base/log a terminal session.md create mode 100644 knowledge base/log aka record a terminal session.md diff --git a/knowledge base/agg.md b/knowledge base/agg.md new file mode 100644 index 0000000..6a01895 --- /dev/null +++ b/knowledge base/agg.md @@ -0,0 +1,40 @@ +# `agg` + +Command-line tool for generating animated GIF files from asciicast files produced by [Asciinema]. + +## Table of contents + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) +1. [Sources](#sources) + +## TL;DR + +```sh +# Installation. +brew install agg + +# Convert asciicast files from Asciinema. +agg 'path/to/file.cast' 'path/to/file.gif' +``` + +## Further readings + +- [Asciinema] to record terminal sessions + +## Sources + +All the references in the [further readings] section, plus the following: + + + + + +[further readings]: #further-readings + + +[asciinema]: asciinema.md + + diff --git a/knowledge base/asciinema.md b/knowledge base/asciinema.md new file mode 100644 index 0000000..ac7755d --- /dev/null +++ b/knowledge base/asciinema.md @@ -0,0 +1,59 @@ +# Asciinema + +Terminal session recorder. + +## Table of contents + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) +1. [Sources](#sources) + +## TL;DR + +```sh +# Installation. +sudo apt-get install asciinema +brew install 'asciinema' +sudo dnf install 'asciinema' +sudo pacman -S 'asciinema' +python3 -m 'pip' install --user 'asciinema' + +# Record sessions locally. +asciinema rec 'path/to/file.cast' +asciinema rec -i 2 'path/to/file.cast' --overwrite + +# Record sessions and upload them to the website. +asciinema rec + +# Play local sessions. +asciinema play 'path/to/file.cast' + +# Share local recordings on the website. +asciinema upload 'path/to/file.cast' +``` + +## Further readings + +- [Website] +- [Github] +- [`agg`][agg] to convert cast files into GIFs + +## Sources + +All the references in the [further readings] section, plus the following: + + + + +[github]: https://github.com/asciinema/asciinema +[website]: https://asciinema.org/ + + +[further readings]: #further-readings + + +[agg]: agg.md + + diff --git a/knowledge base/log a terminal session.md b/knowledge base/log a terminal session.md deleted file mode 100644 index d8bf6d2..0000000 --- a/knowledge base/log a terminal session.md +++ /dev/null @@ -1,3 +0,0 @@ -# Log (record) a terminal session - -See [`script`](script.md). diff --git a/knowledge base/log aka record a terminal session.md b/knowledge base/log aka record a terminal session.md new file mode 100644 index 0000000..ce8055e --- /dev/null +++ b/knowledge base/log aka record a terminal session.md @@ -0,0 +1,6 @@ +# Log (record) a terminal session + +See: + +- [`script`](script.md) +- [Asciinema](asciinema.md)