Git Product home page Git Product logo

Comments (20)

abdurrahmanekr avatar abdurrahmanekr commented on September 18, 2024 2

@omnidan, I actually sorted the emoji array. And succeeded. This is the sorted array, like:

const emoji = require('node-emoji')
// array transfer
var result = [];
for (var i in emoji.emoji)
	result.push(emoji.emoji[i])
// sort
result = result.sort();
// People category 1156 to 1236 (Namely 80 pieces)
result = result.slice(1156, 1236)
// end
result == ["😀", "😁", "😂", "😃", "😄", "😅", "😆", "😆", "😇", "😈", "😉", "😊", "😋", "😌", "😍", "😎", "😏", "😐", "😑", "😒", "😓", "😔", "😕", "😖", "😗", "😘", "😙", "😚", "😛", "😜", "😝", "😞", "😟", "😠", "😡", "😢", "😣", "😤", "😥", "😦", "😧", "😨", "😩", "😪", "😫", "😬", "😭", "😮", "😯", "😰", "😱", "😲", "😳", "😴", "😵", "😶", "😷", "😸", "😹", "😺", "😻", "😼", "😽", "😾", "😿", "🙀", "🙁", "🙂", "🙃", "🙄", "🙅", "🙆", "🙇", "🙈", "🙉", "🙊", "🙋", "🙌", "🙍", "🙎"]

from node-emoji.

emanuelbuholzer avatar emanuelbuholzer commented on September 18, 2024 2

Thanks, that makes the whole process a lot easier. I'll work on category support in the next few days.

from node-emoji.

emanuelbuholzer avatar emanuelbuholzer commented on September 18, 2024 2

If everybody agrees I'll implement categories according to recommended sort order, which is the default ordering of emoji characters from Unicode CLDR data.

For more information about the categories visit: http://unicode.org/emoji/charts/emoji-ordering.html

from node-emoji.

emanuelbuholzer avatar emanuelbuholzer commented on September 18, 2024 2

I started working on category support. If I'd implement it according to the source above (http://unicode.org/emoji/charts/emoji-ordering.html), the technique for getting emojis showed by @abdurrahmanekr would not work. It looks like the ordering isn't the same as the ordering within the Unicode CLDR data, furthermore it looks like some emojis are missing.

As an alternative I could implement category support like within most emoji keyboards/selectors or we could refactor the codebase, so that it is close to the Unicode CLDR data. What do you all think?

from node-emoji.

emanuelbuholzer avatar emanuelbuholzer commented on September 18, 2024 1

Yes that's why I'd need it. Okay, so I'll start working on it.

from node-emoji.

emanuelbuholzer avatar emanuelbuholzer commented on September 18, 2024 1

After some more, I stillt haven't found a way of grouping them together automatiaclly. I'll put this into the list of "things I'll do at a suitable time in the future". I'll put all work into a branch - if anyone want's to help

from node-emoji.

smeijer avatar smeijer commented on September 18, 2024 1

I think this file can be useful. As it seems to me that they've already categorized based on unicode. In that case, we can simply update the build script, and leave some credit.

https://github.com/OneSignal/emoji-picker/blob/master/lib/js/config.js#L851

from node-emoji.

GaryTowers avatar GaryTowers commented on September 18, 2024 1

Hey guys, I noticed this is an old post. Did this feature get considered on any release? @emanuelbuholzer is this something you are still working on?

from node-emoji.

omnidan avatar omnidan commented on September 18, 2024

This would be interesting, especially for applications that let users pick emoji. A PR would be very welcome 😁

from node-emoji.

emanuelbuholzer avatar emanuelbuholzer commented on September 18, 2024

I just checked out the code and this will be a lot of repetitive boring work. Does anyone have an idea to do this without a simple manual made mapping table?

If not, I'll do the manual work 😭

from node-emoji.

omnidan avatar omnidan commented on September 18, 2024

@emanuelbuholzer maybe you can find a list that groups emoji in categories, e.g. on a website - then you could automatically read this into a category: [emoji, ...] mapping with a little bit of JS magic ✨

from node-emoji.

abdurrahmanekr avatar abdurrahmanekr commented on September 18, 2024

@emanuelbuholzer Looks good to me 👍

from node-emoji.

omnidan avatar omnidan commented on September 18, 2024

@emanuelbuholzer looks good 👍 would be nice if you could implement category support and submit a PR 😁

from node-emoji.

Gotemperor avatar Gotemperor commented on September 18, 2024

Some icons are not showing, why?

from node-emoji.

smeijer avatar smeijer commented on September 18, 2024

Do you have an example @Gotemperor?

from node-emoji.

Gotemperor avatar Gotemperor commented on September 18, 2024

I am using localhost on my linux machine, so I can not gice you an example, but I see also missing icons when I open the github repository examples, they look like that
, "🙁", "🙂", "🙃", "🙄", "🙅", "🙆", "🙇", "🙈", "🙉", "🙊", "🙋", "🙌", "🙍", "🙎"

from node-emoji.

Gotemperor avatar Gotemperor commented on September 18, 2024

hmm, strange, they look ok here, but not ok on my localhost, can it be related to my localhost, to linux, or to missing font files? I used npm to install

from node-emoji.

omnidan avatar omnidan commented on September 18, 2024

@Gotemperor github defines fallback images for unsupported emoji. it seems like your platform does not support the latest emoji set. I tried running the example code on macOS 10.12.6 and they all show up fine for me (in the console).

from node-emoji.

Richienb avatar Richienb commented on September 18, 2024

@GaryTowers I'm pretty sure emojilib proves data for this to be possible. If we were to add this to node-emoji it would be using it.

from node-emoji.

wdfinch avatar wdfinch commented on September 18, 2024

@GaryTowers I wrote a script to parse a json file with emojis and their respective categories. I uploaded the script and the json output to wdfinch/emojis-json-formatted.

In the json folder, you'll find a file containing a bunch of emojis organized by category and sub-category. Additionally, you'll find a file that contains a single large json object in a compatible format with this library.

Let me know if this works for you.

from node-emoji.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.