Giter VIP home page Giter VIP logo

clif's Introduction

clif

Cross-platform CLI GIF maker based on JS+Web.

How to use

Run

$ clif out.gif

type exit to finish and save the recording.

Features

  • Easy to install: npm install -g clif.
  • Works on OSX and Linux.
  • Small GIFs.
  • High quality (anti-aliased fonts).
  • Rendered with CSS/JS, customizable.
  • Realtime parallel rendering.
  • Frame aggregation and customizable FPS.
  • Support for titles Terminal.app-style.

How it works

clif builds mainly on four projects: child_pty, term.js omggif and phantomjs.

child_pty is used to spawn a pseudo terminal from which we can capture the entirety of input and output.

Each frame that's captured is asynchronously sent to a phantomjs headless browser to render using term.js and screenshot.

The GIF is composited with omggif and finally written out to the filesystem.

Options


  Usage: clif [options] <outfile>

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -c, --cols <cols>    Cols of the term [90]
    -r, --rows <rows>    Rows of the term [30]
    -s, --shell <shell>  Shell to use [/bin/bash]
    -f, --fps <fps>      Frames per second [8]
    -q, --quality <q>    Frame quality 1-30 (1 = best|slowest) [5]

TODO

  • Substitute phantom with a terminal rendered on top of node-canvas or low-level graphic APIs. terminal.js seems like a good candidate to add a <canvas> adaptor to.
  • Should work on Windows with some minor tweaks.
  • There's an issue with Node 0.12 and IO.js on Mac where stdout sometimes buffers for no reason ¯\_(ツ)_/¯

Credits

License

MIT

clif's People

Contributors

rauchg avatar

Watchers

 avatar  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.