11
11
ns = {'svg': 'http://www.w3.org/2000/svg',
12
12
'ink': 'http://www.inkscape.org/namespaces/inkscape'}
14
14
for svg in glob.glob('data/*.svg'):
15
15
t = etree.parse(svg)
16
16
basefile = os.path.basename(svg).split('.')[0]
21
21
x, y = float(e.get('x')), float(e.get('y'))
22
22
w, h = float(e.get('width')), float(e.get('height'))
27
27
width = %f, height = %f
31
sel = CSSSelector('svg|rect[ink|label="transition"]', ns)
33
x, y = float(e.get('x')), float(e.get('y'))
34
w, h = float(e.get('width')), float(e.get('height'))
37
descSel = CSSSelector('svg|desc', ns)
44
width = %f, height = %f,
49
sel = CSSSelector('svg|rect[ink|label="flower"]', ns)
51
x, y = float(e.get('x')), float(e.get('y'))
59
sel = CSSSelector('svg|rect[ink|label="fish"]', ns)
61
x, y = float(e.get('x')), float(e.get('y'))
62
w, h = float(e.get('width')), float(e.get('height'))
67
width = %f, height = %f,
71
sel = CSSSelector('svg|rect[ink|label="flag"]', ns)
73
x, y = float(e.get('x')), float(e.get('y'))
74
w, h = float(e.get('width')), float(e.get('height'))
79
width = %f, height = %f,
83
sel = CSSSelector('svg|rect[ink|label="troll"]', ns)
85
x, y = float(e.get('x')), float(e.get('y'))
86
#w, h = float(e.get('width')), float(e.get('height'))