Skip to content

Instantly share code, notes, and snippets.

@eloraburns
Created September 6, 2022 17:55
Show Gist options
  • Save eloraburns/d06de6cd46341c974495026b4e6a263e to your computer and use it in GitHub Desktop.
Save eloraburns/d06de6cd46341c974495026b4e6a263e to your computer and use it in GitHub Desktop.
Smallcaps converter, for #yelling
#!/usr/bin/env python3
import sys
to_smallcaps = {
"a": "ᴀ",
"b": "ʙ",
"c": "ᴄ",
"d": "ᴅ",
"e": "ᴇ",
"f": "ꜰ",
"g": "ɢ",
"h": "ʜ",
"i": "ɪ",
"j": "ᴊ",
"k": "ᴋ",
"l": "ʟ",
"m": "ᴍ",
"n": "ɴ",
"o": "ᴏ",
"p": "ᴘ",
"q": "ǫ",
"r": "ʀ",
"s": "ꜱ",
"t": "ᴛ",
"u": "ᴜ",
"v": "ᴠ",
"w": "ᴡ",
"x": "x",
"y": "ʏ",
"z": "ᴢ",
}
s = sys.stdin.read().lower()
for a in to_smallcaps:
s = s.replace(a, to_smallcaps[a])
sys.stdout.write(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment