Code

Prune initial timer work.
[inkscape.git] / share / extensions / text_replace.py
index 73b562743fd0a51cd9c82fec886e35f1521282cd..b5d960430ee0a26884bb220a1737411a7c5b961b 100644 (file)
@@ -1,16 +1,17 @@
-import chardataeffect, inkex, string\r
-\r
-class C(chardataeffect.CharDataEffect):\r
-  def __init__(self):\r
-    chardataeffect.CharDataEffect.__init__(self)\r
-    self.OptionParser.add_option("-f", "--from_text", action="store", type="string", dest="from_text", default="", help="Replace")\r
-    self.OptionParser.add_option("-t", "--to_text", action="store", type="string", dest="to_text", default="", help="by")\r
-             \r
-  def process_chardata(self,text, line, par):\r
-    fr = self.options.from_text.strip('"').replace('\$','$')\r
-    to = self.options.to_text.strip('"').replace('\$','$')\r
-\r
-    return (text.replace(unicode(fr,"utf-8"), unicode(to,"utf-8")))\r
-\r
-c = C()\r
-c.affect()\r
+#!/usr/bin/env python
+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()