summaryrefslogtreecommitdiffstats
path: root/share/extensions/text_replace.py
diff options
context:
space:
mode:
authorPeter Moulder <peter.moulder@monash.edu>2008-03-29 10:21:03 +0000
committerpjrm <pjrm@users.sourceforge.net>2008-03-29 10:21:03 +0000
commit48cfa43e90e580b90d9d8ce37524cf79a06d56be (patch)
tree6c323130b2f0c2fb32503513474fb36d84fc7ab9 /share/extensions/text_replace.py
parentsvn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packa... (diff)
downloadinkscape-48cfa43e90e580b90d9d8ce37524cf79a06d56be.tar.gz
inkscape-48cfa43e90e580b90d9d8ce37524cf79a06d56be.zip
svn propset svn:eol-style native *.py
(bzr r5228)
Diffstat (limited to 'share/extensions/text_replace.py')
-rw-r--r--share/extensions/text_replace.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/share/extensions/text_replace.py b/share/extensions/text_replace.py
index 73b562743..0d6e501f5 100644
--- a/share/extensions/text_replace.py
+++ b/share/extensions/text_replace.py
@@ -1,16 +1,16 @@
-import chardataeffect, inkex, string
-
-class C(chardataeffect.CharDataEffect):
- def __init__(self):
- chardataeffect.CharDataEffect.__init__(self)
- self.OptionParser.add_option("-f", "--from_text", action="store", type="string", dest="from_text", default="", help="Replace")
- self.OptionParser.add_option("-t", "--to_text", action="store", type="string", dest="to_text", default="", help="by")
-
- def process_chardata(self,text, line, par):
- fr = self.options.from_text.strip('"').replace('\$','$')
- to = self.options.to_text.strip('"').replace('\$','$')
-
- return (text.replace(unicode(fr,"utf-8"), unicode(to,"utf-8")))
-
-c = C()
-c.affect()
+import chardataeffect, inkex, string
+
+class C(chardataeffect.CharDataEffect):
+ def __init__(self):
+ chardataeffect.CharDataEffect.__init__(self)
+ self.OptionParser.add_option("-f", "--from_text", action="store", type="string", dest="from_text", default="", help="Replace")
+ self.OptionParser.add_option("-t", "--to_text", action="store", type="string", dest="to_text", default="", help="by")
+
+ def process_chardata(self,text, line, par):
+ fr = self.options.from_text.strip('"').replace('\$','$')
+ to = self.options.to_text.strip('"').replace('\$','$')
+
+ return (text.replace(unicode(fr,"utf-8"), unicode(to,"utf-8")))
+
+c = C()
+c.affect()