Commit Graph

10 Commits

Author SHA1 Message Date
Mislav Marohnić
3b65ee2f15 Merge pull request #49 from github/edit-emoji
Add API for adding new / editing existing emoji
2014-07-04 11:54:55 +08:00
Mislav Marohnić
3935375ca8 Change emoji creation API to take name as 1st argument
It's more likely that someone will want to add a new emoji with a custom
image rather than a character that has a Unicode representation.

Also move the VARIATION_SELECTOR_16 logic outside of Emoji::Character
since it doesn't need to be concerned with it.
2014-07-03 18:13:55 +08:00
Mislav Marohnić
06c5d0993b Fix some emoji images
/cc @charliesome because I only discovered these mismatches because of
his trains
2014-07-03 00:23:02 +08:00
Mislav Marohnić
bbfae32663 HTML page to preview the emoji database 2014-06-28 07:50:16 +08:00
Mislav Marohnić
a9112090fa Tweak tags for some emoji
Ensure that tags accurately describe the original meaning of the emoji
(with respect to its definition from Unicode spec).
2014-06-27 18:25:56 +08:00
Mislav Marohnić
70db910026 Add dump script to inspect Unicode descriptions & aliases
This script was used to construct the initial `emoji.json` file.

Example:

    rake db:dump | less -r
2014-06-27 11:21:45 +08:00
Mislav Marohnić
07e15fde99 Remove duplicate image for shipit squirrel 2014-06-27 11:21:45 +08:00
Mislav Marohnić
2fad57ed49 Get emoji list & aliases from data file instead of symlinks
Previously, emoji name & unicode aliases were determined by following
symlinks among `images/emoji/*.png`. This led to nontrivial code for
resolving these aliases, made it tricky for contributors to add new
aliases and inspect existing ones, and didn't leave room for adding
metadata to emojis such as tags or descriptions from the Unicode spec.

Moreover, the aliases as symlinks led to duplication of image assets in
users' applications, with `hocho.png` and `knife.png` representing the
same emoji but being two separate images. Users were also unsure what to
do with `unicode/{HEX-NAME}.png` files, which would end up among their
images after running the `:emoji` task.

This change removes the symlinks support and creates the list of emojis
and their aliases in `emoji.json`. A single emoji is now represented with
an Emoji::Character instance, which has the `image_filename` method to
determine the path to the corresponding image instead of having to
construct it manually.
2014-06-27 11:21:45 +08:00
Mislav Marohnić
f1d0bfedaf Simplify db:generate task and have JSON be human-readable 2014-03-12 12:16:15 +01:00
Javan Makhmali
c180447c5b Compare our emoji to emoji straight from the horse's mouth 2013-11-06 09:22:12 -05:00