💚 Emoji for Crystal
Crystal
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets Add emojize binary Dec 31, 2015
bin Add emojize binary Dec 31, 2015
spec Remove emoji from string Nov 23, 2016
src Version bump Jun 22, 2018
utils Upgrade ameba May 14, 2018
.ameba.yml Ameba lint Nov 16, 2017
.gitignore Crystal 0.25 support Jun 22, 2018
.travis.yml Crystal 0.25 support Jun 22, 2018
LICENSE Crystal 0.25 support Jun 22, 2018
README.md Remove emoji from string Nov 23, 2016
shard.lock Crystal 0.25 support Jun 22, 2018
shard.yml Version bump Jun 22, 2018

README.md

emoji.cr Build Status

Emoji library for Crystal. Inspired by Emoji for Python

Installation

As a dependency in shard.yml:

dependencies:
  emoji:
    github: veelenga/emoji.cr
    branch: master

Usage

require "emoji"

puts Emoji.emojize("I :heart: :beer: and :football:")

Will print the following in console:

Also it is possible to remove all emoji from the string:

str = Emoji.emojize("Girl on :fire:")
Emoji.sanitize(str) #=> "Girl on "

Binary

You may also compile and use emojize binary that just prints to console emojized string:

$ crystal build bin/emojize
$ ./emojize It will boom: :boom:

Resources

Contributing

  1. Fork it ( https://github.com/veelenga/emoji.cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request