parent
d51b44fb57
commit
0409bcbe65
|
@ -248,10 +248,8 @@ def ticksPerMM(tree):
|
||||||
|
|
||||||
def svgMerge(box, inkscape, output):
|
def svgMerge(box, inkscape, output):
|
||||||
|
|
||||||
parser = ElementTree.XMLParser(remove_blank_text=True)
|
src_tree = ElementTree.parse(box)
|
||||||
|
dest_tree = ElementTree.parse(inkscape)
|
||||||
src_tree = ElementTree.parse(box, parser)
|
|
||||||
dest_tree = ElementTree.parse(inkscape, parser)
|
|
||||||
dest_root = dest_tree.getroot()
|
dest_root = dest_tree.getroot()
|
||||||
|
|
||||||
src_width, src_height = getSizeInMM(src_tree)
|
src_width, src_height = getSizeInMM(src_tree)
|
||||||
|
@ -276,7 +274,7 @@ def svgMerge(box, inkscape, output):
|
||||||
scale_x, scale_y, off_x, off_y))
|
scale_x, scale_y, off_x, off_y))
|
||||||
|
|
||||||
# write the xml file
|
# write the xml file
|
||||||
ElementTree.ElementTree(dest_root).write(output, pretty_print=True, encoding='utf-8', xml_declaration=True)
|
ElementTree.ElementTree(dest_root).write(output, encoding='utf-8', xml_declaration=True)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
svg = SVGFile("examples/box.svg")
|
svg = SVGFile("examples/box.svg")
|
||||||
|
|
Loading…
Reference in New Issue