emoji cipher change

This commit is contained in:
Corban-Lee Jones 2024-06-29 18:21:39 +01:00
parent bcb0f2470a
commit e9c805f8ed

View File

@ -23,9 +23,9 @@ gothic_dict = {
# For emoji substitution # For emoji substitution
emoji_dict = { emoji_dict = {
'a': '🅰️', 'b': '🅱️', 'c': '🌜', 'd': '🌛', 'e': '📧', 'f': '🎏', 'g': '🌀', 'h': '', 'i': '', 'a': '🇦', 'b': '🇧', 'c': '🇨', 'd': '🇩', 'e': '🇪', 'f': '🇫', 'g': '🇬', 'h': '🇭', 'i': '🇮',
'j': '🎷', 'k': '🎋', 'l': '👢', 'm': 'Ⓜ️', 'n': '', 'o': '', 'p': '🅿️', 'q': '🍳', 'r': '🌱', 'j': '🇯', 'k': '🇰', 'l': '🇱', 'm': '🇲', 'n': '🇳', 'o': '🇴', 'p': '🇵', 'q': '🇶', 'r': '🇷',
's': '💲', 't': '🌴', 'u': '', 'v': '', 'w': '🔱', 'x': '', 'y': '🍸', 'z': '' 's': '🇸', 't': '🇹', 'u': '🇺', 'v': '🇻', 'w': '🇼', 'x': '🇽', 'y': '🇾', 'z': '🇿'
} }
# For Zalgo translation # For Zalgo translation
@ -41,6 +41,16 @@ morse_code_dict = {
'?': '..--..', '/': '-..-.', '-': '-....-', '(': '-.--.', ')': '-.--.-', ' ': '/' '?': '..--..', '/': '-..-.', '-': '-....-', '(': '-.--.', ')': '-.--.-', ' ': '/'
} }
class Mutator:
pass
class SubstututionCipher(Mutator):
def apply(text: str, cipher: dict[str, str]):
return "".join(cipher.get(c.lower(), c) for c in text)
def uwu(text: str) -> str: def uwu(text: str) -> str:
""" """
Returns an 'uwuified' version of the given string. Returns an 'uwuified' version of the given string.
@ -225,9 +235,8 @@ def cat_speak(text: str) -> str:
return " ".join(cat_text) return " ".join(cat_text)
def nerdify(text: str) -> str: def nerdify(text: str) -> str:
nerdy_phrases = ['quark', 'photon', 'nanobot', 'AI', 'quantum', 'algorithm'] text.replace(".", "☝️🤓.")
words = text.split() return text
return ' '.join(word + random.choice(nerdy_phrases) if random.random() < 0.3 else word for word in words)
def backward_words(text: str) -> str: def backward_words(text: str) -> str:
return ' '.join(word[::-1] for word in text.split()) return ' '.join(word[::-1] for word in text.split())
@ -295,11 +304,11 @@ mutator_map = {
"VAL": valley_girl, "VAL": valley_girl,
"DEG": degeneracy, "DEG": degeneracy,
"CAT": cat_speak, "CAT": cat_speak,
"NRD": (), "NRD": nerdify,
"BKW": (), "BKW": backward_words,
"RNG": (), "RNG": lambda: None,
"RAS": (), "RAS": lambda: None,
"SHK": (), "SHK": lambda: None,
"RBT": (), "RBT": lambda: None,
"EMI": (), "EMI": lambda: None,
} }