github / gemoji Goto Github PK
View Code? Open in Web Editor NEWEmoji images and names.
License: MIT License
Emoji images and names.
License: MIT License
Just wanted to check if :simple_smile:
, which is listed among the People at https://www.webfx.com/tools/emoji-cheat-sheet/, is known to be missing? Is it perhaps supposed to map to :slightly_smiling_face:
, per https://api.github.com/emojis?
Thanks for the handy gem!
hi! am trying to setup gemoji but when i try to use render the emoji to my view i get an 404 error for the emoji.
am on OS X Yosemite, for what i get the gemoji extract command
is only for macOS Sierra or later. so am not sure whats wrong. Any help will be appreciated. thanks
I wrote an emoji picker for rofi, and so I also maintain a list of emojis. Since there are no official aliases, rofimoji also doesn't have any, which is not ideal.
I'd like to use your emojis.json file for this, and I think the license allows this. However, I'd rather not depend on some file in some folder, but would much rather have a separate project. Have you thought about splitting the db
folder off as a separate project for others to use?
This way, it would be much cleaner and maintenance of the aliases (and the other data) could be comunity-driven and concentrated on one repo.
Please define Emoji ZWJ Sequences for custom emojis, so they become interchangeable. That would be perfectly valid according to UTR#51.
{
"emoji": "βΊοΈ\u200Dπ"
, "aliases": [
"basecamp"
]
, "tags": [
"custom"
]
}
, {
"emoji": "βΊοΈ\u200Dβ°"
, "aliases": [
"basecampy"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π\u200Dπ"
, "aliases": [
"bowtie"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π\u200DπΎ"
, "aliases": [
"feelsgood"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π\u200DπΎ"
, "aliases": [
"finnadie"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π\u200DπΎ"
, "aliases": [
"goberserk"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π\u200DπΎ"
, "aliases": [
"godmode"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π€\u200DπΎ"
, "aliases": [
"hurtrealbad"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π€\u200Dπ―"
, "aliases": [
"neckbeard"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π±\u200Dπ"
, "aliases": [
"octocat"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π‘\u200DπΎ"
, "aliases": [
"rage1"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π‘\u200Dπ’\u200DπΎ"
, "aliases": [
"rage2"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π‘\u200Dπ’\u200Dπ’\u200DπΎ"
, "aliases": [
"rage3"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π‘\u200Dπ’\u200Dπ’\u200Dπ’\u200DπΎ"
, "aliases": [
"rage4"
]
, "tags": [
"custom"
]
}
, {
"emoji": "πΏ\u200Dπ΄"
, "aliases": [
"shipit"
, "squirrel"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π€\u200DπΎ"
, "aliases": [
"suspect"
]
, "tags": [
"custom"
]
}
, {
"emoji": "π¬\u200Dπ’"
, "aliases": [
"trollface"
]
, "tags": [
"custom"
]
}
Line 1 in 38731ce
I'm writing the following in my code without new lines:
:eu: :romania: :portugal: :it: :es: :fr:
But each emoji displays on a new line.
It does not seem to be documented in this repository, but somehow Github seems to support non-standard electron
and atom
emojis for the respective products. They should probably be dealt with the same as other extensions like octocat
. The same goes, of course, for any other "emojis" I'm not yet aware of.
While Gemoji currently does not even support Unicode 10.0 / Emoji 5.0 yet #134 #136, the 2018 Emoji 11.0 data files have already been published with a full release being scheduled for June.
Apple will probably not release iOS and macOS updates with new emoji graphics before very late in 2018, but since Apple lately seems to be pushing against other vendors reusing their graphics, you might as well update emoji.json now and adopt Google Noto, Twitter Twemoji or Emojione/Emojitwo (which were intended to be supported anyway #72). Twitter in particular was very early to release an update in 2017.
I believe correct racing car emoji lives here
But in your json, it has different codepoints
here is comparison
The first car is from unicode.org and the second one is from the latest db/emoji.json
In the earlier version of db/emoji.json the racing car symbol was correct, but then something changed.
The same issue with a motorcycle - it also has \uFE0F
excessive postfix
I think you need to check all the symbols if they have such distortion.
Hi we recently upgraded to Rails 5.1.1 and sprockets-rails 3.2.0 and saw an issue with the emojify helper you guys suggest. sprockets-rails 3.2.0 requires you to to explicitly tell the image_path
helper if you'd like it to skip the asset pipeline and use the public/
folder.
rails/rails#29535
https://www.schneems.com/2016/11/21/writing-a-rails-feature-blow-by-blow/
Not sure what the best way to update the instructions would be but happy to open a PR.
Hello, the extractor is not working so no way to get the actual images.
It's in db/emoji.json starting at line 439, but both Emoji.find_by_alias 'raised_eyebrow'
and Emoji.find_by_unicode("\u{1f928}")
return nil
.
I tested on two different systems (macOS 10.15.5 and Ubuntu 16.04), both running Ruby 2.7.1 with gemoji 3.0.1 installed from the gem.
I'm afraid this is was not an error previously but I'm assuming this library hasn't been updated recently.
The EmojiHelper module indicated on the Readme docs is raising errors during its execution.
module EmojiHelper
def emojify(content)
h(content).to_str.gsub(/:([\w+-]+):/) do |match|
if emoji = Emoji.find_by_alias($1)
%(<img alt="#$1" src="#{image_path("emoji/#{emoji.image_filename}")}" style="vertical-align:middle" width="20" height="20" />)
else
match
end
end.html_safe if content.present?
end
end
Error is a NoMethodError thrown by Ruby reading the h(content) method.
NoMethodError (undefined method `h' for #<BlogsController:0x00007f4a2e1f7488>):
Extracting emojis does not work as described in the Readme at all, neither on Mac OS El Capitan nor on Mac OS Sierra. The command gemoji extract public/images/emoji
was introduced for 3.0.0.rc1, so the current description does not match the behavior of the version 2.1.0 that is installed currently using bundle install
. Previously the gemoji gem apparently used rake emoji
but this does not work either for the gem version 2.1.0. This leaves the user a bit confused π .
There's a couple of aliases that use dashes instead of underscores: t-rex
, e-mail
, non-potable_water
, -1
.
Discord for example uses underscores for first three, and doesn't have -1
alias.
In The Lounge typing :-P
would trigger our auto completion for non-potable_water, so for now I just replaced dashes to underscores (except for -1
) which should probably be fine.
Any reason for gemoji to keep dashes in these?
Was looking to create a project on reusable react components (github.com/copied-components/copied-components) and would like to use the writing hand emoji from Apple βοΈ
Would this be possible? Also looking for contributors to get started!
I find the code "return if glyph_name =~ /.1-5/" of extractor.rb.
If I want to export the emoji images of different skin, how to modify the code of extractor.rb?
Thanks a lot!
Hi,
please add static font file to the project.
Ubuntu: Errno::ENOENT: No such file or directory @ rb_sysopen - /System/Library/Fonts/Apple Color Emoji.ttc
Thanks!
ποΈ can be \U+1f3cb\U+fe0f
or \U+1f3cb
, the later doesn't get parsed by gemoji
\U+1f3cb\U+fe0f
-> get parsed to :weight_lifting_man:
\U+1f3cb
-> fail to get parsed
I think it's because there's actually two implementations
http://emojipedia.org/weight-lifter/ added to Emoji 1.0 in 2015.
http://emojipedia.org/man-weight-lifting/ added to Emoji 4.0 in 2016.
It appears the cricket π¦ emoji is missing from emoji.json
. Maybe that has something to do with π being present and its alias being "cricket"?
Hello! Any chance you can cut a new release of this gem? We have the latest version (3.0.1
), but it's missing a fair number of newer emoji, e.g. π₯ͺ.
gem "gemoji"
(v2.1.0) to my Gemfilebundle exec gemoji public/images/emoji
gem "gemoji"
to my Gemfilebundle exec gemoji public/images/emoji
bundler: command not found: gemoji
Use the gem directly from the GitHub repo (repo version is 3.0.0.rc1)
Other information:
Unsure if this would impact it but my Ruby version is 2.3.1 and I'm running Rails 5.
No "emoji" property where "shipit" is. The same applies for "octocat". This way we can't support both of these emojis.
{
"aliases": [
"shipit"
, "squirrel"
]
, "tags": [
]
}
I've searched through issues and examined the DB and from what I can tell, the library currently reports what emojis can accept a skin tone modifier but doesn't actually provide the modified variants, but rather, only/always the base emoji. That's fine, it seems like it should be easy to produce the variants by appending the modifiers to the base.
Unfortunately, this fails for all of the emojis that have U+FE0F VARIATION SELECTOR-16
appended. As an example, when copying "β" and "ποΈ" out of emojis.json
, I can do "β" + "π»" and get "βπ»", but "ποΈ" + "π»" results in "ποΈπ»".
It looks like this library intentionally includes the selector for certain emojis. Moreover, trying to drop the selector, then append the modifier to the remaining unicode scalars, results in correctly modified emoji for only some of the results ("ποΈ" yes; "π¨βπ³" no).
Do you folks have recommendations on how to apply the modifiers?
Hi
There are things that can not be seen in the browser with the current emoji, but will they not manage the flags?
example
\u{1F923}
When I run bundle exec gemoji extract public/images/emoji
, I get the following error:
.../.bundle/gems/gemoji-3.0.0.rc1/lib/emoji/extractor.rb:18:in `initialize': No such file or directory - /System/Library/Fonts/Apple Color Emoji.ttc (Errno::ENOENT)
ls
ing the Fonts
directory reveals that on my machine, the font has an extension of .ttf
rather than .ttc
. Logging an issue here rather than creating a PR since I don't know if this is a typo or if some machines have the font under .ttc
instead of .ttf
.
Hello!
We use your gems in high-load application and faced with a problem :
NoMethodError
in function .find_by_unicode
/.find_by_alias
.After some review, we found problem: when we use Gemoji in multithreading, variable @all
defined in first thread, but not fill-in yet. Second thread use .find_by_unicode
, pass check on @all
and return not defined @unicode_index
=> NoMethodError
.
I create a RSpec test for you:(it don't looks great, but I have small xp in testing yet:) )
require 'emoji'
RSpec.describe "Multithread error" do
it "raises" do
Thread.new { 10000.times { Emoji.find_by_unicode 't' }}
expect { Emoji.find_by_unicode 't' }.to raise_error {NoMethodError}
end
end
and propose to use Mutex in this functions to avoid this problem.
private
@mutex = Mutex.new
...
def find_by_unicode(unicode)
@mutex.syncronize do
unicodes_index[unicode]
end
end
def find_by_alias(unicode)
@mutex.syncronize do
names_index[names]
end
end
Maybe, you have another ideas for this error :)
Sorry, I have a lot of questions, so I feel may be I was a trouble-maker (cry emoji) now.
But I found can't export "26D1.png".
Thanks!
the detail error message as follow:
/usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/json/common.rb:156:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/json/common.rb:156:in `new'
from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/json/common.rb:156:in `parse'
from /Users/FE/code/github/gemoji/lib/emoji.rb:84:in `block in parse_data_file'
from /Users/FE/code/github/gemoji/lib/emoji.rb:84:in `open'
from /Users/FE/code/github/gemoji/lib/emoji.rb:84:in `parse_data_file'
from /Users/FE/code/github/gemoji/lib/emoji.rb:23:in `all'
from db/dump.rb:57:in `<main>'
db/emoji.json | 22561 --------------------------------------------------------
1 file changed, 22561 deletions(-)
Thanks a lot!
There are no keywords in vendor/unicode-emoji-test.txt
I also cannot find machine-readable emoji list with tags at unicode.org
The best source I found is keywords from this page:
https://unicode.org/emoji/charts/emoji-list.html
But looks like tags in db/emoji.json do not match these keywords.
I tried to look into the code, but found no signs of external resources usage.
I ask about tags because I need them, but I see a lot of emojis do not have tags.
So I suspect emoji.json is not fully generated using external resources but maintained manually?
So should/may I contribute by adding missing tags?
We had some that were added during testing and these need removing, but it's not clear how I can do that. Removing the image files from assets just leaves a missing image icon where the emoji was.
Lines 13394 to 13405 in 5361b56
The aliase for PinΜata is pi_ata
as shown above. Is it correct? I think pinata
may be better?
Forgive me if this isn't the right place for this, but I'd love to see two new emoji added: :ballot_box_without_check:
and :radio_button_unchecked:
.
While I was writing some documentation for a project, I wanted to display what settings a user should set with GitHub's emoji. Only problem is, there's no "unchecked" state for either the ballot box or radio button emojis, so I had to resort to using :white_large_square:
and :white_circle:
, which don't really look like the ballot box or radio button emojis.
Apple added support for Emoji 12.1 (October 2019).
https://emojipedia.org/emoji-12.1/
To obtain image files as fallbacks for browsers and OS's that don't support emoji, run the gemoji extract command on macOS Sierra or later: π’
If there's a relatively easy win for this, I'd be happy to add to the documentation.
Thank you!
Hi, I'm using your gemoji to create this https://github.com/onmyway133/emoji, to help myself search emoji better.
It 'd be great if I can display like : star :
(I add spaces here to that it is not converted to emoji) so that I can copy-paste it right away. I try to escape with back tick, but it always shows as "β "
Thanks
The db:generate
rake task is broken on macOS 10.13 and up because (I might be wrong on this) it looks like Apple started using a private framework to get emoji data in the Character Palette. I did some junior-level spelunking with class-dump
but couldnβt figure out how to use the private framework. The best solution that I can think of at the moment is to cross-reference the output of Apple Color Emoji.ttc
with unicode CLDR data.
There seems to be a bunch of emojis that've been introduced in version 8.0 of Unicode. It'd be awesome if you guys could update your emoji set for the new emojis. We use your gem to tokenize emojis so that they don't break content during database inserts and we have started noticing instances where your gem fails to tokenize.
References
[1] http://www.unicode.org/versions/Unicode8.0.0/?utm_source=next.36kr.com#Character_Additions
[2] https://m.reddit.com/r/Unicode/comments/2m45k9/new_emoji_coming_for_upcoming_unicode_8/
This adds a walrus emoji. I personally believe this would make the world a better place. This is wished for by everyone at my company. We all really like walruses.
<3 <3 <3 <3 <3 :walrus: <3 <3 <3 <3 <3
Is it possible to do something similar?
I see that the current latest ios_version is 10.2, can you update emoji for iOS 11.
My project is using iOS 11 and i foudn that some emoji is not supported.
What about emoji for android, I see that some emoji for android isn't supported.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.