1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +00:00
royalnet/utils/emojify.py

59 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": ["☪️", "©", "🥐"],
2019-03-08 11:53:30 +00:00
"d": ["🇩"],
2019-02-19 18:37:17 +00:00
"e": ["📧", "💶"],
"f": ["🎏"],
2019-03-08 11:53:30 +00:00
"g": ["🇬"],
2019-02-19 18:37:17 +00:00
"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": ["🤷‍♀","🤷‍♂", "🤾‍♀", "🤾‍♂", "🤽‍♀", "🤽‍♂"],
"x": ["🙅‍♀", "🙅‍♂", "", ""],
2019-03-08 11:53:30 +00:00
"y": ["💴"],
"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