1.0.2 • Published 6 years ago

gif-term v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

gif-term Build Status

Translate words and phrases to a GIF and display it in the terminal.

'mind blown'

Currently supported on iTerm2 >= 3.

Install

$ npm install gif-term

Usage

const gifTerm = require('gif-term');

gifTerm('mind blown');

gifTerm('wait. whaaaat?', { clip: true, width: '100%' });

API

gifTerm(text, options)

Logs the matching Gif to the terminal.

gifTerm.data(text, options)

Returns an object with relevant gif data including the image string which you can use to log manually in the terminal.

text

Type: string

The text input that you want to translate into a gif. Works with emojis too! 🌈

options

sticker

Type: boolean Default: false

Use stickers gifs instead of classic gifs.

clip

Type: boolean Default: false

Copy the gif url to your clipboard.

width
height

Type: string number Default: auto Options: Npx N% N auto

Set the width and height of the image.

  • in pixels(Npx)
  • as a % of the terminal view(N%)
  • number of char cells(N)
  • autoscale based on the image dimensions(auto)

Note: The aspect ratio of the image will be preserved.

Related

Docs

License

MIT