ttygif

Convert terminal recordings to animated gifs

  • 所有者: icholy/ttygif
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

ttygif converts a ttyrec file into gif files.
It's a stripped down version of ttyplay that screenshots every frame.

Demo

gif

Setup

Debian/Ubuntu

$ sudo apt-get install imagemagick ttyrec gcc x11-apps make git
$ git clone https://github.com/icholy/ttygif.git
$ cd ttygif
$ make
$ sudo make install

Fedora/CentOS/RHEL

$ sudo dnf install ImageMagick gcc xorg-x11-apps
$ # install ttyrec from source patched ~> https://github.com/mattwilmott/ttyrec
$ git clone https://github.com/icholy/ttygif.git
$ cd ttygif
$ make
$ sudo make install

OpenSUSE Leap

$ zypper addrepo http://download.opensuse.org/repositories/utilities/openSUSE_Leap_42.2/utilities.repo
$ zypper refresh
$ zypper install ttygif

Arch Linux

$ git clone https://aur.archlinux.org/ttyrec.git
$ cd ttyrec
$ makepkg -i
$ cd ..
$ git clone https://aur.archlinux.org/ttygif.git
$ cd ttygif
$ makepkg -is

With yaourt installed:

$ yaourt -S ttyrec ttygif

macOS

$ brew install ttygif

Usage:

1. Create ttyrec recording

$ ttyrec myrecording
  • Hit CTRL-D or type exit when done recording.

2. Convert to gif

$ ttygif myrecording

On OSX optionally you can set a -f flag which will bypass cropping which is needed for terminal apps which aren't full screen.
Both standard Terminal and iTerm apps are supported.

$ ttygif myrecording -f

Additional Notes

If you're getting Error: WINDOWID environment variable was empty., then you need to manually set WINDOWID.

export WINDOWID=23068679

If you're on Ubuntu, you can use xdotool to find the WINDOWID

$ sudo apt-get install xdotool
$ export WINDOWID=$(xdotool getwindowfocus)

Debugging

If you're having issues, then export the TTYGIF_DEBUG env variable.

export TTYGIF_DEBUG=1

This will print out all the commands it's trying to run.

Credits

The idea and approach was adapted from tty2gif

概覽

名稱與所有者icholy/ttygif
主編程語言C
編程語言Makefile (語言數: 3)
平台
許可證MIT License
發布數7
最新版本名稱1.6.0 (發布於 )
第一版名稱1.0.8 (發布於 )
創建於2013-08-12 16:31:03
推送於2023-09-02 15:49:45
最后一次提交2023-09-02 11:49:43
星數3.9k
關注者數64
派生數252
提交數227
已啟用問題?
問題數69
打開的問題數17
拉請求數44
打開的拉請求數1
關閉的拉請求數1
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部