Skip to content

Commit

Permalink
make variable names clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
wpkelso committed Jan 25, 2025
1 parent c0559a1 commit a3fc21f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/composite-svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import xml.etree.ElementTree as ET

svg = "{http://www.w3.org/2000/svg}"
fType = sys.argv[1] # Type file
fBase = sys.argv[2] # Base file
fTop = sys.argv[1] # Type file
fBottom = sys.argv[2] # Base file
fTarget = sys.argv[3] # Target file

# All svg elements and definitions are copied from file 1 to file 2
# File 1's contents will appear on top of File 2's contents, so File 2 should only be the base shape
# It is assumed that both files have the same dimensions, and that elements are aligned properly

tTree = ET.parse(fType)
tTree = ET.parse(fTop)
tRoot = tTree.getroot()
defs = tRoot.find(f"{svg}defs")

Expand All @@ -23,7 +23,7 @@
shapes.append(element)

# Now we take all of those defs and shapes, then add them to the tree of our base file
bTree = ET.parse(fBase)
bTree = ET.parse(fBottom)
bRoot = bTree.getroot()
bDefs = bRoot.find(f"{svg}defs")

Expand Down

0 comments on commit a3fc21f

Please sign in to comment.