diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-03-21 11:52:05 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-03-21 11:52:05 +0000 |
| commit | 35dbee2c542660e1ab2c2aa3ed8f0bc052ebd0a1 (patch) | |
| tree | 1339b657212153803c8b575b3862a4864928da71 /share | |
| parent | update to trunk (diff) | |
| parent | Improve the cache system of bspline, "Correctly" show bspline weight power on... (diff) | |
| download | inkscape-35dbee2c542660e1ab2c2aa3ed8f0bc052ebd0a1.tar.gz inkscape-35dbee2c542660e1ab2c2aa3ed8f0bc052ebd0a1.zip | |
update to trunk
(bzr r13645.1.48)
Diffstat (limited to 'share')
| -rwxr-xr-x | share/extensions/restack.py | 8 | ||||
| -rwxr-xr-x | share/extensions/text_extract.py | 24 | ||||
| -rw-r--r-- | share/extensions/text_merge.py | 4 | ||||
| -rw-r--r-- | share/keys/macromedia-freehand-mx.xml | 4 |
4 files changed, 20 insertions, 20 deletions
diff --git a/share/extensions/restack.py b/share/extensions/restack.py index 615b41527..507353025 100755 --- a/share/extensions/restack.py +++ b/share/extensions/restack.py @@ -54,9 +54,9 @@ class Restack(inkex.Effect): svg = self.document.getroot() parentnode = self.current_layer file = self.args[ -1 ] - + #get all bounding boxes in file by calling inkscape again with the --query-all command line option - #it returns a comma seperated list structured id,x,y,w,h + #it returns a comma separated list structured id,x,y,w,h if bsubprocess: p = Popen('inkscape --query-all "%s"' % (file), shell=True, stdout=PIPE, stderr=PIPE) err = p.stderr @@ -65,12 +65,12 @@ class Restack(inkex.Effect): reader=csv.CSVParser().parse_string(f) #there was a module cvs.py in earlier inkscape that behaved differently except: reader=csv.reader(f.split( os.linesep )) - err.close() + err.close() else: _,f,err = os.popen3('inkscape --query-all "%s"' % ( file ) ) reader=csv.reader( f ) err.close() - + #build a dictionary with id as the key dimen = dict() for line in reader: diff --git a/share/extensions/text_extract.py b/share/extensions/text_extract.py index bf263ef39..dfcddefdc 100755 --- a/share/extensions/text_extract.py +++ b/share/extensions/text_extract.py @@ -42,15 +42,15 @@ class Extract(inkex.Effect): def __init__(self): inkex.Effect.__init__(self) self.OptionParser.add_option("-d", "--direction", - action="store", type="string", + action="store", type="string", dest="direction", default="tb", help="direction to extract text") self.OptionParser.add_option("-x", "--xanchor", - action="store", type="string", + action="store", type="string", dest="xanchor", default="m", help="horizontal point to compare") self.OptionParser.add_option("-y", "--yanchor", - action="store", type="string", + action="store", type="string", dest="yanchor", default="m", help="vertical point to compare") @@ -58,15 +58,15 @@ class Extract(inkex.Effect): if len(self.selected)==0: for node in self.document.xpath('//svg:text | //svg:flowRoot', namespaces=inkex.NSS): self.selected[node.get('id')] = node - + if len( self.selected ) > 0: objlist = [] svg = self.document.getroot() parentnode = self.current_layer file = self.args[ -1 ] - - #get all bounding boxes in file by calling inkscape again with the --query-all command line option - #it returns a comma seperated list structured id,x,y,w,h + + # get all bounding boxes in file by calling inkscape again with the --query-all command line option + # it returns a comma separated list structured id,x,y,w,h if bsubprocess: p = Popen('inkscape --query-all "%s"' % (file), shell=True, stdout=PIPE, stderr=PIPE) err = p.stderr @@ -75,12 +75,12 @@ class Extract(inkex.Effect): reader=csv.CSVParser().parse_string(f) #there was a module cvs.py in earlier inkscape that behaved differently except: reader=csv.reader(f.split( os.linesep )) - err.close() + err.close() else: _,f,err = os.popen3('inkscape --query-all "%s"' % ( file ) ) reader=csv.reader( f ) err.close() - + #build a dictionary with id as the key dimen = dict() for line in reader: @@ -89,7 +89,7 @@ class Extract(inkex.Effect): if not bsubprocess: #close file if opened using os.popen3 f.close - + #find the center of all selected objects **Not the average! x,y,w,h = dimen[self.selected.keys()[0]] minx = x @@ -131,7 +131,7 @@ class Extract(inkex.Effect): cy = y + h else: # middle cy = y + h / 2 - + #direction chosen if self.options.direction == "tb": objlist.append([cy,id]) @@ -146,7 +146,7 @@ class Extract(inkex.Effect): #move them to the top of the object stack in this order. for item in objlist: self.recurse(deepcopy(self.selected[item[1]])) - + def recurse(self, node): istext = (node.tag == '{http://www.w3.org/2000/svg}flowPara' or node.tag == '{http://www.w3.org/2000/svg}flowDiv' or node.tag == '{http://www.w3.org/2000/svg}text') if node.text != None or node.tail != None: diff --git a/share/extensions/text_merge.py b/share/extensions/text_merge.py index dc6ee331c..625f14b75 100644 --- a/share/extensions/text_merge.py +++ b/share/extensions/text_merge.py @@ -73,8 +73,8 @@ class Merge(inkex.Effect): parentnode = self.current_layer file = self.args[ -1 ] - #get all bounding boxes in file by calling inkscape again with the --query-all command line option - #it returns a comma seperated list structured id,x,y,w,h + # get all bounding boxes in file by calling inkscape again with the --query-all command line option + # it returns a comma separated list structured id,x,y,w,h if bsubprocess: p = Popen('inkscape --query-all "%s"' % (file), shell=True, stdout=PIPE, stderr=PIPE) err = p.stderr diff --git a/share/keys/macromedia-freehand-mx.xml b/share/keys/macromedia-freehand-mx.xml index 3512806bf..89069a217 100644 --- a/share/keys/macromedia-freehand-mx.xml +++ b/share/keys/macromedia-freehand-mx.xml @@ -35,7 +35,7 @@ File, Edit, View, Modify, Text, Xtras, Window, Help. <bind key="F1" modifiers="Shift" action="ToolRect" display="true"/> - <!-- Freehand has seperate tools for Ellipse and Arc unlike Inkscape. --> + <!-- Freehand has separate tools for Ellipse and Arc unlike Inkscape. --> <bind key="F3" modifiers="Shift" action="ToolArc" display="true"/> <!-- Star (Inkscape). Polygon (Freehand) inlcudes star options. --> @@ -396,7 +396,7 @@ File, Edit, View, Modify, Text, Xtras, Window, Help. <bind key="F3" modifiers="Ctrl" action="DialogFillStroke" display="true"/> <bind action="DialogObjectProperties" /> - <!-- Freehand has a seperate find and replace for Text and Graphics --> + <!-- Freehand has a separate find and replace for Text and Graphics --> <!-- Edit, Find And Replace, Graphics Ctrl+F --> <bind key="f" modifiers="Ctrl" action="DialogFind" display="true"/> <bind key="F" modifiers="Ctrl" action="DialogFind" /> |
