rich/tools/make_emoji.py

15 lines
323 B
Python
Raw Normal View History

2020-03-27 20:01:42 +00:00
from unicodedata import normalize
2019-11-26 17:38:47 +00:00
try:
import emoji
except ImportError:
print("pip install emoji")
raise
from emoji.unicode_codes import EMOJI_ALIAS_UNICODE
2020-06-10 11:55:04 +00:00
emoji = {k.lower().strip(":"): v for k, v in EMOJI_ALIAS_UNICODE.items()}
2019-11-26 17:38:47 +00:00
with open("_emoji_codes.py", "wt") as f:
f.write("EMOJI=" + str(emoji))