add missing flags emoji
|
@ -4143,6 +4143,46 @@
|
|||
{
|
||||
"code": "1f5e8",
|
||||
"name": "left_speech_bubble"
|
||||
},
|
||||
{
|
||||
"code": "1f1e8-1f1f3",
|
||||
"name": "cn"
|
||||
},
|
||||
{
|
||||
"code": "1f1eb-1f1f7",
|
||||
"name": "fr"
|
||||
},
|
||||
{
|
||||
"code": "1f1e9-1f1ea",
|
||||
"name": "de"
|
||||
},
|
||||
{
|
||||
"code": "1f1ee-1f1f9",
|
||||
"name": "it"
|
||||
},
|
||||
{
|
||||
"code": "1f1ef-1f1f5",
|
||||
"name": "jp"
|
||||
},
|
||||
{
|
||||
"code": "1f1f7-1f1fa",
|
||||
"name": "ru"
|
||||
},
|
||||
{
|
||||
"code": "1f1f0-1f1f7",
|
||||
"name": "kr"
|
||||
},
|
||||
{
|
||||
"code": "1f1ea-1f1f8",
|
||||
"name": "es"
|
||||
},
|
||||
{
|
||||
"code": "1f1ec-1f1e7",
|
||||
"name": "gb"
|
||||
},
|
||||
{
|
||||
"code": "1f1fa-1f1f8",
|
||||
"name": "us"
|
||||
}
|
||||
],
|
||||
"aliases": {
|
||||
|
@ -4248,35 +4288,35 @@
|
|||
"flag_black": [
|
||||
"waving_black_flag"
|
||||
],
|
||||
"flag_cn": [
|
||||
"cn"
|
||||
"cn": [
|
||||
"flag_cn"
|
||||
],
|
||||
"flag_de": [
|
||||
"de"
|
||||
"de": [
|
||||
"flag_de"
|
||||
],
|
||||
"flag_es": [
|
||||
"es"
|
||||
"es": [
|
||||
"flag_es"
|
||||
],
|
||||
"flag_fr": [
|
||||
"fr"
|
||||
"fr": [
|
||||
"flag_fr"
|
||||
],
|
||||
"flag_gb": [
|
||||
"gb"
|
||||
"gb": [
|
||||
"flag_gb"
|
||||
],
|
||||
"flag_it": [
|
||||
"it"
|
||||
"it": [
|
||||
"flag_it"
|
||||
],
|
||||
"flag_jp": [
|
||||
"jp"
|
||||
"jp": [
|
||||
"flag_jp"
|
||||
],
|
||||
"flag_kr": [
|
||||
"kr"
|
||||
"kr": [
|
||||
"flag_kr"
|
||||
],
|
||||
"flag_ru": [
|
||||
"ru"
|
||||
"ru": [
|
||||
"flag_ru"
|
||||
],
|
||||
"flag_us": [
|
||||
"us"
|
||||
"us": [
|
||||
"flag_us"
|
||||
],
|
||||
"flag_white": [
|
||||
"waving_white_flag"
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
EMOJI_LIST_URL = "http://unicode.org/emoji/charts/full-emoji-list.html"
|
||||
EMOJI_KEYWORDS_URL = "https://raw.githubusercontent.com/muan/emojilib/master/emojis.json"
|
||||
|
||||
# until MS release the emoji flags, we'll use custom made flags
|
||||
WINDOWS_FLAGS = Set.new ["1f1e8_1f1f3", "1f1e9_1f1ea", "1f1ea_1f1f8", "1f1eb_1f1f7", "1f1ec_1f1e7", "1f1ee_1f1f9", "1f1ef_1f1f5", "1f1f0_1f1f7", "1f1f7_1f1fa", "1f1fa_1f1f8"]
|
||||
|
||||
desc "update emoji images"
|
||||
task "emoji:update" => :environment do
|
||||
emojis = {}
|
||||
|
@ -18,9 +21,10 @@ task "emoji:update" => :environment do
|
|||
next unless char = keywords[k]["char"].presence
|
||||
|
||||
code = char.codepoints
|
||||
.map { |c| c.to_s(16).rjust(4, "0") }
|
||||
.join("_")
|
||||
.gsub(/_fe0f$/i, "")
|
||||
.map { |c| c.to_s(16).rjust(4, "0") }
|
||||
.join("_")
|
||||
.downcase
|
||||
.gsub(/_fe0f$/, "")
|
||||
|
||||
emojis[code] ||= { name: k }
|
||||
end
|
||||
|
@ -42,7 +46,12 @@ task "emoji:update" => :environment do
|
|||
google = cell_to_image(cells[5])
|
||||
twitter = cell_to_image(cells[6])
|
||||
one = cell_to_image(cells[7])
|
||||
windows = cell_to_image(cells[9])
|
||||
|
||||
if WINDOWS_FLAGS.include?(code)
|
||||
windows = custom_windows_flag(code)
|
||||
else
|
||||
windows = cell_to_image(cells[9])
|
||||
end
|
||||
|
||||
if apple.blank? || google.blank? || twitter.blank? || one.blank? || windows.blank?
|
||||
emojis.delete(code)
|
||||
|
@ -79,6 +88,11 @@ def cell_to_image(cell)
|
|||
Base64.decode64(img["src"][/base64,(.+)$/, 1])
|
||||
end
|
||||
|
||||
def custom_windows_flag(code)
|
||||
name = code.upcase.tr("_", "-")
|
||||
open("https://github.com/discourse/discourse-emoji-extractor/raw/master/win10/72x72/windows_#{name}.png").read
|
||||
end
|
||||
|
||||
def write_emojis(emojis, aliases, style, folder)
|
||||
path = "public/images/emoji/#{folder}/"
|
||||
|
||||
|
|
BIN
public/images/emoji/apple/cn.png
Normal file
After Width: | Height: | Size: 960 B |
BIN
public/images/emoji/apple/de.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/apple/es.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/images/emoji/apple/flag_cn.png
Normal file
After Width: | Height: | Size: 960 B |
BIN
public/images/emoji/apple/flag_de.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/apple/flag_es.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/images/emoji/apple/flag_fr.png
Normal file
After Width: | Height: | Size: 925 B |
BIN
public/images/emoji/apple/flag_gb.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
public/images/emoji/apple/flag_it.png
Normal file
After Width: | Height: | Size: 908 B |
BIN
public/images/emoji/apple/flag_jp.png
Normal file
After Width: | Height: | Size: 935 B |
BIN
public/images/emoji/apple/flag_kr.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/images/emoji/apple/flag_ru.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
public/images/emoji/apple/flag_us.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
public/images/emoji/apple/fr.png
Normal file
After Width: | Height: | Size: 925 B |
BIN
public/images/emoji/apple/gb.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
public/images/emoji/apple/it.png
Normal file
After Width: | Height: | Size: 908 B |
BIN
public/images/emoji/apple/jp.png
Normal file
After Width: | Height: | Size: 935 B |
BIN
public/images/emoji/apple/kr.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/images/emoji/apple/ru.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
public/images/emoji/apple/us.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
public/images/emoji/emoji_one/cn.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
public/images/emoji/emoji_one/de.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/emoji_one/es.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
public/images/emoji/emoji_one/flag_cn.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
public/images/emoji/emoji_one/flag_de.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/emoji_one/flag_es.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
public/images/emoji/emoji_one/flag_fr.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/emoji_one/flag_gb.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
public/images/emoji/emoji_one/flag_it.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/emoji_one/flag_jp.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
public/images/emoji/emoji_one/flag_kr.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
public/images/emoji/emoji_one/flag_ru.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/emoji_one/flag_us.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
public/images/emoji/emoji_one/fr.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/emoji_one/gb.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
public/images/emoji/emoji_one/it.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/emoji_one/jp.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
public/images/emoji/emoji_one/kr.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
public/images/emoji/emoji_one/ru.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/emoji/emoji_one/us.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
public/images/emoji/google/cn.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
public/images/emoji/google/de.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
public/images/emoji/google/es.png
Normal file
After Width: | Height: | Size: 980 B |
BIN
public/images/emoji/google/flag_cn.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
public/images/emoji/google/flag_de.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
public/images/emoji/google/flag_es.png
Normal file
After Width: | Height: | Size: 980 B |
BIN
public/images/emoji/google/flag_fr.png
Normal file
After Width: | Height: | Size: 843 B |
BIN
public/images/emoji/google/flag_gb.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
public/images/emoji/google/flag_it.png
Normal file
After Width: | Height: | Size: 826 B |
BIN
public/images/emoji/google/flag_jp.png
Normal file
After Width: | Height: | Size: 956 B |
BIN
public/images/emoji/google/flag_kr.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
public/images/emoji/google/flag_ru.png
Normal file
After Width: | Height: | Size: 851 B |
BIN
public/images/emoji/google/flag_us.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
public/images/emoji/google/fr.png
Normal file
After Width: | Height: | Size: 843 B |
BIN
public/images/emoji/google/gb.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
public/images/emoji/google/it.png
Normal file
After Width: | Height: | Size: 826 B |
BIN
public/images/emoji/google/jp.png
Normal file
After Width: | Height: | Size: 956 B |
BIN
public/images/emoji/google/kr.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
public/images/emoji/google/ru.png
Normal file
After Width: | Height: | Size: 851 B |
BIN
public/images/emoji/google/us.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
public/images/emoji/twitter/cn.png
Normal file
After Width: | Height: | Size: 384 B |
BIN
public/images/emoji/twitter/de.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
public/images/emoji/twitter/es.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
public/images/emoji/twitter/flag_cn.png
Normal file
After Width: | Height: | Size: 384 B |
BIN
public/images/emoji/twitter/flag_de.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
public/images/emoji/twitter/flag_es.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
public/images/emoji/twitter/flag_fr.png
Normal file
After Width: | Height: | Size: 247 B |
BIN
public/images/emoji/twitter/flag_gb.png
Normal file
After Width: | Height: | Size: 667 B |
BIN
public/images/emoji/twitter/flag_it.png
Normal file
After Width: | Height: | Size: 224 B |
BIN
public/images/emoji/twitter/flag_jp.png
Normal file
After Width: | Height: | Size: 353 B |
BIN
public/images/emoji/twitter/flag_kr.png
Normal file
After Width: | Height: | Size: 751 B |
BIN
public/images/emoji/twitter/flag_ru.png
Normal file
After Width: | Height: | Size: 229 B |
BIN
public/images/emoji/twitter/flag_us.png
Normal file
After Width: | Height: | Size: 357 B |
BIN
public/images/emoji/twitter/fr.png
Normal file
After Width: | Height: | Size: 247 B |
BIN
public/images/emoji/twitter/gb.png
Normal file
After Width: | Height: | Size: 667 B |
BIN
public/images/emoji/twitter/it.png
Normal file
After Width: | Height: | Size: 224 B |
BIN
public/images/emoji/twitter/jp.png
Normal file
After Width: | Height: | Size: 353 B |
BIN
public/images/emoji/twitter/kr.png
Normal file
After Width: | Height: | Size: 751 B |
BIN
public/images/emoji/twitter/ru.png
Normal file
After Width: | Height: | Size: 229 B |
BIN
public/images/emoji/twitter/us.png
Normal file
After Width: | Height: | Size: 357 B |
BIN
public/images/emoji/win10/cn.png
Normal file
After Width: | Height: | Size: 439 B |
BIN
public/images/emoji/win10/de.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
public/images/emoji/win10/es.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
public/images/emoji/win10/flag_cn.png
Normal file
After Width: | Height: | Size: 439 B |
BIN
public/images/emoji/win10/flag_de.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
public/images/emoji/win10/flag_es.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
public/images/emoji/win10/flag_fr.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
public/images/emoji/win10/flag_gb.png
Normal file
After Width: | Height: | Size: 698 B |
BIN
public/images/emoji/win10/flag_it.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
public/images/emoji/win10/flag_jp.png
Normal file
After Width: | Height: | Size: 415 B |
BIN
public/images/emoji/win10/flag_kr.png
Normal file
After Width: | Height: | Size: 796 B |
BIN
public/images/emoji/win10/flag_ru.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
public/images/emoji/win10/flag_us.png
Normal file
After Width: | Height: | Size: 247 B |
BIN
public/images/emoji/win10/fr.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
public/images/emoji/win10/gb.png
Normal file
After Width: | Height: | Size: 698 B |
BIN
public/images/emoji/win10/it.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
public/images/emoji/win10/jp.png
Normal file
After Width: | Height: | Size: 415 B |
BIN
public/images/emoji/win10/kr.png
Normal file
After Width: | Height: | Size: 796 B |