Remove old doc pages
parent
403871f089
commit
4cb2ff6750
@ -1,10 +0,0 @@
|
|||||||
class DocsController < ApplicationController
|
|
||||||
layout 'docs'
|
|
||||||
|
|
||||||
rescue_from ActionView::MissingTemplate, with: :handle_not_found
|
|
||||||
|
|
||||||
def show
|
|
||||||
@current_category = params[:page].to_sym
|
|
||||||
render params[:page]
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,2 +0,0 @@
|
|||||||
module DocsHelper
|
|
||||||
end
|
|
@ -1,10 +0,0 @@
|
|||||||
h2 Docs
|
|
||||||
|
|
||||||
= category_links current_category do |categories|
|
|
||||||
= categories.link_to 'How it works', docs_path('how-it-works'), :'how-it-works'
|
|
||||||
= categories.link_to 'Getting started', docs_path('getting-started'), :'getting-started'
|
|
||||||
= categories.link_to 'Installation', docs_path(:installation), :installation
|
|
||||||
= categories.link_to 'Usage', docs_path(:usage), :usage
|
|
||||||
= categories.link_to 'Configuration file', docs_path(:config), :config
|
|
||||||
= categories.link_to 'Sharing & embedding', docs_path(:embedding), :embedding
|
|
||||||
= categories.link_to 'FAQ', docs_path(:faq), :faq
|
|
@ -1,52 +0,0 @@
|
|||||||
<% content_for(:title, 'Configuration file') %>
|
|
||||||
|
|
||||||
# Configuration file
|
|
||||||
|
|
||||||
asciinema uses a config file to keep API token and user settings. In most cases
|
|
||||||
the location of this file is `$HOME/.config/asciinema/config`.
|
|
||||||
|
|
||||||
*NOTE! When you first run `asciinema`, local API token is generated (UUID) and
|
|
||||||
saved in the file (unless the file already exists).*
|
|
||||||
|
|
||||||
The auto-generated, minimal config file looks like this:
|
|
||||||
|
|
||||||
[api]
|
|
||||||
token = <your-api-token-here>
|
|
||||||
|
|
||||||
There are several options you can set in this file. Here's a config with all
|
|
||||||
available options set:
|
|
||||||
|
|
||||||
[api]
|
|
||||||
token = <your-api-token-here>
|
|
||||||
url = https://asciinema.example.com
|
|
||||||
|
|
||||||
[record]
|
|
||||||
command = /bin/bash -l
|
|
||||||
maxwait = 2
|
|
||||||
yes = true
|
|
||||||
quiet = true
|
|
||||||
|
|
||||||
[play]
|
|
||||||
maxwait = 1
|
|
||||||
|
|
||||||
The options in `[api]` section are related to API location and authentication.
|
|
||||||
To tell asciinema recorder to use your own asciinema site instance rather than
|
|
||||||
the default one (asciinema.org), you can set `url` option. API URL can also be
|
|
||||||
passed via `ASCIINEMA_API_URL` environment variable.
|
|
||||||
|
|
||||||
The options in `[record]` and `[play]` sections have the same meaning as the
|
|
||||||
options you pass to `asciinema rec`/`asciinema play` command (see [Usage](<%= docs_path(:usage) %>)). If you happen to
|
|
||||||
often use either `-c`, `-w` or `-y` with these commands then consider saving it
|
|
||||||
as a default in the config file.
|
|
||||||
|
|
||||||
## Configuration file locations
|
|
||||||
|
|
||||||
In fact, the following locations are checked for the presence of the config
|
|
||||||
file (in the given order):
|
|
||||||
|
|
||||||
* `$ASCIINEMA_CONFIG_HOME/config` - if you have set `$ASCIINEMA_CONFIG_HOME`
|
|
||||||
* `$XDG_CONFIG_HOME/asciinema/config` - on Linux, `$XDG_CONFIG_HOME` usually points to `$HOME/.config/`
|
|
||||||
* `$HOME/.config/asciinema/config` - in most cases it's here
|
|
||||||
* `$HOME/.asciinema/config` - created by asciinema versions prior to 1.1
|
|
||||||
|
|
||||||
The first found is used.
|
|
@ -1,159 +0,0 @@
|
|||||||
<% content_for(:title, 'Sharing & embedding') %>
|
|
||||||
|
|
||||||
# Sharing & embedding
|
|
||||||
|
|
||||||
You can share any recording by copying its URL and sending it to a friend or
|
|
||||||
posting it on a social network. asciinema.org supports oEmbed/Open Graph/Twitter
|
|
||||||
Card protocols, displaying a nice thumbnail where possible.
|
|
||||||
|
|
||||||
You can also easily embedded an asciicast on any HTML page. If you want to put a
|
|
||||||
recording in a blog post, project's documentation or in a conference talk
|
|
||||||
slides, you can do it by copy-pasting one of the the embed scripts.
|
|
||||||
|
|
||||||
## Sharing a link
|
|
||||||
|
|
||||||
You can get the share link for a specific asciicast by clicking on "Share" link
|
|
||||||
on asciicast page.
|
|
||||||
|
|
||||||
Any of the options listed in "Customizing the playback" section below can be
|
|
||||||
appended to the asciicast URL as the query params, e.g.:
|
|
||||||
|
|
||||||
https://asciinema.org/a/14?t=25&speed=2&theme=solarized-dark
|
|
||||||
|
|
||||||
Visiting this link will start the playback at 25s and play at double speed,
|
|
||||||
using Solarized Dark terminal theme.
|
|
||||||
|
|
||||||
## Embedding image link
|
|
||||||
|
|
||||||
Embedding as an image link is useful in places where scripts are not allowed,
|
|
||||||
e.g. in a project's README file.
|
|
||||||
|
|
||||||
You can get the embed snippets for a specific asciicast by clicking on "Share"
|
|
||||||
link on asciicast page.
|
|
||||||
|
|
||||||
This is how they look for asciicast 14:
|
|
||||||
|
|
||||||
HTML:
|
|
||||||
|
|
||||||
<a href="https://asciinema.org/a/14"><img src="https://asciinema.org/a/14.png" width="836"/></a>
|
|
||||||
|
|
||||||
Markdown:
|
|
||||||
|
|
||||||
[![asciicast](https://asciinema.org/a/14.png)](https://asciinema.org/a/14)
|
|
||||||
|
|
||||||
You can pass extra options (listed in "Customizing the playback" below) to the
|
|
||||||
linked URL as query params. For example, to start the playback automatically
|
|
||||||
when opening linked asciicast page append `?autoplay=1` to the asciicast URL in
|
|
||||||
`href` attribute:
|
|
||||||
|
|
||||||
<a href="https://asciinema.org/a/14?autoplay=1"><img src="https://asciinema.org/a/14.png" width="836"/></a>
|
|
||||||
|
|
||||||
## Embedding the player
|
|
||||||
|
|
||||||
If you're embedding on your own page or on a site which permits script tags, you
|
|
||||||
can use the full player widget.
|
|
||||||
|
|
||||||
You can get the widget script for a specific asciicast by clicking on "Embed"
|
|
||||||
link on asciicast page.
|
|
||||||
|
|
||||||
It looks like this:
|
|
||||||
|
|
||||||
<script type="text/javascript" src="https://asciinema.org/a/14.js" id="asciicast-14" async></script>
|
|
||||||
|
|
||||||
The player shows up right at the place where the script is pasted. Let's look
|
|
||||||
at the following markup:
|
|
||||||
|
|
||||||
<p>This is some text.</p>
|
|
||||||
<script type="text/javascript" src="https://asciinema.org/a/14.js" id="asciicast-14" async></script>
|
|
||||||
<p>This is some other text.</p>
|
|
||||||
|
|
||||||
The player is displayed between the two paragraphs, as a `div` element with
|
|
||||||
"asciicast" class.
|
|
||||||
|
|
||||||
The embed script supports all customization options (see the section below). An
|
|
||||||
option can be specified by adding it as a
|
|
||||||
<code>data-<em>option-name</em>="<em>value</em>"</code> attribute to the script
|
|
||||||
tag.
|
|
||||||
|
|
||||||
For example, to make the embedded player auto start playback when loaded and use
|
|
||||||
big font, use the following script:
|
|
||||||
|
|
||||||
<script type="text/javascript" src="https://asciinema.org/a/14.js" id="asciicast-14" async data-autoplay="true" data-size="big"></script>
|
|
||||||
|
|
||||||
## Customizing the playback
|
|
||||||
|
|
||||||
The player supports several options that control the behavior and look of it.
|
|
||||||
Append them to the URL (`?speed=2&theme=tango`) or set them as data attributes
|
|
||||||
on embed script (`data-speed="2" data-theme="tango"`).
|
|
||||||
|
|
||||||
### t
|
|
||||||
|
|
||||||
The `t` option specifies the time at which the playback should start. The
|
|
||||||
default is `t=0` (play from the beginning).
|
|
||||||
|
|
||||||
Accepted formats: `ss`, `mm:ss`, `hh:mm:ss`.
|
|
||||||
|
|
||||||
NOTE: when `t` is specified then `autoplay=1` is implied. To prevent the player
|
|
||||||
from starting automatically when `t` option is set you have to explicitly set
|
|
||||||
`autoplay=0`.
|
|
||||||
|
|
||||||
### autoplay
|
|
||||||
|
|
||||||
The `autoplay` option controls whether the playback should automatically start
|
|
||||||
when the player loads. Accepted values:
|
|
||||||
|
|
||||||
* 0 / false - do not start playback automatically (default)
|
|
||||||
* 1 / true - start playback automatically
|
|
||||||
|
|
||||||
### preload
|
|
||||||
|
|
||||||
The `preload` option controls whether the player should immediately start
|
|
||||||
fetching the recording.
|
|
||||||
|
|
||||||
* 0 / false - do not preload the recording, wait for user action
|
|
||||||
* 1 / true - preload the recording
|
|
||||||
|
|
||||||
Defaults to 1 for asciinema.org URLs, to 0 for embed script.
|
|
||||||
|
|
||||||
### loop
|
|
||||||
|
|
||||||
The `loop` option allows for looping the playback. This option is usually
|
|
||||||
combined with `autoplay` option. Accepted values:
|
|
||||||
|
|
||||||
* 0 / false - disable looping (default)
|
|
||||||
* 1 / true - enable looping
|
|
||||||
|
|
||||||
### speed
|
|
||||||
|
|
||||||
The `speed` option alters the playback speed. The default speed is 1 which
|
|
||||||
means it plays at the unaltered, original speed.
|
|
||||||
|
|
||||||
### size
|
|
||||||
|
|
||||||
The `size` option alters the size of the terminal font. There are 3 available
|
|
||||||
sizes:
|
|
||||||
|
|
||||||
* small (default)
|
|
||||||
* medium
|
|
||||||
* big
|
|
||||||
|
|
||||||
### theme
|
|
||||||
|
|
||||||
The `theme` option allows overriding a theme used for the terminal. It defaults
|
|
||||||
to a theme set by the asciicast author (or to "asciinema" if not set by the
|
|
||||||
author). The available themes are:
|
|
||||||
|
|
||||||
* asciinema
|
|
||||||
* tango
|
|
||||||
* solarized-dark
|
|
||||||
* solarized-light
|
|
||||||
* monokai
|
|
||||||
|
|
||||||
## oEmbed / Open Graph / Twitter Card
|
|
||||||
|
|
||||||
asciinema supports [oEmbed](http://oembed.com/), [Open Graph](http://ogp.me/)
|
|
||||||
and [Twitter Card](https://dev.twitter.com/cards/overview) APIs. When you share
|
|
||||||
an asciicast on Twitter, Slack, Facebook, Google+ or any other site which
|
|
||||||
supports one of these APIs, the asciicast is presented in a rich form (usually
|
|
||||||
with a title, author, description and a thumbnail image), linking to your
|
|
||||||
recording on asciinema.org.
|
|
@ -1,87 +0,0 @@
|
|||||||
<% content_for(:title, 'FAQ') %>
|
|
||||||
|
|
||||||
# Frequently Asked Questions
|
|
||||||
|
|
||||||
## How is it pronounced?
|
|
||||||
|
|
||||||
_[as-kee-nuh-muh]_.
|
|
||||||
|
|
||||||
The word “asciinema” is a combination of English “ASCII” and Ancient Greek
|
|
||||||
“κίνημα” (kínēma, “movement”).
|
|
||||||
|
|
||||||
## Why am I getting `command not found` at the begining of the recording session?
|
|
||||||
|
|
||||||
When recording asciinema starts new shell instance (as indicated by `$SHELL`
|
|
||||||
environment variable) by default. It invokes `exec $SHELL`, which in most
|
|
||||||
cases translates to `exec /bin/bash` or `exec /bin/zsh`. This means the shell
|
|
||||||
runs as an "interactive shell", but **not as a "login shell"**.
|
|
||||||
|
|
||||||
If you have functions and/or other shell configuration defined in either
|
|
||||||
`.bash_profile`, `.zprofile` or `.profile` file they are not loaded unless the
|
|
||||||
shell is started as a login shell.
|
|
||||||
|
|
||||||
Some terminal emulators do that (passing "-l" option to the shell command-line),
|
|
||||||
some don't. asciinema doesn't.
|
|
||||||
|
|
||||||
Worry not, you have several options. You can:
|
|
||||||
|
|
||||||
* move this part of configuration to `.bashrc/.zshrc`,
|
|
||||||
* record with `asciinema rec -c "/bin/bash -l"` or,
|
|
||||||
* add the following setting to your `$HOME/.config/asciinema/config` file:
|
|
||||||
|
|
||||||
[record]
|
|
||||||
command= /bin/bash -l
|
|
||||||
|
|
||||||
## Why my shell prompt/theme isn't working during recording?
|
|
||||||
|
|
||||||
See above.
|
|
||||||
|
|
||||||
## Why some of my custom shell functions are not available during recording?
|
|
||||||
|
|
||||||
See above.
|
|
||||||
|
|
||||||
## Does it record the passwords I type during recording?
|
|
||||||
|
|
||||||
asciinema records only terminal output - everything that you can actually see
|
|
||||||
in a terminal window. It doesn't record input (keys pressed). Some
|
|
||||||
applications turn off "echo mode" when asking for a password, and because
|
|
||||||
the passwords are not visible they are not recorded. Some applications
|
|
||||||
display star characters instead of real characters and asciinema records
|
|
||||||
only "******". However, some applications don't have any precautions and
|
|
||||||
the actual password is visible to the user, and thus recorded by asciinema.
|
|
||||||
|
|
||||||
## Can I embed the asciicast player on my blog?
|
|
||||||
|
|
||||||
Yes, see [embedding docs](<%= docs_path(:embedding) %>).
|
|
||||||
|
|
||||||
## How can I delete my asciicast?
|
|
||||||
|
|
||||||
In order to delete your asciicast you need to associate your local API token
|
|
||||||
(which was assigned to the recorded asciicast) with the asciinema.org
|
|
||||||
account. Just run `asciinema auth` in your terminal and open the printed URL
|
|
||||||
in your browser. Once you sign in you'll see a "Delete" link on your
|
|
||||||
asciicast's page.
|
|
||||||
|
|
||||||
## Can I have my own asciinema site instance?
|
|
||||||
|
|
||||||
Yes, you can set up your own asciinema site. The source code of the app that
|
|
||||||
runs asciinema.org is available
|
|
||||||
[here](https://github.com/asciinema/asciinema.org).
|
|
||||||
|
|
||||||
When you have the site up and running you can easily tell asciinema client to
|
|
||||||
use it by adding following setting to _~/.config/asciinema/config_ file:
|
|
||||||
|
|
||||||
[api]
|
|
||||||
url = http://asciinema.example.com
|
|
||||||
|
|
||||||
Alternatively, you can set `ASCIINEMA_API_URL` env variable:
|
|
||||||
|
|
||||||
ASCIINEMA_API_URL=http://asciinema.example.com asciinema rec
|
|
||||||
|
|
||||||
## Can I edit/post-process the recorded asciicast?
|
|
||||||
|
|
||||||
Yes, if you know how to deal with [ansi escape
|
|
||||||
sequences](https://en.wikipedia.org/wiki/ANSI_escape_code). Asciicasts are
|
|
||||||
self-contained JSON files which you can edit before uploading. Look at
|
|
||||||
`stdout` attribute in [asciicast format doc](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md)
|
|
||||||
for inspiration.
|
|
@ -1,31 +0,0 @@
|
|||||||
<% content_for(:title, 'Getting started') %>
|
|
||||||
|
|
||||||
# Getting started
|
|
||||||
|
|
||||||
## 1. Install the recorder
|
|
||||||
|
|
||||||
<%= render partial: "docs/quick_install" %>
|
|
||||||
|
|
||||||
## 2. Record
|
|
||||||
|
|
||||||
To start recording run the following command:
|
|
||||||
|
|
||||||
asciinema rec
|
|
||||||
|
|
||||||
This spawns a new shell instance and records all terminal output.
|
|
||||||
When you're ready to finish simply exit the shell either by typing `exit` or
|
|
||||||
hitting <kbd>Ctrl-D</kdb>.
|
|
||||||
|
|
||||||
See [usage instructions](<%= docs_path(:usage) %>) to learn about all commands and options.
|
|
||||||
|
|
||||||
## 3. Manage your recordings (optional)
|
|
||||||
|
|
||||||
If you want to manage your recordings on asciinema.org (set title/description,
|
|
||||||
delete etc) you need to authenticate. Run the following command and open
|
|
||||||
displayed URL in your web browser:
|
|
||||||
|
|
||||||
asciinema auth
|
|
||||||
|
|
||||||
If you skip this step now, you can run the above command later and all
|
|
||||||
previously recorded asciicasts will automatically get assigned to your
|
|
||||||
profile.
|
|
@ -1,76 +0,0 @@
|
|||||||
<% content_for(:title, 'How it works') %>
|
|
||||||
|
|
||||||
# How it works
|
|
||||||
|
|
||||||
asciinema project is built of several complementary pieces:
|
|
||||||
|
|
||||||
* command-line based terminal session recorder, `asciinema`,
|
|
||||||
* website with an API at asciinema.org,
|
|
||||||
* javascript player
|
|
||||||
|
|
||||||
When you run `asciinema rec` in your terminal the recording starts, capturing
|
|
||||||
all output that is being printed to your terminal while you're issuing the
|
|
||||||
shell commands. When the recording finishes (by hitting <kbd>Ctrl-D</kbd> or
|
|
||||||
typing `exit`) then the captured output is uploaded to asciinema.org website
|
|
||||||
and prepared for playback on the web.
|
|
||||||
|
|
||||||
Here's a brief overview of how these parts work.
|
|
||||||
|
|
||||||
## Recording
|
|
||||||
|
|
||||||
You probably know `ssh`, `screen` or `script` command. Actually, asciinema
|
|
||||||
was inspired by `script` (and `scriptreplay`) commands. What you may not know
|
|
||||||
is they all use the same UNIX system capability: [a
|
|
||||||
pseudo-terminal](http://en.wikipedia.org/wiki/Pseudo_terminal).
|
|
||||||
|
|
||||||
> A pseudo terminal is a pair of pseudo-devices, one of which, the slave,
|
|
||||||
> emulates a real text terminal device, the other of which, the master,
|
|
||||||
> provides the means by which a terminal emulator process controls the slave.
|
|
||||||
|
|
||||||
Here's how terminal emulator interfaces with a user and a shell:
|
|
||||||
|
|
||||||
> The role of the terminal emulator process is to interact with the user; to
|
|
||||||
> feed text input to the master pseudo-device for use by the shell (which is
|
|
||||||
> connected to the slave pseudo-device) and to read text output from the
|
|
||||||
> master pseudo-device and show it to the user.
|
|
||||||
|
|
||||||
In other words, pseudo-terminals give programs the ability to act as a
|
|
||||||
middlemen between the user, the display and the shell. It allows for
|
|
||||||
transparent capture of user input (keyboard) and terminal output (display).
|
|
||||||
`screen` command utilizes it for capturing special keyboard shortcuts like
|
|
||||||
<kbd>Ctrl-A</kbd> and altering the output in order to display window
|
|
||||||
numbers/names and other messages.
|
|
||||||
|
|
||||||
asciinema recorder does its job by utilizing pseudo-terminal for capturing all
|
|
||||||
the output that goes to a terminal and saving it in memory (together with timing
|
|
||||||
information). The captured output includes all the text and invisible
|
|
||||||
escape/control sequences in a raw, unaltered form. When the recording session
|
|
||||||
finishes it uploads the output (in
|
|
||||||
[asciicast format](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md))
|
|
||||||
to asciinema.org. That's all about "recording" part.
|
|
||||||
|
|
||||||
For the implementation details check out [recorder source
|
|
||||||
code](https://github.com/asciinema/asciinema).
|
|
||||||
|
|
||||||
## Playback
|
|
||||||
|
|
||||||
As the recording is a raw stream of text and control
|
|
||||||
sequences it can't be just played by incrementally printing text in proper
|
|
||||||
intervals. It requires interpretation of [ANSI escape code
|
|
||||||
sequences](http://en.wikipedia.org/wiki/ANSI_escape_code) in order to
|
|
||||||
correctly display color changes, cursor movement and printing text at proper
|
|
||||||
places on the screen.
|
|
||||||
|
|
||||||
The player comes with its own terminal emulator based on
|
|
||||||
[Paul Williams' parser for ANSI-compatible video terminals](http://vt100.net/emu/dec_ansi_parser).
|
|
||||||
It covers only the display part of the emulation as this is what the player is
|
|
||||||
about (input is handled by your terminal+shell at the time of recording anyway)
|
|
||||||
and its handling of escape sequences is fully compatible with most modern
|
|
||||||
terminal emulators like xterm, Gnome Terminal, iTerm, mosh etc.
|
|
||||||
|
|
||||||
The end result is a smooth animation with all text attributes (bold,
|
|
||||||
underline, inverse, ...) and 256 colors perfectly rendered.
|
|
||||||
|
|
||||||
For the implementation details check out [asciinema.org website source
|
|
||||||
code](https://github.com/asciinema/asciinema.org) and [player source
|
|
||||||
code](https://github.com/asciinema/asciinema-player).
|
|
@ -1,125 +0,0 @@
|
|||||||
<% content_for(:title, 'Installation') %>
|
|
||||||
|
|
||||||
# Installation
|
|
||||||
|
|
||||||
There are several ways to get asciinema recorder:
|
|
||||||
|
|
||||||
- [Installing via Pip](#installing-via-pip)
|
|
||||||
- [Installing on Linux](#installing-on-linux)
|
|
||||||
- [Installing on Linux as snap](#installing-on-linux-as-snap) (universal Linux package)
|
|
||||||
- [Installing on macOS](#installing-on-macos)
|
|
||||||
- [Installing on FreeBSD](#installing-on-freebsd)
|
|
||||||
- [Installing on OpenBSD](#installing-on-openbsd)
|
|
||||||
- [Running in Docker container](#running-in-docker-container)
|
|
||||||
- [Running from source](#running-from-source)
|
|
||||||
|
|
||||||
If you use other operating system and you can build a native package for it then
|
|
||||||
don't hesitate, do it and let us know. We have [Github
|
|
||||||
issue](https://github.com/asciinema/asciinema/issues/116) where we track new
|
|
||||||
releases and packaging progress.
|
|
||||||
|
|
||||||
## Installing via Pip
|
|
||||||
|
|
||||||
asciinema is available on [PyPI](https://pypi.python.org/pypi/asciinema) and can
|
|
||||||
be installed with pip (Python 3 required):
|
|
||||||
|
|
||||||
sudo pip3 install asciinema
|
|
||||||
|
|
||||||
This is the universal installation method for all operating systems, which
|
|
||||||
always provides the latest version.
|
|
||||||
|
|
||||||
## Installing on Linux
|
|
||||||
|
|
||||||
### Arch Linux
|
|
||||||
|
|
||||||
pacman -S asciinema
|
|
||||||
|
|
||||||
### Debian
|
|
||||||
|
|
||||||
sudo apt-get install asciinema
|
|
||||||
|
|
||||||
### Fedora
|
|
||||||
|
|
||||||
For Fedora < 22:
|
|
||||||
|
|
||||||
sudo yum install asciinema
|
|
||||||
|
|
||||||
For Fedora >= 22:
|
|
||||||
|
|
||||||
sudo dnf install asciinema
|
|
||||||
|
|
||||||
### Gentoo Linux
|
|
||||||
|
|
||||||
emerge -av asciinema
|
|
||||||
|
|
||||||
### NixOS / Nix
|
|
||||||
|
|
||||||
nix-env -i asciinema
|
|
||||||
|
|
||||||
### openSUSE
|
|
||||||
|
|
||||||
zypper in asciinema
|
|
||||||
|
|
||||||
### Ubuntu
|
|
||||||
|
|
||||||
sudo apt-add-repository ppa:zanchey/asciinema
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install asciinema
|
|
||||||
|
|
||||||
## Installing on Linux as snap
|
|
||||||
|
|
||||||
Install asciinema in seconds on [Ubuntu and other snap supported Linux distributions](https://snapcraft.io/docs/core/install) with:
|
|
||||||
|
|
||||||
snap install asciinema --classic
|
|
||||||
|
|
||||||
Installing a snap is very quick. Snaps contain all necessary dependencies required to run. The snap will get automatically updated when a new version is pushed to the store.
|
|
||||||
|
|
||||||
## Installing on macOS
|
|
||||||
|
|
||||||
### Homebrew
|
|
||||||
|
|
||||||
<%= render 'install_homebrew' %>
|
|
||||||
|
|
||||||
### MacPorts
|
|
||||||
|
|
||||||
sudo port selfupdate && sudo port install asciinema
|
|
||||||
|
|
||||||
### Nix
|
|
||||||
|
|
||||||
nix-env -i asciinema
|
|
||||||
|
|
||||||
## Installing on FreeBSD
|
|
||||||
|
|
||||||
### Ports
|
|
||||||
|
|
||||||
cd /usr/ports/textproc/asciinema && make install
|
|
||||||
|
|
||||||
### Packages
|
|
||||||
|
|
||||||
pkg install asciinema
|
|
||||||
|
|
||||||
## Installing on OpenBSD
|
|
||||||
|
|
||||||
pkg_add asciinema
|
|
||||||
|
|
||||||
## Running in Docker container
|
|
||||||
|
|
||||||
asciinema Docker image is based on Ubuntu 16.04 and has the latest version of
|
|
||||||
asciinema recorder pre-installed.
|
|
||||||
|
|
||||||
docker pull asciinema/asciinema
|
|
||||||
|
|
||||||
When running it don't forget to allocate a pseudo-TTY (`-t`), keep STDIN open
|
|
||||||
(`-i`) and mount config directory volume (`-v`):
|
|
||||||
|
|
||||||
docker run --rm -ti -v "$HOME/.config/asciinema":/root/.config/asciinema asciinema/asciinema
|
|
||||||
|
|
||||||
## Running from source
|
|
||||||
|
|
||||||
If none of the above works for you (or you want to help with development) just
|
|
||||||
clone the repo and run latest version of asciinema straight from the master
|
|
||||||
branch:
|
|
||||||
|
|
||||||
git clone https://github.com/asciinema/asciinema.git
|
|
||||||
cd asciinema
|
|
||||||
python3 -m asciinema --version
|
|
@ -1,112 +0,0 @@
|
|||||||
<% content_for(:title, 'Usage') %>
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
|
|
||||||
asciinema is composed of multiple commands, similar to `git`, `apt-get` or
|
|
||||||
`brew`.
|
|
||||||
|
|
||||||
When you run `asciinema` with no arguments help message is displayed, listing
|
|
||||||
all available commands with their options.
|
|
||||||
|
|
||||||
## `rec [filename]`
|
|
||||||
|
|
||||||
__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 <kbd>Ctrl+D</kbd> or type
|
|
||||||
`exit`). If the recorded process is not a shell then recording finishes when
|
|
||||||
the process exits.
|
|
||||||
|
|
||||||
If the `filename` argument is given then the resulting recording (called
|
|
||||||
[asciicast](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md))
|
|
||||||
is saved to a local file. It can later be replayed with `asciinema play
|
|
||||||
<filename>` and/or uploaded to asciinema.org with `asciinema upload
|
|
||||||
<filename>`. 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:
|
|
||||||
|
|
||||||
* `-c, --command=<command>` - Specify command to record, defaults to $SHELL
|
|
||||||
* `-t, --title=<title>` - Specify the title of the asciicast
|
|
||||||
* `-w, --max-wait=<sec>` - Reduce recorded terminal inactivity to max <sec> seconds
|
|
||||||
* `-y, --yes` - Answer "yes" to all prompts (e.g. upload confirmation)
|
|
||||||
* `-q, --quiet` - Be quiet, suppress all notices/warnings (implies -y)
|
|
||||||
|
|
||||||
## `play <filename>`
|
|
||||||
|
|
||||||
__Replay recorded asciicast in a terminal.__
|
|
||||||
|
|
||||||
This command replays given asciicast (as recorded by `rec` command) directly in
|
|
||||||
your terminal.
|
|
||||||
|
|
||||||
Playing from a local file:
|
|
||||||
|
|
||||||
asciinema play /path/to/asciicast.json
|
|
||||||
|
|
||||||
Playing from HTTP(S) URL:
|
|
||||||
|
|
||||||
asciinema play https://asciinema.org/a/22124.json
|
|
||||||
asciinema play http://example.com/demo.json
|
|
||||||
|
|
||||||
Playing from asciicast page URL (requires `<link rel="alternate"
|
|
||||||
type="application/asciicast+json" href="....json">` in page's HTML):
|
|
||||||
|
|
||||||
asciinema play https://asciinema.org/a/22124
|
|
||||||
asciinema play http://example.com/blog/post.html
|
|
||||||
|
|
||||||
Playing from stdin:
|
|
||||||
|
|
||||||
cat /path/to/asciicast.json | asciinema play -
|
|
||||||
ssh user@host cat asciicast.json | asciinema play -
|
|
||||||
|
|
||||||
Playing from IPFS:
|
|
||||||
|
|
||||||
asciinema play ipfs:/ipfs/QmcdXYJp6e4zNuimuGeWPwNMHQdxuqWmKx7NhZofQ1nw2V
|
|
||||||
asciinema play fs:/ipfs/QmcdXYJp6e4zNuimuGeWPwNMHQdxuqWmKx7NhZofQ1nw2V
|
|
||||||
|
|
||||||
Available options:
|
|
||||||
|
|
||||||
* `-w, --max-wait=<sec>` - Reduce replayed terminal inactivity to max <sec> seconds
|
|
||||||
|
|
||||||
NOTE: it is recommended to run `asciinema play` 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.
|
|
||||||
|
|
||||||
## `upload <filename>`
|
|
||||||
|
|
||||||
__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.json` + `asciinema play demo.json` + `asciinema upload
|
|
||||||
demo.json` is a nice combo for when you want to review an asciicast before
|
|
||||||
publishing it on asciinema.org.
|
|
||||||
|
|
||||||
## `auth`
|
|
||||||
|
|
||||||
__Manage recordings on asciinema.org account.__
|
|
||||||
|
|
||||||
If you want to manage your recordings on asciinema.org (set title/description,
|
|
||||||
delete etc) you need to authenticate. This command displays the URL you should
|
|
||||||
open in your web browser to do that.
|
|
||||||
|
|
||||||
On every machine you run asciinema recorder, you get a new, unique API token. If
|
|
||||||
you're already logged in on asciinema.org website and you run `asciinema auth`
|
|
||||||
from a new computer then this new device will be linked to your account.
|
|
||||||
|
|
||||||
You can synchronize your [config file](<%= docs_path(:config) %>) (which keeps
|
|
||||||
the API token) across the machines so all of them use the same token, but that's
|
|
||||||
not necessary. You can assign new tokens to your account from as many machines
|
|
||||||
as you want.
|
|
@ -1,10 +0,0 @@
|
|||||||
- content_for :content do
|
|
||||||
- cache do
|
|
||||||
.container
|
|
||||||
.row
|
|
||||||
.col-md-3
|
|
||||||
= render 'docs_topics', current_category: @current_category
|
|
||||||
.col-md-9
|
|
||||||
= yield
|
|
||||||
|
|
||||||
= render :template => 'layouts/application'
|
|
@ -1,5 +0,0 @@
|
|||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
describe DocsController do
|
|
||||||
|
|
||||||
end
|
|
@ -1,65 +0,0 @@
|
|||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
feature "Docs" do
|
|
||||||
|
|
||||||
scenario 'Visiting "how it works" page' do
|
|
||||||
visit docs_path('how-it-works')
|
|
||||||
|
|
||||||
within('.main') do
|
|
||||||
expect(page).to have_content('How it works')
|
|
||||||
end
|
|
||||||
|
|
||||||
expect_doc_links
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario 'Visiting "getting started" page' do
|
|
||||||
visit docs_path('getting-started')
|
|
||||||
|
|
||||||
within('.main') do
|
|
||||||
expect(page).to have_content('Getting started')
|
|
||||||
end
|
|
||||||
|
|
||||||
expect_doc_links
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario 'Visiting installation page' do
|
|
||||||
visit docs_path(:installation)
|
|
||||||
|
|
||||||
within('.main') do
|
|
||||||
expect(page).to have_content('Installation')
|
|
||||||
end
|
|
||||||
|
|
||||||
expect_doc_links
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario 'Visiting usage page' do
|
|
||||||
visit docs_path(:usage)
|
|
||||||
|
|
||||||
within('.main') do
|
|
||||||
expect(page).to have_content('Usage')
|
|
||||||
end
|
|
||||||
|
|
||||||
expect_doc_links
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario 'Visiting embedding page' do
|
|
||||||
visit docs_path(:embedding)
|
|
||||||
|
|
||||||
within('.main') do
|
|
||||||
expect(page).to have_content('Embedding')
|
|
||||||
end
|
|
||||||
|
|
||||||
expect_doc_links
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario 'Visiting FAQ page' do
|
|
||||||
visit docs_path(:faq)
|
|
||||||
|
|
||||||
within('.main') do
|
|
||||||
expect(page).to have_content('Frequently Asked Questions')
|
|
||||||
end
|
|
||||||
|
|
||||||
expect_doc_links
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
Loading…
Reference in New Issue