emojidex core tools and scripts in Ruby. Provides a set of tools to utilize emojidex emoji right away in Ruby. Available as the "emojidex" gem.
The emojidex gem can be used either on-line or off-line. Offline components require you to bundle the assets you want to use by including either the emojidex-vectors gem for SVG assets or emojidex-rasters gem for PNG assets. Simply including "emojidex-vectors" or "emojidex-rasters" in your Gemfile or having the gem installed will enable this. Without one or both of these gems installed the off-line components will fall back to connecting to the emojidex service and, if they are unable to connect, will attempt to find the assets in the emojidex cache (usually found in $HOME/.emojidex).
emojidex isn't just a set of emoji and some tools, it's a full service that allows anyone to register their own emoji and for anyone else to use them. emojidex can also store a users favorites and history.
The emojidex Client attempts to make using emojidex for an end-user application as simple as
possible. There is no need to manually cache or join collections or separately instantiate a
user as these are all done for you. A client will automatically try to load user details and
a primary emoji cache from
$HOME/.emojidex unless overridden by the EMOJI_CACHE
environment variable or by instantiating a client with the cache_path option like
emojidex = Emojidex::Client.new(cache_path: "/path/to/cache").
The Collection is the primary container for sets of emoji. All containers inherit from Emojidex::Data::Collection.
the Emojidex::Data::Emoji object contains the details of a single emoji.
When using emojidex off-line you will only have access to the collections you have included or have available locally. Two collections are available as gems, the emojidex-rasters gem contains PNG in various sizes and the emojidex-vectors gem contains SVG assets. Both contain the UTF and Extended collections. To use either of them you simply need to make an instance of one or more of the named collections in 'emojidex/data' after requiring either 'emojidex-rasters' or 'emojidex-vectors. We'll use the more-commonly used PNG rasters for this example:
For UTF (Unicode Standard) emoji:
require 'emojidex-rasters' require 'emojidex/data/utf' emoji = Emojidex::Data::UTF.new
For Extended (emojidex Original) emoji:
require 'emojidex-rasters' require 'emojidex/data/extended' emoji = Emojidex::Data::Extended.new
For all emoji in the cache (will include UTF and Extended if they have been cached):
require 'emojidex/data/collection' emoji = Emojidex::Data::Collection.new
For a combined set of UTF, Extended and Cached emoji:
require 'emojidex/data/collection' require 'emojidex/data/utf' require 'emojidex/data/extended' emoji = Emojidex::Data::Collection.new emoji << Emojidex::Data::UTF.new emoji << Emojidex::Data::Extended.new
Off-line usage is limited to open-source projects. If you are using this gem without connecting to the emojidex service and your project is not open-source a commercial license is required. Please contact info at emojidex dot com for details.
emojidex and emojidex tools are licensed under the emojidex Open License.
©2013 the emojidex project / K.K. GenSouSha [Phantom Creation Inc.]