-
Notifications
You must be signed in to change notification settings - Fork 0
/
TextOddifier.py
82 lines (77 loc) · 3.16 KB
/
TextOddifier.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Similar letter substituter
# To make text look a bit strange
# Now with added diacritics
from random import choice
SLD = { 'A':'ĀĂĄАѦѨӐӒӔḀẲⰡ⍲ᗗḀḂḄḆΆΑАѦѨӐӒ',
'a':'āăąаѧѩӑӓӕḁẳ⎀ᴀӓӕḁảȃȧȁ',
'B':'ВѢҌ฿ḂḄḆᙗᙫΒϐᗷᙖᗸʙßѢҌḂḄḆ',
'b':'ЉЊБЪЬъыьѣҍḃḅḇᒀᖲʙᏏɓβþ',
'C':'ĆĊČСҪℂ℃ϾϹÇĈҪɕĈƇ',
'c':'ćĉċčҫçĉʗčƈ',
'D':'ĎĐḊḌḎḐḒ⫐⫒ᗫᗤᎠᎴḎḊḐḒ',
'd':'ďđԀԁԂԃḓḑḏḍḋᑽᖱɗð',
'E':'ĒĔĖĘĚŒЀЁЄЕѤӔӖԘ⋵⋶ᕮЄЕЁѤ',
'e':'ēĕėęěœеѐёѥӕӗԙȇȩȅ',
'F':'ҒӺḞ℉ᖴҒӺḞϜϝƑғƒ',
'f':'ſғӻẛẜẝḟƒʃғ',
'G':'ĜĞĠĢԌḠǦǤǴǪᏀᏳԌ',
'g':'ĝğġģḡǧǥǵɠ',
'H':'ĤĦЊНҔҢҤӇӉԊԢԨԪĦΉҔҢҤ',
'h':'ĥħЂЋђћҕңҥӈӊԡԦԧℎℏɦħʜ',
'I':'ĨĪĬİIJІЇЮѤѨӀΊİЇ',
'i':'ĩīĭįıijіїѩ༐༑ȉȋ',
'J':'IJĴЈЉӇԈԒԔᒏĴЈЉ',
'j':'ijĵЛјӈԓԕȷɉʝ',
'K':'ĶЌЖКҖҚҜҞҠӃԖԞԪКҖҚҜҞ',
'k':'ķĸкҗқҝҟҡӄԗԟƙ',
'L':'ĹĻĽĿŁḶḸḺḼᒺĿŁḶ',
'l':'ĺļľŀłḷḹḻḽɫ',
'M':'МӍᴍḾṀṂḾṀṂ',
'm':'ӎᵚᵯmṃṁḿɱ',
'N':'ŃŅŇŊЍИЙҊӢӤŃŅŇӢӤ',
'n':'ńņňʼnŋҋᵰŋńñņ',
'O':'ŌŎŐŒОЮѺӦ⥀⥁ΌŎŐЮѺ',
'o':'ōŏőœбоѻӧоȯøǫ',
'P':'РҎԖⰒⰐᑬᑭᑮᑶᑸΡҎРᑬᑭ',
'p':'рҏԗᵱⱀᖰρр',
'Q':'ҀԚⰢ',
'q':'ҁԛⱉ',
'R':'ŔŖŘЯԄԆԖԘ℞ᖇŘЯԄ',
'r':'ŕŗřѓгŕȓřɾ',
'S':'ŚŜŞŠЅṦṨᔡŜŞЅṨ',
's':'śŝşšѕᵴṩṧṥ',
'T':'ŢŤŦЂЃЋГТѢѢҬԎТЃТҬ',
't':'ţťŧҭԏ',
'U':'ŨŪŬŮŰŲ⩂⩁⋃ᙈᙀŬŮŰ⩂',
'u':'ũūŭůűųũ',
'V':'ѴѶṼṾⰜ⩢⩣⩛⩝⍱⋁ᐻѶṼṾⰜ',
'v':'ѵѷṿṽⱌ⩡ѵṽṿ',
'W':'ŴѠѼѾԜŴѼѾ',
'w':'ŵѡѽѿԝ',
'X':'ЖХҖӁӜӼӾԔХҖӜӼ',
'x':'жхҗӂӝӽӿԕẋ',
'Y':'ŶŸЎУҮӮӰӲЎҮӮ',
'y':'ŷуўӯӱӳӯ',
'Z':'ŹŻŽᤏᤁŹŻŽ',
'z':'źżžᙇ',
'.':'.․⁝⁞',
'?':'?‽⁇⁈',
'!':'!‽⁉',
}
DIA = (852,813,804,797,798,790,811,858,841,803,819,776,853,815,771,840,828,857,
792,796,814,825,800,837,806,826,785,769,818,791,817,
772,793,851,812,810,854,768,780,774,805,809,808,783,839,846,845,827,
777,816,799,770)
def oddify(text):
result = ""
for i in text:
try: result += choice(SLD[i])
except:
result += i
# we can add as many diacritics as we like, but for now, just add one.
result += chr(choice(DIA)) + chr(choice(DIA)) + chr(choice(DIA))
return result
if __name__ == '__main__':
s = input("enter the text you want to oddify: ")
print(oddify(s))
input("Press enter when done:")