diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-07-10 01:05:35 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-07-10 01:05:35 +0000 |
| commit | dad440d0f3c0aa5ddd38bd4e8043d31617efb19b (patch) | |
| tree | 8e0092eb1aebc7643432ea8001acaacd058c3019 | |
| parent | Updated Makefile.am file lists for Mac OS X icons and share/examples (diff) | |
| download | inkscape-dad440d0f3c0aa5ddd38bd4e8043d31617efb19b.tar.gz inkscape-dad440d0f3c0aa5ddd38bd4e8043d31617efb19b.zip | |
fix namespaces
(bzr r3203)
| -rw-r--r-- | share/extensions/lorem_ipsum.py | 14 |
1 files changed, 7 insertions, 7 deletions
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'))
|
