rich/tools/make_emoji.py

13 lines
288 B
Python
Raw Normal View History

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))