1
import chardataeffect, inkex, string
3
class C(chardataeffect.CharDataEffect):
5
chardataeffect.CharDataEffect.__init__(self)
6
self.OptionParser.add_option("-f", "--from_text", action="store", type="string", dest="from_text", default="", help="Replace")
7
self.OptionParser.add_option("-t", "--to_text", action="store", type="string", dest="to_text", default="", help="by")
9
def process_chardata(self,text, line, par):
10
fr = self.options.from_text.strip('"').replace('\$','$')
11
to = self.options.to_text.strip('"').replace('\$','$')
13
return (text.replace(unicode(fr,"utf-8"), unicode(to,"utf-8")))