gif-term

1.0.2 • Public • Published

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

  • gif-term-cli - CLI tool with interactive gif search feature

Docs

License

MIT

Package Sidebar

Install

npm i gif-term

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

1.63 MB

Total Files

8

Last publish

Collaborators

  • astelvida