View on GitHub

Seq2gif

Convert a ttyrec record into a gif animation directly (almost vt102 compatible terminal emulation).

Download this project as a .zip file Download this project as a tar.gz file

seq2gif

Build Status

Description

This software converts a sequences record file generated by ttyrec into a gif animation directly using portable built-in terminal emulation engine originated from yaft. yaft provides rare terminal emulation features such as SIXEL/DRCS.

Demo

This demo plays sl and records it with ttyrec, and converts that record into a GIF animation using seq2gif, and converts that GIF into a SIXEL animation and plays it with img2sixel. Furthermore, generates the log record of above experience using ttyrec, and converts that log into the following GIF animation.

ttyrec

Build and Install

  $ ./configure
  $ make
  # make install

Usage

Usage: seq2gif [Options] < ttyrecord > record.gif
       seq2gif [Options] -i ttyrecord -o record.gif

Options:
-w WIDTH, --width=WIDTH                specify terminal width in cell size.
                                       (default: 80)
-h HEIGHT, --height=HEIGHT             specify terminal height in cell size.
                                       (default: 24)
-l DELAY, --last-frame-delay=DELAY     specify delay in msec which is added
                                       to the last frame. (default: 300)
-f COLORNO, --foreground-color=COLORNO specify foreground color palette.
                                       number.
-b COLORNO, --background-color=COLORNO specify background color palette
                                       number.
-c COLORNO, --cursor-color=COLORNO     specify cursor color palette
                                       number.
-t TABSTOP, --tabstop=TABSTOP          specify hardware tabstop(default: 8)
-j, --cjkwidth                         treat East Asian Ambiguous width
                                       characters (UAX#11) as wide.
-r COUNT, --repeat=COUNT               specify animation repeat count. loop
                                       infinitely if 0 is given. (default: 0)
-i FILE, --input=FILE                  specify input file name. use STDIN
                                       if '-' is given. (default: '-')
-o FILE, --output=FILE                 specify output file name. use STDOUT
                                       if '-' is given. (default: '-')
-V, --version                          show version and license information.
-H, --help                             show this help.
-I DELAY, --render-interval=DELAY      skip frames with smaller delays than
                                       DELAY specified in milliseconds.
                                       (default: 20)
-s NUM, --play-speed=NUM               specify the factor of the play speed.
                                       A larger value means faster play.
                                       (default: 1.0)

Acknowledgements

recterm

This program is derived from recterm written by haru (@uobikiemukot)

gifsave89

GIF encoder (gifsave89.c) is imported from gifsave89 distributed under GPLv3+ by John Forkosh Associates, Inc.(john@forkosh.com)

milkjf

This package includes a C header file derived from milkjf font(gryph/milkjf.h). Original milkjf font was designed by japanfarm (Nihon-Nouen) and used on Sharp X68000 series. Chisato Yamauchi converted milkjf font to bdf for X Window System. haru(@uobikiemukot) converted it to a C-styled header file.

M+ BITMAP FONTS

This package includes a C header file derived from M+ font(gryph/mplus.h).

Original License:

M+ BITMAP FONTS            Copyright 2002-2005  COZ <coz@users.sourceforge.jp>

LICENSE

These fonts are free softwares.
Unlimited permission is granted to use, copy, and distribute it, with
or without modification, either commercially and noncommercially.
THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY.

Markus Kuhn's wcwidth

This package includes Markus Kuhn's wcwidth(mk_wcwidth)

Markus Kuhn -- 2007-05-26 (Unicode 5.0)

Permission to use, copy, modify, and distribute this software
for any purpose and without fee is hereby granted. The author
disclaims all warranties with regard to this software.

Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

References

ttyrec

a tty recorder

http://0xcc.net/ttyrec/index.html.en

yaft

Yet another framebuffer terminal

http://uobikiemukot.github.io/yaft/

License

GPLv3