Created
July 9, 2021 22:13
-
-
Save twirrim/adeb5b0a5aeb254f89519040148e0f9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import sys | |
flipdict = { | |
'a': 'ɐ', | |
'b': 'q', | |
'c': 'ɔ', | |
'C': 'Ɔ', | |
'd': 'p', | |
'e': 'ǝ', | |
'E': 'Ǝ', | |
'f': 'ɟ', | |
'g': 'ƃ', | |
'h': 'ɥ', | |
'i': 'ı', | |
'j': 'ɾ', | |
'k': 'ʞ', | |
'l': '⌉', | |
'm': 'ɯ', | |
'n': 'u', | |
'o': 'o', | |
'p': 'd', | |
'q': 'b', | |
'r': 'ɹ', | |
's': 's', | |
'S': 'S', | |
't': 'ʇ', | |
'u': 'n', | |
'v': 'ʌ', | |
'V': 'Λ', | |
'w': 'ʍ', | |
'x': 'x', | |
'y': 'ʎ', | |
'.': '˙', | |
'[': ']', | |
'(': ')', | |
'{': '}', | |
'?': '¿', | |
'!': '¡', | |
"'": ',', | |
'<': '>', | |
'_': '‾', | |
';': '؛', | |
'‿': '⁀', | |
'⁅': '⁆', | |
'∴': '∵', } | |
def flip_letter(letter): | |
if letter in flipdict: | |
return flipdict[letter] | |
return letter | |
def fliptext(text): | |
text = text[::-1] | |
flipped = ''.join(map(flip_letter, text)) | |
output = "(╯°□°)╯︵ ┻━ {} ━┻".format(flipped) | |
print(output) | |
if __name__ == '__main__': | |
fliptext(sys.argv[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have this on my box as "iflip" and in my $PATH, so I can do: