Skip to main content

A asciicast to gif utility

Project description

ttygif

An asciicast data file to gif conversion utility

install

pip install ttygif --user

usage

ttygif version 1.0.287
usage: ttygif [-h] [--input FILE] [--output FILE] [--loop COUNT] [--delay MS]
              [--fps FPS]

tty output to gif

optional arguments:
  -h, --help     show this help message and exit
  --input FILE   asciinema .cast file (default: None)
  --output FILE  gif output file (default: None)
  --loop COUNT   number of loops to play, 0=unlimited (default: 0)
  --delay MS     delay before restarting gif in milliseconds (default: 1000)
  --fps FPS      encode at (n) frames per second (0-25) 0=speed of cast file
                 (default: 8)

# Example
#ttygif --input data/232377.cast --output 232377.gif --fps=10

status

  • full output terminal emulation support not ready
  • support for standard I/O -> Done
  • support for colors -> Done
  • support for cursor positioning -> Done
  • Support for erase line modes 1,2,3 -> Done
  • Support for erase screen -> Done

Normal/colorized output work fine.

Features still left to handle

  • documentation
  • time period ( capture partial recording based on time stamps x-y)
  • add progress bar to top/bottom of gif with n of y H:M:I:S
  • font generation app
  • font mapping for utf 8,16,13 characters to base 256 map
  • palette flags, monochrome, grayscale, system, custom, count [n]<256
  • gif color consoladataion, for lower bit count (<8) compression
  • piped stdout with auto cast generation/emulated timestamps
  • asciicast v1 support
  • gif error handeling
  • file io error handeling
  • cursor position saving
  • cursor emulation
  • erase screen with default bg color
  • overflow on cursor position out of bounds
  • cythonic definitions for speed improvment
  • image underlay (branding)
  • image overlay (branding)

Profile Times

  • minimal speed gains have been put into place about 40% original speed increase
  • an additional 20-30% boost once I update to cythonic variables
  • 38% drawing characters
  • 23% converting stream text to bufer
  • 18% frame bounding for giff diff's
  • 14% compressing image frames
  • 07% other

Term Font

DOS VGA FONT

Examples

some random pics from the asciinema.org website

Terminal ray tracing

asciicast-174524

term-tris dt cannon

asciicast-232377

Denariusd compile on 30 cores!

asciicast-234628

surpirsed Pikachu

asciicast-236096

CACA_DRIVER=ncurses cacademo

asciicast-687

Notes

asciicast may split data between events, causing escape codes not to be recognised. ttygif moves all trailing unformed escape codes to the next event.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ttygif-1.0.507.tar.gz (1.1 MB view details)

Uploaded Source

File details

Details for the file ttygif-1.0.507.tar.gz.

File metadata

  • Download URL: ttygif-1.0.507.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for ttygif-1.0.507.tar.gz
Algorithm Hash digest
SHA256 c56b67ad19b2db12d9f7ed61c7df0b7963124a22f6d87aa449c2e78086d33174
MD5 7a493ee0748b28967d77ec15498d838e
BLAKE2b-256 7edcced0e1aa2c738b6bbff13c2dd364d8480fc4bf22199a098272bce5b93a7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page