1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
royalnet/utils/emojify.py

57 lines
1.6 KiB
Python
Raw Normal View History

2019-02-19 18:37:17 +00:00
import random
emojis = {
"abcd": ["🔡", "🔠"],
"back": ["🔙"],
"cool": ["🆒"],
"free": ["🆓"],
"abc": ["🔤"],
"atm": ["🏧"],
"new": ["🆕"],
"sos": ["🆘"],
"top": ["🔝"],
"zzz": ["💤"],
"end": ["🔚"],
"ab": ["🆎"],
"cl": ["🆑"],
"id": ["🆔"],
"ng": ["🆖"],
"no": ["♑️"],
"ok": ["🆗"],
"on": ["🔛"],
"sy": ["💱"],
"tm": ["™️"],
"wc": ["🚾"],
"up": ["🆙"],
"a": ["🅰️"],
"b": ["🅱️"],
2019-02-19 18:37:17 +00:00
"c": ["☪️", "©", "🥐"],
"e": ["📧", "💶"],
"f": ["🎏"],
"h": ["🏨", "🏩", "🏋‍♀", "🏋‍♂"],
"i": ["", "♊️", "🕕"],
"j": ["⤴️"],
2019-02-19 18:37:17 +00:00
"k": ["🎋", "🦅", "💃"],
"l": ["🛴", "🕒"],
"m": ["♏️", "Ⓜ️", "〽️"],
"n": ["📈"],
"o": ["⭕️", "🅾️", "📯", "🌝", "🌚", "🌕", "🥯", "🙆‍♀", "🙆‍♂"],
"p": ["🅿️"],
"q": ["🔍", "🍀"],
"r": ["®"],
"s": ["💰", "💵", "💸", "💲"],
"t": ["✝️", "⬆️", "☦️"],
2019-02-19 18:37:17 +00:00
"u": ["", "⚓️", "🍉", "🌙", "🐋"],
"v": ["", "🔽", "☑️", "✔️"],
"w": ["🤷‍♀","🤷‍♂", "🤾‍♀", "🤾‍♂", "🤽‍♀", "🤽‍♂"],
2019-02-19 20:25:56 +00:00
"y": ["💴"],
"x": ["🙅‍♀", "🙅‍♂", "", ""],
"z": ["⚡️"]
2019-02-19 18:37:17 +00:00
}
def emojify(string: str):
2019-02-19 20:06:57 +00:00
new_string = string.lower()
2019-02-19 18:37:17 +00:00
for key in emojis:
selected_emoji = random.sample(emojis[key], 1)[0]
new_string = new_string.replace(key, selected_emoji)
return new_string