asciinema-scene


Nameasciinema-scene JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://github.com/jdum/asciinema-scene
SummaryToolbox to edit asciinema screencasts (sciine).
upload_time2024-10-26 04:10:25
maintainerNone
docs_urlNone
authorJerome Dumonteil
requires_python<4.0,>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # asciinema-scene

[![Release](https://img.shields.io/github/v/release/jdum/asciinema-scene)](https://img.shields.io/github/v/release/jdum/asciinema-scene)
[![Build status](https://img.shields.io/github/actions/workflow/status/jdum/asciinema-scene/main.yml?branch=main)](https://github.com/jdum/asciinema-scene/actions/workflows/main.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/jdum/asciinema-scene/branch/main/graph/badge.svg)](https://codecov.io/gh/jdum/asciinema-scene)
[![Commit activity](https://img.shields.io/github/commit-activity/m/jdum/asciinema-scene)](https://img.shields.io/github/commit-activity/m/jdum/asciinema-scene)
[![License](https://img.shields.io/github/license/jdum/asciinema-scene)](https://img.shields.io/github/license/jdum/asciinema-scene)

`asciinema-scene` provides the `sciine` command line toolkit for editing screen casts produced by [asciinema](https://asciinema.org/).

`sciine` takes as input the content of a screencast, apply a unitary transformation and returns the transformed content.


## Installation

`asciinema-scene` is a python package:

``` bash
pip install asciinema-scene
```

## Usage


### Commandes


There are 3 types of commands:

- content information commands:
    - [status](#command-status)
    - [header](#command-header)
    - [show](#command-show)


- commands applying to a portion of the content:
    - [copy](#command-copy)
    - [cut](#command-cut)
    - [speed](#command-speed)
    - [minimum](#command-minimum)
    - [maximum](#command-maximum)
    - [quantize](#command-quantize)
    - [include](#command-include)


- command applying to a single frame:
    - [insert](#command-insert)
    - [replace](#command-replace)
    - [delete](#command-delete)


``` script
Usage: sciine [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  copy      Copy content between START and END timecodes.
  cut       Cut content between START and END timecodes.
  delete    Delete the frame with timecode >= TIMECODE.
  header    Print the header field of the content.
  include   Include the content of a .cast file at the timecode position.
  insert    Insert a frame at the TIMECODE position.
  maximum   Set maximum duration of each frame.
  minimum   Set minimum duration of each frame.
  quantize  Set the duration of frames in duration range to DURATION.
  replace   Replace the text of frame with timecode >= TIMECODE by TEXT.
  show      Print detail of frames, from START to END (max LINES).
  speed     Change the speed of the screen cast.
  status    Print informations about the content (duration, ...).
```

---

### Input / output

By default, `sciine` reads content from standard input and returns the result to standard output. The `--input` and `--output` options allow reading/writing from files (`sciine` can also read from a compressed `.zip` or `.gz` file). `sciine` does not modify the input file.

``` bash
-i, --input PATH   Input .cast file, default is stdin.
-o, --output PATH  Output .cast file, default is stdout.
```

Example:

Speed up a screencast and play a sub-part of it, using pipe redirection.


``` bash
sciine speed 2.0 --input short.cast | sciine copy --start 1.4 --end 2.4| asciinema play -
```

---

## Command `status`

``` script
Usage: sciine status [OPTIONS]

  Print informations about the content (duration, ...).

Options:
  -i, --input PATH  Input .cast file, default is stdin.
  --help            Show this message and exit.
```

Example:

Use `status` to see the number of frames and the duration of the screecast.


``` bash
sciine status --input short.cast
Input: short.cast
Date: 2023-05-28 11:15:06+00:00
Frames: 22
Duration: 6.135993
```

---

## Command `header`

``` script
Usage: sciine header [OPTIONS]

  Print the header field of the content.

Options:
  -i, --input PATH  Input .cast file, default is stdin.
  --help            Show this message and exit.
```

Example:

Display the original header.

``` bash
sciine header -i short.cast
{'env': {'SHELL': '/bin/bash', 'TERM': 'linux'},
 'height': 36,
 'timestamp': 1685272506,
 'version': 2,
 'width': 133}
```

---

## Command `show`

``` script
Usage: sciine show [OPTIONS]

  Print detail of frames, from START to END (max LINES).

  Each line prints the timecode, duration and text of the frame. If no START
  timecode is provided, start from the beginning. If no END timecode is
  provided, display all lines until the end, or LINES lines

Options:
  -s, --start FLOAT    Start timecode (sec), default is 0.0.
  -e, --end FLOAT      End timecode (sec), default is EOF.
  -l, --lines INTEGER  Number of lines to show.
  -p, --precise        Show all digits of time codes.
  -t, --text           Show message field as plain text.
  -i, --input PATH     Input .cast file, default is stdin.
  --help               Show this message and exit.
```

Example:

Display the first 5 lines and the precise duration of the frames.

``` bash
sciine show --lines 5 --precise  -i short.cast
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.104510│ 'c'
  0.998548│ 0.164761│ 'h'
  1.163309│ 0.300601│ 'o'
  1.463910│ 0.392259│ ' '
```

---

## Command `copy`

``` script
Usage: sciine copy [OPTIONS]

  Copy content between START and END timecodes.

Options:
  -s, --start FLOAT  Start timecode (sec), default is 0.0.
  -e, --end FLOAT    End timecode (sec), default is EOF.
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Example:

Play content between 0.05 and 1.2 seconds.

``` bash
sciine copy --start 0.05 --end 1.2 -i short.cast | asciinema play -
```

---

## Command `cut`

``` script
Usage: sciine cut [OPTIONS]

  Cut content between START and END timecodes.

  If no START timecode is provided, cut from the beginning. If no END timecode
  is provided, cut until the end.

Options:
  -s, --start FLOAT  Start timecode (sec), default is 0.0.
  -e, --end FLOAT    End timecode (sec), default is EOF.
  -a, --adjust       Adjust durations of frames at precise cut values.
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Example:

Cut end of content after 1.2 seconds.

``` bash
sciine cut --start 1.2 < short.cast | asciinema play -
```

---

## Command `speed`

``` script
Usage: sciine speed [OPTIONS] SPEED

  Change the speed of the screen cast.

  SPEED is the factor of acceleration. Use number below 1.0 to to slow down.
  If no START timecode is provided, modify speed from the beginning. If no END
  timecode is provided, modify speed until the end.

Options:
  -s, --start FLOAT  Start timecode (sec), default is 0.0.
  -e, --end FLOAT    End timecode (sec), default is EOF.
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Example:

Doubles the speed and displays the new duration.

``` bash
sciine speed 2.0 -i short.cast|sciine status
Input: sys.stdin
Date: 2023-06-03 11:10:23+00:00
Frames: 22
Duration: 3.067996
```

---

## Command `minimum`

``` script
Usage: sciine minimum [OPTIONS] DURATION

  Set minimum duration of each frame.

  The minimum duration of frames will be set to DURATION seconds, the
  timecodes will be adjusted accordingly. If no START timecode is provided,
  apply from the beginning. If no END timecode is provided, apply until the
  end.

Options:
  -s, --start FLOAT  Start timecode (sec), default is 0.0.
  -e, --end FLOAT    End timecode (sec), default is EOF.
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Example:

Set the frame duration to a minimum of 0.2s and display the new durations.

``` bash
sciine minimum 0.2 -i short.cast | sciine show -l 5 -p
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.200000│ 'c'
  1.094038│ 0.200000│ 'h'
  1.294038│ 0.300601│ 'o'
  1.594639│ 0.392259│ ' '
```

---

## Command `maximum`

``` script
Usage: sciine maximum [OPTIONS] DURATION

  Set maximum duration of each frame.

  The duration of frames will be limited to DURATION seconds, the timecodes
  will be adjusted accordingly. If no START timecode is provided, apply from
  the beginning. If no END timecode is provided, apply until the end.

Options:
  -s, --start FLOAT  Start timecode (sec), default is 0.0.
  -e, --end FLOAT    End timecode (sec), default is EOF.
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Example:

Set the frame duration to a maximum of 0.2s and display the new durations.

``` bash
sciine maximum 0.2 -i short.cast | sciine show -l 5 -p
  0.000000│ 0.200000│ 'e'
  0.200000│ 0.104510│ 'c'
  0.304510│ 0.164761│ 'h'
  0.469271│ 0.200000│ 'o'
  0.669271│ 0.200000│ ' '
```

---

## Command `quantize`

``` script
Usage: sciine quantize [OPTIONS] RANGE_MIN RANGE_MAX DURATION

  Set the duration of frames in duration range to DURATION.

  Set the duration of frames to DURATION if their current duration is between
  RANGE_MIN and RANGE_MAX. If no START timecode is provided, apply from the
  beginning. If no END timecode is provided, apply until the end.

Options:
  -s, --start FLOAT  Start timecode (sec), default is 0.0.
  -e, --end FLOAT    End timecode (sec), default is EOF.
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Example:

Set the frame duration to 0.2s for all frames lasting between 0.1 and 0.4s.

``` bash
sciine quantize 0.1 0.4 0.2 -i short.cast | sciine show -l 5 -p
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.200000│ 'c'
  1.094038│ 0.200000│ 'h'
  1.294038│ 0.200000│ 'o'
  1.494038│ 0.200000│ ' '
```

---

## Command `include`

``` script
Usage: sciine include [OPTIONS] TIMECODE INCLUDE_FILE

  Include the content of a .cast file at the timecode position.

  All frames of the INCLUDE_FILE .cast file will be copied in the current
  screen cast. The timecodes will be adjusted as required.

Options:
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Add the content of `long.cast` to the beginning of the screencast, and display the final duration.

``` bash
sciine include 0.0 long.cast.gz  -i short.cast|sciine status
Input: sys.stdin
Date: 2023-06-03 12:14:22+00:00
Frames: 71391
Duration: 22.925312
```

---

## Command `insert`

``` script
Usage: sciine insert [OPTIONS] TIMECODE DURATION TEXT [ETYPE]

  Insert a frame at the TIMECODE position.

  The frame will display TEXT during DURATION seconds. By default the event
  type ETYPE is set to "o".

Options:
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Insert the string 'xyz' at position 2.0 for a duration of 0.1s. View content before and after the change.

``` bash
sciine show -l 8 -p -i short.cast
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.104510│ 'c'
  0.998548│ 0.164761│ 'h'
  1.163309│ 0.300601│ 'o'
  1.463910│ 0.392259│ ' '
  1.856169│ 0.356967│ '"'
  2.213136│ 0.150277│ 'a'
  2.363413│ 0.511288│ ' '

sciine insert 2.0 0.1 "xyz" -i short.cast | sciine show -l 8 -p
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.104510│ 'c'
  0.998548│ 0.164761│ 'h'
  1.163309│ 0.300601│ 'o'
  1.463910│ 0.392259│ ' '
  1.856169│ 0.356967│ '"'
  2.213136│ 0.100000│ 'xyz'
  2.313136│ 0.150277│ 'a'
```

---

## Command `replace`

``` script
Usage: sciine replace [OPTIONS] TIMECODE TEXT

  Replace the text of frame with timecode >= TIMECODE by TEXT.

Options:
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Replace the string 'xyz' at position 2.0 for a duration of 0.1s. View content before and after the change.

``` bash
sciine show -l 8 -p -i short.cast
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.104510│ 'c'
  0.998548│ 0.164761│ 'h'
  1.163309│ 0.300601│ 'o'
  1.463910│ 0.392259│ ' '
  1.856169│ 0.356967│ '"'
  2.213136│ 0.150277│ 'a'
  2.363413│ 0.511288│ ' '

sciine replace 2.0 "xyz" -i short.cast | sciine show -l 8 -p
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.104510│ 'c'
  0.998548│ 0.164761│ 'h'
  1.163309│ 0.300601│ 'o'
  1.463910│ 0.392259│ ' '
  1.856169│ 0.356967│ '"'
  2.213136│ 0.150277│ 'xyz'
  2.363413│ 0.511288│ ' '
```

---

## Command `delete`

``` script
Usage: sciine delete [OPTIONS] TIMECODE

  Delete the frame with timecode >= TIMECODE.

Options:
  -i, --input PATH   Input .cast file, default is stdin.
  -o, --output PATH  Output .cast file, default is stdout.
  --help             Show this message and exit.
```

Delete the frame at position 2.0. View content before and after the change.

``` bash
sciine show -l 8 -p -i short.cast
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.104510│ 'c'
  0.998548│ 0.164761│ 'h'
  1.163309│ 0.300601│ 'o'
  1.463910│ 0.392259│ ' '
  1.856169│ 0.356967│ '"'
  2.213136│ 0.150277│ 'a'
  2.363413│ 0.511288│ ' '

sciine delete 2.0  -i short.cast | sciine show -l 8 -p
  0.000000│ 0.894038│ 'e'
  0.894038│ 0.104510│ 'c'
  0.998548│ 0.164761│ 'h'
  1.163309│ 0.300601│ 'o'
  1.463910│ 0.392259│ ' '
  1.856169│ 0.356967│ '"'
  2.213136│ 0.511288│ ' '
  2.724424│ 0.237965│ 's'
```

---

## Code source

**Github repository**: <https://github.com/jdum/asciinema-scene/>

## License

This project is licensed under the MIT License (see the LICENSE file for details).


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jdum/asciinema-scene",
    "name": "asciinema-scene",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Jerome Dumonteil",
    "author_email": "jerome.dumonteil@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/aa/cf/3672254de9e6cd2db18f61b994629f2a5d910e45abe5c93dff09d4d22a64/asciinema_scene-0.9.0.tar.gz",
    "platform": null,
    "description": "# asciinema-scene\n\n[![Release](https://img.shields.io/github/v/release/jdum/asciinema-scene)](https://img.shields.io/github/v/release/jdum/asciinema-scene)\n[![Build status](https://img.shields.io/github/actions/workflow/status/jdum/asciinema-scene/main.yml?branch=main)](https://github.com/jdum/asciinema-scene/actions/workflows/main.yml?query=branch%3Amain)\n[![codecov](https://codecov.io/gh/jdum/asciinema-scene/branch/main/graph/badge.svg)](https://codecov.io/gh/jdum/asciinema-scene)\n[![Commit activity](https://img.shields.io/github/commit-activity/m/jdum/asciinema-scene)](https://img.shields.io/github/commit-activity/m/jdum/asciinema-scene)\n[![License](https://img.shields.io/github/license/jdum/asciinema-scene)](https://img.shields.io/github/license/jdum/asciinema-scene)\n\n`asciinema-scene` provides the `sciine` command line toolkit for editing screen casts produced by [asciinema](https://asciinema.org/).\n\n`sciine` takes as input the content of a screencast, apply a unitary transformation and returns the transformed content.\n\n\n## Installation\n\n`asciinema-scene` is a python package:\n\n``` bash\npip install asciinema-scene\n```\n\n## Usage\n\n\n### Commandes\n\n\nThere are 3 types of commands:\n\n- content information commands:\n    - [status](#command-status)\n    - [header](#command-header)\n    - [show](#command-show)\n\n\n- commands applying to a portion of the content:\n    - [copy](#command-copy)\n    - [cut](#command-cut)\n    - [speed](#command-speed)\n    - [minimum](#command-minimum)\n    - [maximum](#command-maximum)\n    - [quantize](#command-quantize)\n    - [include](#command-include)\n\n\n- command applying to a single frame:\n    - [insert](#command-insert)\n    - [replace](#command-replace)\n    - [delete](#command-delete)\n\n\n``` script\nUsage: sciine [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --version  Show the version and exit.\n  --help     Show this message and exit.\n\nCommands:\n  copy      Copy content between START and END timecodes.\n  cut       Cut content between START and END timecodes.\n  delete    Delete the frame with timecode >= TIMECODE.\n  header    Print the header field of the content.\n  include   Include the content of a .cast file at the timecode position.\n  insert    Insert a frame at the TIMECODE position.\n  maximum   Set maximum duration of each frame.\n  minimum   Set minimum duration of each frame.\n  quantize  Set the duration of frames in duration range to DURATION.\n  replace   Replace the text of frame with timecode >= TIMECODE by TEXT.\n  show      Print detail of frames, from START to END (max LINES).\n  speed     Change the speed of the screen cast.\n  status    Print informations about the content (duration, ...).\n```\n\n---\n\n### Input / output\n\nBy default, `sciine` reads content from standard input and returns the result to standard output. The `--input` and `--output` options allow reading/writing from files (`sciine` can also read from a compressed `.zip` or `.gz` file). `sciine` does not modify the input file.\n\n``` bash\n-i, --input PATH   Input .cast file, default is stdin.\n-o, --output PATH  Output .cast file, default is stdout.\n```\n\nExample:\n\nSpeed up a screencast and play a sub-part of it, using pipe redirection.\n\n\n``` bash\nsciine speed 2.0 --input short.cast | sciine copy --start 1.4 --end 2.4| asciinema play -\n```\n\n---\n\n## Command `status`\n\n``` script\nUsage: sciine status [OPTIONS]\n\n  Print informations about the content (duration, ...).\n\nOptions:\n  -i, --input PATH  Input .cast file, default is stdin.\n  --help            Show this message and exit.\n```\n\nExample:\n\nUse `status` to see the number of frames and the duration of the screecast.\n\n\n``` bash\nsciine status --input short.cast\nInput: short.cast\nDate: 2023-05-28 11:15:06+00:00\nFrames: 22\nDuration: 6.135993\n```\n\n---\n\n## Command `header`\n\n``` script\nUsage: sciine header [OPTIONS]\n\n  Print the header field of the content.\n\nOptions:\n  -i, --input PATH  Input .cast file, default is stdin.\n  --help            Show this message and exit.\n```\n\nExample:\n\nDisplay the original header.\n\n``` bash\nsciine header -i short.cast\n{'env': {'SHELL': '/bin/bash', 'TERM': 'linux'},\n 'height': 36,\n 'timestamp': 1685272506,\n 'version': 2,\n 'width': 133}\n```\n\n---\n\n## Command `show`\n\n``` script\nUsage: sciine show [OPTIONS]\n\n  Print detail of frames, from START to END (max LINES).\n\n  Each line prints the timecode, duration and text of the frame. If no START\n  timecode is provided, start from the beginning. If no END timecode is\n  provided, display all lines until the end, or LINES lines\n\nOptions:\n  -s, --start FLOAT    Start timecode (sec), default is 0.0.\n  -e, --end FLOAT      End timecode (sec), default is EOF.\n  -l, --lines INTEGER  Number of lines to show.\n  -p, --precise        Show all digits of time codes.\n  -t, --text           Show message field as plain text.\n  -i, --input PATH     Input .cast file, default is stdin.\n  --help               Show this message and exit.\n```\n\nExample:\n\nDisplay the first 5 lines and the precise duration of the frames.\n\n``` bash\nsciine show --lines 5 --precise  -i short.cast\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.104510\u2502 'c'\n  0.998548\u2502 0.164761\u2502 'h'\n  1.163309\u2502 0.300601\u2502 'o'\n  1.463910\u2502 0.392259\u2502 ' '\n```\n\n---\n\n## Command `copy`\n\n``` script\nUsage: sciine copy [OPTIONS]\n\n  Copy content between START and END timecodes.\n\nOptions:\n  -s, --start FLOAT  Start timecode (sec), default is 0.0.\n  -e, --end FLOAT    End timecode (sec), default is EOF.\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nExample:\n\nPlay content between 0.05 and 1.2 seconds.\n\n``` bash\nsciine copy --start 0.05 --end 1.2 -i short.cast | asciinema play -\n```\n\n---\n\n## Command `cut`\n\n``` script\nUsage: sciine cut [OPTIONS]\n\n  Cut content between START and END timecodes.\n\n  If no START timecode is provided, cut from the beginning. If no END timecode\n  is provided, cut until the end.\n\nOptions:\n  -s, --start FLOAT  Start timecode (sec), default is 0.0.\n  -e, --end FLOAT    End timecode (sec), default is EOF.\n  -a, --adjust       Adjust durations of frames at precise cut values.\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nExample:\n\nCut end of content after 1.2 seconds.\n\n``` bash\nsciine cut --start 1.2 < short.cast | asciinema play -\n```\n\n---\n\n## Command `speed`\n\n``` script\nUsage: sciine speed [OPTIONS] SPEED\n\n  Change the speed of the screen cast.\n\n  SPEED is the factor of acceleration. Use number below 1.0 to to slow down.\n  If no START timecode is provided, modify speed from the beginning. If no END\n  timecode is provided, modify speed until the end.\n\nOptions:\n  -s, --start FLOAT  Start timecode (sec), default is 0.0.\n  -e, --end FLOAT    End timecode (sec), default is EOF.\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nExample:\n\nDoubles the speed and displays the new duration.\n\n``` bash\nsciine speed 2.0 -i short.cast|sciine status\nInput: sys.stdin\nDate: 2023-06-03 11:10:23+00:00\nFrames: 22\nDuration: 3.067996\n```\n\n---\n\n## Command `minimum`\n\n``` script\nUsage: sciine minimum [OPTIONS] DURATION\n\n  Set minimum duration of each frame.\n\n  The minimum duration of frames will be set to DURATION seconds, the\n  timecodes will be adjusted accordingly. If no START timecode is provided,\n  apply from the beginning. If no END timecode is provided, apply until the\n  end.\n\nOptions:\n  -s, --start FLOAT  Start timecode (sec), default is 0.0.\n  -e, --end FLOAT    End timecode (sec), default is EOF.\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nExample:\n\nSet the frame duration to a minimum of 0.2s and display the new durations.\n\n``` bash\nsciine minimum 0.2 -i short.cast | sciine show -l 5 -p\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.200000\u2502 'c'\n  1.094038\u2502 0.200000\u2502 'h'\n  1.294038\u2502 0.300601\u2502 'o'\n  1.594639\u2502 0.392259\u2502 ' '\n```\n\n---\n\n## Command `maximum`\n\n``` script\nUsage: sciine maximum [OPTIONS] DURATION\n\n  Set maximum duration of each frame.\n\n  The duration of frames will be limited to DURATION seconds, the timecodes\n  will be adjusted accordingly. If no START timecode is provided, apply from\n  the beginning. If no END timecode is provided, apply until the end.\n\nOptions:\n  -s, --start FLOAT  Start timecode (sec), default is 0.0.\n  -e, --end FLOAT    End timecode (sec), default is EOF.\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nExample:\n\nSet the frame duration to a maximum of 0.2s and display the new durations.\n\n``` bash\nsciine maximum 0.2 -i short.cast | sciine show -l 5 -p\n  0.000000\u2502 0.200000\u2502 'e'\n  0.200000\u2502 0.104510\u2502 'c'\n  0.304510\u2502 0.164761\u2502 'h'\n  0.469271\u2502 0.200000\u2502 'o'\n  0.669271\u2502 0.200000\u2502 ' '\n```\n\n---\n\n## Command `quantize`\n\n``` script\nUsage: sciine quantize [OPTIONS] RANGE_MIN RANGE_MAX DURATION\n\n  Set the duration of frames in duration range to DURATION.\n\n  Set the duration of frames to DURATION if their current duration is between\n  RANGE_MIN and RANGE_MAX. If no START timecode is provided, apply from the\n  beginning. If no END timecode is provided, apply until the end.\n\nOptions:\n  -s, --start FLOAT  Start timecode (sec), default is 0.0.\n  -e, --end FLOAT    End timecode (sec), default is EOF.\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nExample:\n\nSet the frame duration to 0.2s for all frames lasting between 0.1 and 0.4s.\n\n``` bash\nsciine quantize 0.1 0.4 0.2 -i short.cast | sciine show -l 5 -p\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.200000\u2502 'c'\n  1.094038\u2502 0.200000\u2502 'h'\n  1.294038\u2502 0.200000\u2502 'o'\n  1.494038\u2502 0.200000\u2502 ' '\n```\n\n---\n\n## Command `include`\n\n``` script\nUsage: sciine include [OPTIONS] TIMECODE INCLUDE_FILE\n\n  Include the content of a .cast file at the timecode position.\n\n  All frames of the INCLUDE_FILE .cast file will be copied in the current\n  screen cast. The timecodes will be adjusted as required.\n\nOptions:\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nAdd the content of `long.cast` to the beginning of the screencast, and display the final duration.\n\n``` bash\nsciine include 0.0 long.cast.gz  -i short.cast|sciine status\nInput: sys.stdin\nDate: 2023-06-03 12:14:22+00:00\nFrames: 71391\nDuration: 22.925312\n```\n\n---\n\n## Command `insert`\n\n``` script\nUsage: sciine insert [OPTIONS] TIMECODE DURATION TEXT [ETYPE]\n\n  Insert a frame at the TIMECODE position.\n\n  The frame will display TEXT during DURATION seconds. By default the event\n  type ETYPE is set to \"o\".\n\nOptions:\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nInsert the string 'xyz' at position 2.0 for a duration of 0.1s. View content before and after the change.\n\n``` bash\nsciine show -l 8 -p -i short.cast\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.104510\u2502 'c'\n  0.998548\u2502 0.164761\u2502 'h'\n  1.163309\u2502 0.300601\u2502 'o'\n  1.463910\u2502 0.392259\u2502 ' '\n  1.856169\u2502 0.356967\u2502 '\"'\n  2.213136\u2502 0.150277\u2502 'a'\n  2.363413\u2502 0.511288\u2502 ' '\n\nsciine insert 2.0 0.1 \"xyz\" -i short.cast | sciine show -l 8 -p\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.104510\u2502 'c'\n  0.998548\u2502 0.164761\u2502 'h'\n  1.163309\u2502 0.300601\u2502 'o'\n  1.463910\u2502 0.392259\u2502 ' '\n  1.856169\u2502 0.356967\u2502 '\"'\n  2.213136\u2502 0.100000\u2502 'xyz'\n  2.313136\u2502 0.150277\u2502 'a'\n```\n\n---\n\n## Command `replace`\n\n``` script\nUsage: sciine replace [OPTIONS] TIMECODE TEXT\n\n  Replace the text of frame with timecode >= TIMECODE by TEXT.\n\nOptions:\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nReplace the string 'xyz' at position 2.0 for a duration of 0.1s. View content before and after the change.\n\n``` bash\nsciine show -l 8 -p -i short.cast\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.104510\u2502 'c'\n  0.998548\u2502 0.164761\u2502 'h'\n  1.163309\u2502 0.300601\u2502 'o'\n  1.463910\u2502 0.392259\u2502 ' '\n  1.856169\u2502 0.356967\u2502 '\"'\n  2.213136\u2502 0.150277\u2502 'a'\n  2.363413\u2502 0.511288\u2502 ' '\n\nsciine replace 2.0 \"xyz\" -i short.cast | sciine show -l 8 -p\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.104510\u2502 'c'\n  0.998548\u2502 0.164761\u2502 'h'\n  1.163309\u2502 0.300601\u2502 'o'\n  1.463910\u2502 0.392259\u2502 ' '\n  1.856169\u2502 0.356967\u2502 '\"'\n  2.213136\u2502 0.150277\u2502 'xyz'\n  2.363413\u2502 0.511288\u2502 ' '\n```\n\n---\n\n## Command `delete`\n\n``` script\nUsage: sciine delete [OPTIONS] TIMECODE\n\n  Delete the frame with timecode >= TIMECODE.\n\nOptions:\n  -i, --input PATH   Input .cast file, default is stdin.\n  -o, --output PATH  Output .cast file, default is stdout.\n  --help             Show this message and exit.\n```\n\nDelete the frame at position 2.0. View content before and after the change.\n\n``` bash\nsciine show -l 8 -p -i short.cast\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.104510\u2502 'c'\n  0.998548\u2502 0.164761\u2502 'h'\n  1.163309\u2502 0.300601\u2502 'o'\n  1.463910\u2502 0.392259\u2502 ' '\n  1.856169\u2502 0.356967\u2502 '\"'\n  2.213136\u2502 0.150277\u2502 'a'\n  2.363413\u2502 0.511288\u2502 ' '\n\nsciine delete 2.0  -i short.cast | sciine show -l 8 -p\n  0.000000\u2502 0.894038\u2502 'e'\n  0.894038\u2502 0.104510\u2502 'c'\n  0.998548\u2502 0.164761\u2502 'h'\n  1.163309\u2502 0.300601\u2502 'o'\n  1.463910\u2502 0.392259\u2502 ' '\n  1.856169\u2502 0.356967\u2502 '\"'\n  2.213136\u2502 0.511288\u2502 ' '\n  2.724424\u2502 0.237965\u2502 's'\n```\n\n---\n\n## Code source\n\n**Github repository**: <https://github.com/jdum/asciinema-scene/>\n\n## License\n\nThis project is licensed under the MIT License (see the LICENSE file for details).\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Toolbox to edit asciinema screencasts (sciine).",
    "version": "0.9.0",
    "project_urls": {
        "Documentation": "https://jdum.github.io/asciinema-scene/",
        "Homepage": "https://github.com/jdum/asciinema-scene",
        "Repository": "https://github.com/jdum/asciinema-scene"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc5910b0cf397c1ca5b3a48f256bdbe85eb457b6a6e8a2a42c43e2cf585bc6d4",
                "md5": "a5c6c4e72beefb64e7feddb66ea6f449",
                "sha256": "47d2931095f7fe7afac3fd6bd34498c9938a2521476cfab4bd3aeae1c4d97b73"
            },
            "downloads": -1,
            "filename": "asciinema_scene-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a5c6c4e72beefb64e7feddb66ea6f449",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 13075,
            "upload_time": "2024-10-26T04:10:24",
            "upload_time_iso_8601": "2024-10-26T04:10:24.052108Z",
            "url": "https://files.pythonhosted.org/packages/cc/59/10b0cf397c1ca5b3a48f256bdbe85eb457b6a6e8a2a42c43e2cf585bc6d4/asciinema_scene-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aacf3672254de9e6cd2db18f61b994629f2a5d910e45abe5c93dff09d4d22a64",
                "md5": "d364dc45129419c3112dc85c7ae99674",
                "sha256": "e5b6325c020ffbb16e96bc0ca7c9b00b086a46f528a17204fd2ec09af6bbd2f2"
            },
            "downloads": -1,
            "filename": "asciinema_scene-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d364dc45129419c3112dc85c7ae99674",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 13581,
            "upload_time": "2024-10-26T04:10:25",
            "upload_time_iso_8601": "2024-10-26T04:10:25.817740Z",
            "url": "https://files.pythonhosted.org/packages/aa/cf/3672254de9e6cd2db18f61b994629f2a5d910e45abe5c93dff09d4d22a64/asciinema_scene-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-26 04:10:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jdum",
    "github_project": "asciinema-scene",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "asciinema-scene"
}
        
Elapsed time: 3.80058s