From: buliabyak Date: Tue, 10 Jul 2007 01:05:35 +0000 (+0000) Subject: fix namespaces X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1387a16004898ef4b23f7a510d0c409f7043338;p=inkscape.git fix namespaces --- diff --git a/share/extensions/lorem_ipsum.py b/share/extensions/lorem_ipsum.py index 2de7b0e60..602b1eedf 100644 --- a/share/extensions/lorem_ipsum.py +++ b/share/extensions/lorem_ipsum.py @@ -188,18 +188,18 @@ class MyEffect(inkex.Effect): action="store", type="int", dest="fluctuation", default=4, help="+/-") - self.first_sentence = 1 - + self.first_sentence = 1 + def makePara(self): _min=max(1,self.options.sentencecount-self.options.fluctuation) _max=max(2,self.options.sentencecount+self.options.fluctuation) scount=random.randint(_min,_max) text='' for i in range(scount): - if self.first_sentence == 1: - text+=foo[0] - self.first_sentence = 0 - else: + if self.first_sentence == 1: + text+=foo[0] + self.first_sentence = 0 + else: text+=foo[random.randint(0,len(foo)-1)] return text @@ -219,7 +219,7 @@ class MyEffect(inkex.Effect): if found==0: #inkex.debug('No "flowRoot" elements selected. Unable to add text.') svg=self.document.getroot() - gattribs = {inkex.addNS('label','inkscape'):'fill text',inkex.addNS('groupmode','inkscape'):'layer'} + gattribs = {'inkscape:label':'lorem ipsum','inkscape:groupmode':'layer'} g=inkex.etree.SubElement(svg,inkex.addNS('g','svg'),gattribs) flowRoot=inkex.etree.SubElement(g,inkex.addNS('flowRoot','svg'),{'xml:space':'preserve'}) flowRegion=inkex.etree.SubElement(flowRoot,inkex.addNS('flowRegion','svg'))