emojis-list icon indicating copy to clipboard operation
emojis-list copied to clipboard

map emoji names with emojis

Open astoilkov opened this issue 8 years ago • 9 comments

I have emoji names like :shipit: :cat: and I want to display them as :shipit: :cat:. I have looked at emojis-keywords but the array mapping is not the same meaning emoji-keywords[5] != emojis-list[5]. Do you have suggestions on how this could be achieved?

astoilkov avatar Oct 03 '16 07:10 astoilkov

The problem is the source:

  • emojis-list use https://twitter.github.io/twemoji/2/test/preview.html li elements as reference.
  • emojis-keywords use https://github.com/WebpageFX/emoji-cheat-sheet.com/tree/master/public/graphics/emojis directory as reference.

So for do that we need to update the source using a one common source

Kikobeats avatar Oct 03 '16 07:10 Kikobeats

Looks like could be possible because we have li elements here https://github.com/WebpageFX/emoji-cheat-sheet.com/blob/master/public/index.html#L121

but emoji-cheat-sheet are images, no real emoji :'(

Kikobeats avatar Oct 03 '16 07:10 Kikobeats

That would be awesome

astoilkov avatar Oct 03 '16 07:10 astoilkov

Why not use GitHub's API? https://api.github.com/emojis

Mottie avatar Feb 11 '17 18:02 Mottie

because we didn't know it 😄

as you can see in the Github API endpoint it points to a image, so we need a way to determinate the emoji from the keyword ¯_(ツ)_/¯

Kikobeats avatar Feb 11 '17 19:02 Kikobeats

because we didn't know it 😄

I just learned about it today too LOL

The image URL includes the unicode character(s)

"family_man_woman_girl_girl": "https://assets-cdn.github.com/images/icons/emoji/unicode/1f468-1f469-1f467-1f467.png?v7",

You could extract that and convert it to unicode:

\u{1f468}\u{1f469}\u{1f467}\u{1f467}

Mottie avatar Feb 11 '17 19:02 Mottie

uh, interesting.

I tagged this issue as v3 iteration.

let's define what include in this new iteration:

  • an array with all the emoji (like v2).
  • an array with all keywords, that match 1:1 with the array of emoji.
  • an array of all images?

on the other hand the interface.

  • by default, the dependency return the array of emoji (backward compatibility with v2)
  • .getKeyword that convert emoji into keyword. For example .getKeyword(💙) → 'blue_heart'
  • .getEmoji that convert keyword into emoji. For example .getKeyword('blue_heart') → 💙.
  • .getImage that convert keyword/emoji into image.

What do you think? I need feedback for user cases 😄

Kikobeats avatar Feb 11 '17 20:02 Kikobeats

There is also emojilib which contains some basic meta information... it does not however match GitHub terms 1:1...

For example, :couplekiss_woman_woman: (:couplekiss_woman_woman:) is listed as female_couplekiss

  "couplekiss": {
    "keywords": ["pair", "valentines", "love", "like", "dating", "marriage"],
    "char": "💏",
    "category": "people"
  },
  "female_couplekiss": {
    "keywords": ["pair", "valentines", "love", "like", "dating", "marriage"],
    "char": "👩‍❤️‍💋‍👩",
    "category": "people"
  },
  "male_couplekiss": {
    "keywords": ["pair", "valentines", "love", "like", "dating", "marriage"],
    "char": "👨‍❤️‍💋‍👨",
    "category": "people"
  }

I just added a request to include some kind of cross-reference in https://github.com/muan/emojilib/issues/112.

Mottie avatar Feb 11 '17 20:02 Mottie

I used emojilib in the past but it looks outdated.

Kikobeats avatar Feb 11 '17 20:02 Kikobeats