Commit 102cd73f authored by gijs's avatar gijs

Translation parsing

parent e086610a
...@@ -57,15 +57,15 @@ with open('timeline.inkscape.svg', 'r') as handle: ...@@ -57,15 +57,15 @@ with open('timeline.inkscape.svg', 'r') as handle:
animation = get_group_by_label(soup, 'animation') animation = get_group_by_label(soup, 'animation')
print(pattern)
transform = animation.get('transform') transform = animation.get('transform')
m = pattern.match(transform)
if transform:
print(transform, m) m = pattern.match(transform)
if m: if m:
translation = (float(m.group(1)), float(m.group(2))) translation = (float(m.group(1)), float(m.group(2)))
else:
translation = (0, 0)
else: else:
translation = (0, 0) 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