diff options
Diffstat (limited to '')
-rw-r--r-- | tools/make_emoji.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/make_emoji.py b/tools/make_emoji.py new file mode 100644 index 0000000..b23803d --- /dev/null +++ b/tools/make_emoji.py @@ -0,0 +1,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)) |