1.1.0 • Published 6 years ago

telegram-emoji-sprites v1.1.0

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

telegram-emoji-sprites Build Status

Create Telegram-esque emoji sprites on the fly

Requirements

Emoji images have to be:

  • Called with the emoji Unicode code.
    • If the emoji is composed by multiple characters the codes have to be separated with a hyphen (-).
  • In PNG format.
  • 66px in width and 66px in height.

Examples: 1f981.png, 1f937-1f3fc-2642.png, etc.

Install

$ npm install --global telegram-emoji-sprites

Usage

$ telegram-emoji-sprites --help

  Create Telegram-esque emoji sprites on the fly

  Usage
    $ telegram-emoji-sprites [option] [folder]

  Get emoji images from the current folder by default

  Options
    --destination, -d  Folder where sprites will be placed, default: ./sprites
  	--key, -k          TinyPNG API key (get one from https://goo.gl/w2NaRS)

Options

  • --destination <path> - Set destination folder, it is created at runtime.
  • --key <api-key> - Use the provided key to authenticate requests to TinyPNG's API. You can get one from here, it's free if you do less than 500 optimizations/month. If the option is not used no image will be compressed.
  • --version - Print the current version.
  • --help - Print the help menu.

Example

Install GraphicsMagick. Download EmojiOne's emoji set, the 64x64px one, extract it somewhere and cd into it, then run:

gm mogrify -output-directory ./emojione -bordercolor transparent -border 1x1 *.png

telegram-emoji-sprites ./emojione

Now check out ./sprites and enjoy.

Changelog

v1.1.0

  • ✨ - No more errors while generating sprites (not due to missing images at least 😅), files existence is checked before, adds ~50ms.
  • ✨ - Sprites can be compressed before being saved on disk thanks to TinyPNG's magic 🐼, it can save up to ~90% in image size.
  • ✨ - Get update notifications, don't miss any patch or major update!
  • 📝 - Last but not least, listr output is now less verbose.

v1.0.1

  • 🚑 - The CLI app was using paths relative to its installation folder, not anymore!
  • 🚑 - Global installation was causing an error due to meow, now it's installing as a tarball.

v1.0.0

  • 🎉 - Initial release.

License

MIT © Raul Macarie