home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
Inkscape
/
Inkscape-0.48.2-1-win32.exe
/
share
/
extensions
/
text_braille.py
< prev
next >
Wrap
Text File
|
2011-07-08
|
1KB
|
46 lines
#encoding: utf-8
import chardataeffect, inkex, string
convert_table = {\
'a': unicode("Γáü", "utf-8"),\
'b': unicode("Γáâ", "utf-8"),\
'c': unicode("Γáë", "utf-8"),\
'd': unicode("ΓáÖ", "utf-8"),\
'e': unicode("Γáæ", "utf-8"),\
'f': unicode("Γáï", "utf-8"),\
'g': unicode("⠛", "utf-8"),\
'h': unicode("Γáô", "utf-8"),\
'i': unicode("Γáè", "utf-8"),\
'j': unicode("⠚", "utf-8"),\
'k': unicode("Γáà", "utf-8"),\
'l': unicode("Γáç", "utf-8"),\
'm': unicode("Γáì", "utf-8"),\
'n': unicode("⠝", "utf-8"),\
'o': unicode("Γáò", "utf-8"),\
'p': unicode("⠏", "utf-8"),\
'q': unicode("⠟", "utf-8"),\
'r': unicode("Γáù", "utf-8"),\
's': unicode("⠎", "utf-8"),\
't': unicode("⠞", "utf-8"),\
'u': unicode("⠥", "utf-8"),\
'v': unicode("⠧", "utf-8"),\
'w': unicode("⠺", "utf-8"),\
'x': unicode("Γá¡", "utf-8"),\
'y': unicode("⠽", "utf-8"),\
'z': unicode("⠵", "utf-8"),\
}
class C(chardataeffect.CharDataEffect):
def process_chardata(self,text, line, par):
r = ""
for c in text:
if convert_table.has_key(c.lower()):
r = r + convert_table[c.lower()]
else:
r = r + c
return r
c = C()
c.affect()