GithubHelp home page GithubHelp logo

beatrizzramos / ttygif Goto Github PK

View Code? Open in Web Editor NEW

This project forked from icholy/ttygif

0.0 0.0 0.0 139 KB

Convert terminal recordings to animated gifs

License: MIT License

Shell 12.00% C 85.51% Makefile 2.49%

ttygif's Introduction

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

ttygif's People

Contributors

icholy avatar n-tek avatar gywn avatar bdossantos avatar simenb avatar jonbho avatar polyzen avatar federicoceratto avatar jimrandomh avatar petems avatar mixer3d avatar mkzero avatar selesse avatar amarok1412 avatar azat avatar bfontaine avatar bitdeli-chef avatar chrisnellis avatar cicku avatar davelupt avatar eugeneiiim avatar facundobatista avatar gabmontes avatar aaazalea avatar joelpurra avatar jm3 avatar leereilly avatar marklarr avatar mrahtz avatar mbologna avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.