https://github.com/pierremarchand20/asciinema_automation
CLI utility to automate asciinema recordings
https://github.com/pierremarchand20/asciinema_automation
asciinema
Last synced: 6 months ago
JSON representation
CLI utility to automate asciinema recordings
- Host: GitHub
- URL: https://github.com/pierremarchand20/asciinema_automation
- Owner: PierreMarchand20
- License: mit
- Created: 2022-07-03T16:54:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-28T02:46:36.000Z (about 1 year ago)
- Last Synced: 2024-12-13T23:40:14.940Z (10 months ago)
- Topics: asciinema
- Language: Python
- Homepage:
- Size: 244 KB
- Stars: 24
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
asciinema-automation
####################.. image:: https://badge.fury.io/py/asciinema-automation.svg
:target: https://badge.fury.io/py/asciinema-automation.. image:: https://github.com/PierreMarchand20/asciinema_automation/actions/workflows/CI.yml/badge.svg
:target: https://github.com/PierreMarchand20/asciinema_automation/actions/workflows/CI.ymlasciinema-automation is a Python package which provides a small CLI utility to automate `asciinema `_ recordings. The only dependencies are asciinema and `Pexpect `_.
Recording is made easier by:
- making the live recording for you, to get the perfect take in one go (no more missed keys!),
- while looking not too robotic by adding Gaussian delay between keystrokes.One specificity of this package is that
- it makes automated recording as **reproducible and robust** as possible. In particular, there is no need to add a manually set waiting time between commands to wait for previous outputs.
To that end, you can write the commands you wish to showcase in a text file, and using comment lines starting by :code:`#$` (see `examples` folder and `example`_), you can specify the expected output of each command, and/or change the configuration of the automated recording on-the-fly.
Example
-------.. image:: https://raw.githubusercontent.com/PierreMarchand20/asciinema_automation/main/demo.gif
:alt: DemoThis example is generated reading with ``asciinema-automation`` a script that calls ``asciinema-automation`` which reads the ``hello_world.sh`` example in this repository 🙃
Numerous examples can also be found `here `_.
Installation
------------You can use `pip `_ to install:
.. code:: bash
python3 -m pip install asciinema-automationOr you can install it directly using this GitHub repository. In this case, you need to call ``git clone`` to recover the source code of this repository
.. code:: bash
git clone https://github.com/PierreMarchand20/asciinema_automation.gitand then call pip in your local folder of this repository to install this package and its dependencies
.. code:: bash
pip3 install .History
-------This repository is inspired by `asciiscript `_, which is not maintained any more. I first made a fork, but being not very familiar with go, I preferred to rewrite everything in python.