Current collected state Current
Observed since 21 Oct, 09:03 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python bindings for the Rust graph library 'agg'
This is a Python binding for agg which is a command line tool for converting asciinema recordings into GIF video files.
It requires a modified version of agg (by making some modules public), which is included in this repository at local_cargo_registry/agg.
From PyPI:
pip install agg-python-bindings
From GitHub:
pip install git+https://github.com/james4ever0/agg-python-bindings.git
Source install:
git clone https://github.com/james4ever0/agg-python-bindings.git
cd agg-python-bindings
pip install .
import agg_python_bindings
asciicast_filepath = "asciinema.cast"
# Load asciicast file from path, save terminal screenshots separated by frame_time_min_spacing (seconds) to png_write_dir
# Output png filename format: "{png_filename_prefix}_{screenshot_timestamp}.png"
agg_python_bindings.load_asciicast_and_save_png_screenshots(
asciicast_filepath, # required, path to asciicast file (input)
png_write_dir=".", # optional
png_filename_prefix="screenshot", # optional
frame_time_min_spacing=1.0 # optional
)
# Create a virtual terminal, feed string into it, then get states and take a screenshot
test_input = 'Hello from \x1B[1;3;31mxterm.js\x1B[0m $ '
screenshot_path = "terminal_screenshot.png"
terminal = agg_python_bindings.TerminalEmulator(80, 25)
changed = terminal.feed_str(test_input)
terminal_dump = terminal.text_raw()
cursor_states = terminal.get_cursor()
width, height, success = terminal.screenshot(screenshot_path)
# print a cybergod style terminal text dump with cursor
for index, it in enumerate(terminal_dump):
if index == cursor_states[1]:
it = it[:cursor_states[0]] +"<|cursor|>"+it[cursor_states[0]:]
print(">", it)
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.4 | 17 Aug 2025 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:03 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:100bfcc54385dca6882461c00497e2aeca41b8ac44c22d01554bb72bad4e9f50