summaryrefslogtreecommitdiffstats
path: root/tools/make_emoji.py
blob: b23803d5019e082a19d7347cd0f2472042f916c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from unicodedata import normalize

try:
    import emoji
except ImportError:
    print("pip install emoji")
    raise

from emoji.unicode_codes import EMOJI_ALIAS_UNICODE

emoji = {k.lower().strip(":"): v for k, v in EMOJI_ALIAS_UNICODE.items()}

with open("_emoji_codes.py", "wt") as f:
    f.write("EMOJI=" + str(emoji))