Skip to content

Translate text to a GIF image and display it in the terminal

Notifications You must be signed in to change notification settings

astelvida/gif-term

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Translate text to a GIF image and display it in the terminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages