Skip to content

Instantly share code, notes, and snippets.

@KurtPfeifle
Last active December 9, 2017 22:00
Show Gist options
  • Save KurtPfeifle/163305395f14733d276e8f358d907eb2 to your computer and use it in GitHub Desktop.
Save KurtPfeifle/163305395f14733d276e8f358d907eb2 to your computer and use it in GitHub Desktop.
First Shot at Markdown Source file for `asciinema` v2.x Manual Page(s)
% ASCIINEMA(1) | asciinema Manual Page for Version 2.0
%
% 2017-12-09
<!-- Generate man, HTML, EPUB or PDF output like so:
# Requires: [Pandoc](https://pandoc.org/), v2.0.x is recommended
# For PDF output with -t latex a LaTeX installation is needed
# For PDF output with -t html5 a wkhtmltopdf installation is needed; you can "style" it with a css.
# For PDF output with -t context a ConTeXt installation is needed
# For HTML, HTML5 or EPUB output you can optionally apply a custom CSS file to the transformation
pandoc asciinema-manpage.markdown.txt -o asciinema-manpage.man -s -f markdown -t man -V footer:"Manual Page Version 0.0.1"
pandoc asciinema-manpage.markdown.txt -o asciinema-manpage-latex.pdf -s -f markdown -t latex -V footer:"Manual Page Version 0.0.1" -V geometry:"margin=1.5cm, paperwidth=595pt, paperheight=297mm"
pandoc asciinema-manpage.markdown.txt -o asciinema-manpage.html -s -f markdown -t html [-c "my.css"]
pandoc asciinema-manpage.markdown.txt -o asciinema-manpage.epub -s -f markdown -t epub3 [-c "my.css"]
pandoc asciinema-manpage.markdown.txt -o asciinema-manpage-wkhtmltopdf.pdf -s -f markdown -t html5 [-c "my.css"]
-->
# NAME
asciinema - terminal session recorder
# SYNOPSIS
**asciinema** *\[-h\] \[--version\] command \[&lt;args&gt;\]*
# DESCRIPTION
Terminal session recorder and the best companion of asciinema.org service.
asciinema is composed of multiple commands, similar to git, apt-get or brew.
When you run asciinema with no arguments help messages is displayed, listing all available commands with their options.
# OPTIONS
`-h`, `--help`
: Display help message
`--version`
: Display version information
# COMMANDS
**rec [&lt;filename&gt;]**
: Record terminal session.
This is the single most important command in asciinema, since it is how you utilize this tool's main job.
By running **asciinema rec** *\[filename\]* you start a new recording session. The command (process) that is recorded can be specified with *-c* option (see below), and defaults to **\$SHELL**
which is what you want in most cases.
Recording finishes when you exit the shell (hit **Ctrl+D** or type *exit*). If the recorded process is not a shell than recording finishes when the process exits.
If the *filename* argument is given then the resulting recording is saved to a local file. It can later be replayed with **asciinema play** *&lt;filename&gt;* and/or uploaded to asciinema.org with
**asciinema upload** *&lt;filename&gt;*. If the *filename* argument is omitted then (after asking for confirmation) the resulting asciicast is uploaded to asciinema.org for further playback in a
web browser.
**ASCIINEMA\_REC=1** is added to recorded process environment variables. This can be used by your shell's config file (*.bashrc*, *.zshrc*) to alter the prompt or play a sound when shell is being
recorded.
Available options:
: &nbsp;
`-c`, `--command`
: specify command to record, defaults to \$SHELL
`-t`
: specify the title of the asciicast
`-w`, `--max-wait`
: reduce recorded terminal inactivity to max &lt;sec&gt; seconds
`-y`, `--yes`
: answer "yes" to all prompts (e.g. upload confirmation)
`-q`, `--quiet`
: be quiet, suppress all notices/warnings (implies -y)
**play &lt;filename&gt;**
: Replay recorded asciicast in a terminal.
This command replays given asciicast (as recorded by *rec* command) directly in your terminal.
When "-" is passed as a filename the asciicast is read from stdin.
NOTE: it is recommended to run it in a terminal of dimensions not smaller than the one used for recording as there's no "transcoding" of control sequences for new terminal size.
Available options:
: &nbsp;
`-w`, `--max-wait`
: reduce replayed terminal inactivity to max *sec* seconds
`-s`, `--speed`
: speed up playback by factor *factor* (can be fractional)
**upload &lt;filename&gt;**
: Upload recorded asciicast to asciinema.org site.
This command uploads given asciicast (as recorded by *rec* command) to asciinema.org for further playback in a web browser.
**asciinema rec** *demo.cast* + **asciinema play** *demo.cast* + **asciinema upload** *demo.cast* is a nice combo for when you want to review an asciicast before publishing it on asciinema.org.
**auth**
: Assign local API token to asciinema.org account.
On every machine you install asciinema recorder, you get a new, unique API token. This command connects this local token with your asciinema.org account, and links all asciicasts recorded on this
machine with the account.
This command displays the URL you should open in your web browser. If you never logged in to asciinema.org then your account will be created when opening the URL.
NOTE: it is **necessary** to do this if you want to edit or delete your recordings on asciinema.org.
You can synchronize your config file (which keeps the API token) across the machines but that's not necessary. You can assign new tokens to your account from as many machines as you want.
# CONTRIBUTING
If you want to contribute to this project check out Contributing page: *<https://asciinema.org/contributing>*
# BUG TRACKER
All your bug reports and feature ideas are highly appreciated as they help to improve the quality and functionality of asciinema for everyone.
As the service is built of several parts there are separate bug trackers:
<https://github.com/asciinema/asciinema/issues>
: issues and ideas for the command line recorder
<https://github.com/asciinema/asciinema-server/issues>
: issues and ideas for the website
<https://github.com/asciinema/asciinema-player/issues>
: issues and ideas for the javascript player
# KNOWN BUGS
Blah... TODO -tbd-
# EXAMPLES
Blah... TODO -tbd-
# ENVIRONMENT VARIABLES
Blah... TODO -tbd-
# FILES
Blah... TODO -tbd-
# DEVELOPERS
Developed with passion by **Marcin Kulik** and great open source contributors.
# AUTHORS
This Manual Page was written by **Marcin Kulik** and was modified by **Kurt Pfeifle**.
@KurtPfeifle
Copy link
Author

Hi Marcin,

I've also generated a tarball (~228 KByte) of the HTML, EPUB, PDF and Manpage files for you to check out the resulting quality.

Uploaded to here: https://send.firefox.com/download/166059f68e/#YOZ4aGRCGtcMSmpsXjsekg
The link will expire after the first download, or after 24 hours. Let's see if some other curious person reading this Gist is faster than you. :) (The password you need to fetch it is your @username on GitHub.)

@ku1ik
Copy link

ku1ik commented Dec 9, 2017

@KurtPfeifle I made it, I was first ;) Thanks for help with this! I'll check out the results and report back, but this looks promising already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment