Fix merge conflicts in README

This commit is contained in:
Davis Schirmer
2022-02-12 15:53:53 -05:00
4 changed files with 51 additions and 36 deletions

View File

@@ -27,12 +27,12 @@ However, as this is an open-source project maintained by a small team of volunte
## Proposing features/changes (pull requests)
If you want to propose code change, either introducing a new feature or improving an existing one, please first discuss this with asciinema team. You can simply open a separate issue for a discussion or join #asciinema IRC channel on freenode.
If you want to propose code change, either introducing a new feature or improving an existing one, please first discuss this with asciinema team. You can simply open a separate issue for a discussion or join #asciinema IRC channel on Libera.Chat.
## Asking for help
Github issue tracker is not a support forum.
If you need help then either join #asciinema IRC channel on freenode or drop us an email at support@asciinema.org.
If you need help then either join #asciinema IRC channel on Libera.Chat or drop us an email at support@asciinema.org.
## Reporting security issues

View File

@@ -16,10 +16,17 @@ Terminal session recorder and the best companion of
asciinema lets you easily record terminal sessions and replay
them in a terminal as well as in a web browser.
Install latest version ([other installation options](#installation)):
Install latest version ([other installation options](#installation))
using [pipx](https://pypa.github.io/pipx/) (if you have it):
```sh
pip3 install asciinema
pipx install asciinema
```
If you don't have pipx, install using pip with your preferred Python version:
```sh
python3 -m pip install asciinema
```
Record your first session:
@@ -67,20 +74,27 @@ sent anywhere without your consent.
These are the basics, but there's much more you can do. The following sections
cover installation, usage and hosting of the recordings in more detail.
## Installation
### Python package
### Python package from PyPI
asciinema is available on [PyPI](https://pypi.python.org/pypi/asciinema) and can
be installed with pip (Python 3 with setuptools required):
[pypi]: https://pypi.python.org/pypi/asciinema
asciinema is available on [PyPI] and can be installed with
[pipx](https://pypa.github.io/pipx/) (if you have it) or with pip (Python 3
with setuptools required):
```sh
pip3 install asciinema
pipx install asciinema
```
This is the recommended way of installation, which gives you the latest released
version.
Or with pip (using your preferred Python version):
```sh
python3 -m pip install asciinema
```
Installing from [PyPI] is the recommended way of installation, which gives you the latest released version.
### Native packages
@@ -141,8 +155,7 @@ Usage section for commands and options).
There's not much software installed in this image though. In most cases you may
want to install extra programs before recording. One option is to derive new
image from this one (start your custom Dockerfile with `FROM
asciinema/asciinema`). Another option is to start the container with `/bin/bash`
image from this one (start your custom Dockerfile with `FROM asciinema/asciinema`). Another option is to start the container with `/bin/bash`
as the entrypoint, install extra packages and manually start `asciinema rec`:
```console
@@ -165,7 +178,6 @@ docker run --rm -it \
docker.io/asciinema/asciinema rec
```
## Usage
asciinema is composed of multiple commands, similar to `git`, `apt-get` or
@@ -176,7 +188,7 @@ all available commands with their options.
### `rec [filename]`
__Record terminal session.__
**Record terminal session.**
By running `asciinema rec [filename]` you start a new recording session. The
command (process) that is recorded can be specified with `-c` option (see
@@ -207,17 +219,17 @@ prompt or play a sound when the shell is being recorded.
Available options:
* `--stdin` - Enable stdin (keyboard) recording (see below)
* `--append` - Append to existing recording
* `--raw` - Save raw STDOUT output, without timing information or other metadata
* `--overwrite` - Overwrite the recording if it already exists
* `-c, --command=<command>` - Specify command to record, defaults to $SHELL
* `-e, --env=<var-names>` - List of environment variables to capture, defaults
- `--stdin` - Enable stdin (keyboard) recording (see below)
- `--append` - Append to existing recording
- `--raw` - Save raw STDOUT output, without timing information or other metadata
- `--overwrite` - Overwrite the recording if it already exists
- `-c, --command=<command>` - Specify command to record, defaults to $SHELL
- `-e, --env=<var-names>` - List of environment variables to capture, defaults
to `SHELL,TERM`
* `-t, --title=<title>` - Specify the title of the asciicast
* `-i, --idle-time-limit=<sec>` - Limit 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)
- `-t, --title=<title>` - Specify the title of the asciicast
- `-i, --idle-time-limit=<sec>` - Limit 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)
Stdin recording allows for capturing of all characters typed in by the user in
the currently recorded shell. This may be used by a player (e.g.
@@ -228,7 +240,7 @@ instance), it's disabled by default, and has to be explicitly enabled via
### `play <filename>`
__Replay recorded asciicast in a terminal.__
**Replay recorded asciicast in a terminal.**
This command replays given asciicast (as recorded by `rec` command) directly in
your terminal.
@@ -252,8 +264,7 @@ asciinema play https://asciinema.org/a/22124.cast
asciinema play http://example.com/demo.cast
```
Playing from asciicast page URL (requires `<link rel="alternate"
type="application/x-asciicast" href="/my/ascii.cast">` in page's HTML):
Playing from asciicast page URL (requires `<link rel="alternate" type="application/x-asciicast" href="/my/ascii.cast">` in page's HTML):
```sh
asciinema play https://asciinema.org/a/22124
@@ -275,8 +286,8 @@ asciinema play dweb:/ipfs/QmNe7FsYaHc9SaDEAEXbaagAzNw9cH7YbzN4xV7jV1MCzK/ascii.c
Available options:
* `-i, --idle-time-limit=<sec>` - Limit replayed terminal inactivity to max `<sec>` seconds
* `-s, --speed=<factor>` - Playback speed (can be fractional)
- `-i, --idle-time-limit=<sec>` - Limit replayed terminal inactivity to max `<sec>` seconds
- `-s, --speed=<factor>` - Playback speed (can be fractional)
> For the best playback experience it is recommended to run `asciinema play` in
> a terminal of dimensions not smaller than the one used for recording, as
@@ -284,7 +295,7 @@ Available options:
### `cat <filename>`
__Print full output of recorded asciicast to a terminal.__
**Print full output of recorded asciicast to a terminal.**
While `asciinema play <filename>` replays the recorded session using timing
information saved in the asciicast, `asciinema cat <filename>` dumps the full
@@ -295,18 +306,17 @@ output (including all escape sequences) to a terminal immediately.
### `upload <filename>`
__Upload recorded asciicast to asciinema.org site.__
**Upload recorded asciicast to asciinema.org site.**
This command uploads given asciicast (recorded by `rec` command) to
asciinema.org, where it can be watched and shared.
`asciinema rec demo.cast` + `asciinema play demo.cast` + `asciinema upload
demo.cast` is a nice combo if you want to review an asciicast before
`asciinema rec demo.cast` + `asciinema play demo.cast` + `asciinema upload demo.cast` is a nice combo if you want to review an asciicast before
publishing it on asciinema.org.
### `auth`
__Link your install ID with your asciinema.org user account.__
**Link your install ID with your asciinema.org user account.**
If you want to manage your recordings (change title/theme, delete) at
asciinema.org you need to link your "install ID" with asciinema.org user

View File

@@ -70,6 +70,11 @@ class RecordCommand(Command): # pylint: disable=too-many-instance-attributes
"if you want to append to existing recording"
)
return 1
elif append:
self.print_warning(
"%s does not exist, not appending" % self.filename
)
append = False
if append:
self.print_info(f"appending to asciicast at {self.filename}")

View File

@@ -323,7 +323,7 @@ More documentation is available on the asciicast.org website and its GitHub wiki
* Web: [asciinema.org/docs/](https://asciinema.org/docs/)
* Wiki: [github.com/asciinema/asciinema/wiki](https://github.com/asciinema/asciinema/wiki)
* IRC: [Channel on Freenode](https://webchat.freenode.net/?channels=asciinema)
* IRC: [Channel on Libera.Chat](https://web.libera.chat/gamja/#asciinema)
* Twitter: [@asciinema](https://twitter.com/asciinema)