Skip to content

Commit

Permalink
Updated usage documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ESultanik committed Nov 1, 2022
1 parent 9560b9f commit 4df5319
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Cast2Gif
An pure Python ANSI terminal emulator that can render AsciiCast terminal recordings to an animated GIF.
A pure Python ANSI terminal emulator that can render AsciiCast terminal recordings to an animated GIF or screenshot.

Cast2Gif can also generate its own recordings directly, without requiring asciinema to be installed (see the `--exec` option).

For example, to generate a PNG screenshot of the output of the `ls` command, run
```bash
cast2gif --screenshot --output ls.png --exec "ls"
```

## Quickstart

Expand All @@ -13,26 +20,40 @@ This will automatically install the `cast2gif` executable in your path.
## Usage

```
usage: cast2gif [-h] [-v] [-o OUTPUT] [--force] [--font FONT] [-s FONT_SIZE]
usage: cast2gif [-h] [-v] [--exec ...] [--hide-prompt] [--ps1 PS1] [-o OUTPUT]
[--force] [--screenshot] [--font FONT] [-s FONT_SIZE]
[--fps FPS] [--idle-time-limit IDLE_TIME_LIMIT] [--loop LOOP]
[--quiet] [--width WIDTH] [--height HEIGHT]
ASCIICAST
[--quiet] [--width WIDTH] [--height HEIGHT] [--auto-size]
[ASCIICAST]
Converts AsciiCast terminal recordings to animated GIFs
positional arguments:
ASCIICAST The AsciiCast v2 file to convert, or '-' for STDIN
(the default)
optional arguments:
options:
-h, --help show this help message and exit
-v, --version Print version information and exit
--exec ..., -c ... Instead of parsing an AsciiCast v2 file, run the
command immediately after `--exec` and use its output
--hide-prompt By default, when using the `--exec` argument to run a
command, the command prompt is included before the
command output; this argument hides the prompt and
only includes the output
--ps1 PS1 The PS1 command prompt to use in conjuction with the
`--exec` output (default="${PS1}", if it is set,
otherwise "$ " in green)
-o OUTPUT, --output OUTPUT
The path for the output GIF file, or '-' for STDOUT
(default is the input filename plus '.gif', or STDOUT
if the input file is STDIN)
--force Overwrite the output file even if it already exists
--screenshot, -sc Render a screenshot rather than an animated gif
--font FONT Path to a TrueType font for rendering; defaults to
SourceCodePro
SourceCodePro; this argument can be supplied multiple
times, with additional fonts used in the event that
one is missing a required glyph
-s FONT_SIZE, --font-size FONT_SIZE
Font size (default=12)
--fps FPS Speficy the number of frames per second in the output
Expand All @@ -48,6 +69,9 @@ optional arguments:
--quiet Suppress all logging and status printouts
--width WIDTH Override the output width
--height HEIGHT Override the output height
--auto-size Override the output dimensions to be wide enough to
fit every line; if specified, this overrides the
`--width` option
```

## License
Expand Down

0 comments on commit 4df5319

Please sign in to comment.