File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 22import xml .etree .ElementTree as ET
33
44svg = "{http://www.w3.org/2000/svg}"
5- fType = sys .argv [1 ] # Type file
6- fBase = sys .argv [2 ] # Base file
5+ fTop = sys .argv [1 ] # Type file
6+ fBottom = sys .argv [2 ] # Base file
77fTarget = sys .argv [3 ] # Target file
88
99# All svg elements and definitions are copied from file 1 to file 2
1010# File 1's contents will appear on top of File 2's contents, so File 2 should only be the base shape
1111# It is assumed that both files have the same dimensions, and that elements are aligned properly
1212
13- tTree = ET .parse (fType )
13+ tTree = ET .parse (fTop )
1414tRoot = tTree .getroot ()
1515defs = tRoot .find (f"{ svg } defs" )
1616
2323 shapes .append (element )
2424
2525# Now we take all of those defs and shapes, then add them to the tree of our base file
26- bTree = ET .parse (fBase )
26+ bTree = ET .parse (fBottom )
2727bRoot = bTree .getroot ()
2828bDefs = bRoot .find (f"{ svg } defs" )
2929
You can’t perform that action at this time.
0 commit comments