Commit 102cd73f authored by gijs's avatar gijs

Translation parsing

parent e086610a
......@@ -57,15 +57,15 @@ with open('timeline.inkscape.svg', 'r') as handle:
animation = get_group_by_label(soup, 'animation')
print(pattern)
transform = animation.get('transform')
m = pattern.match(transform)
print(transform, m)
if m:
translation = (float(m.group(1)), float(m.group(2)))
if transform:
m = pattern.match(transform)
if m:
translation = (float(m.group(1)), float(m.group(2)))
else:
translation = (0, 0)
else:
translation = (0, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment