Yet another emoji handler. It contains 870 emojis with its name and codepoint(but not contains emoji fonts or images). All names of emojis are from Emoji cheat sheet for Campfire and GitHub.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install emot
With Mac Terminal,
emot command works as follows;
% emot show sunflower # display the emoji with its codepoint. % emot show # display all named emojis with its names and codepoints. % emot icons # display all emoji icons. % emot names # display available names for emojis.
emot help for more info.
require 'emot' .(:sunflower) # => 🌻 .(:sunflower) # => "U+1F33B"
Also, you can get Symbol#~ for emoji output.
require "emot" puts ~:smile puts ~:beginner puts ~:shit puts ~:jack_o_lantern puts ~:'+1' puts ~:"I broken_heart you!" puts ~:"The pencil is mightier than gun" puts ~:"dango is better than sunflower" puts ~:"疲れたら beer を飲もう！" puts ~:"fish + hocho => sushi" puts ~:".fush + .hocho => sushi" # escape emoji with prefix dot. # >> 😄 # >> 🔰 # >> 💩 # >> 🎃 # >> 👍 # >> I 💔 you! # >> The 📝 is mightier than 🔫 # >> 🍡 is better than 🌻 # >> 疲れたら 🍺 を飲もう！ # >> 🐟 + 🔪 => 🍣 # >> fush + hocho => 🍣
jugyo/named_emoji inspired me to create emot.
I built the mapping table of emoji name and unicode using github/gemoji.
- Fork it ( https://github.com/[my-github-username]/emot/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request