11
11
ns = {'svg': 'http://www.w3.org/2000/svg',
12
12
'ink': 'http://www.inkscape.org/namespaces/inkscape'}
16
14
for svg in glob.glob('data/*.svg'):
17
15
t = etree.parse(svg)
18
16
basefile = os.path.basename(svg).split('.')[0]
61
sel = CSSSelector('svg|rect[ink|label="fish"]', ns)
63
x, y = float(e.get('x')), float(e.get('y'))
64
w, h = float(e.get('width')), float(e.get('height'))
69
width = %f, height = %f,
73
sel = CSSSelector('svg|rect[ink|label="flag"]', ns)
75
x, y = float(e.get('x')), float(e.get('y'))
76
w, h = float(e.get('width')), float(e.get('height'))
81
width = %f, height = %f,
85
sel = CSSSelector('svg|rect[ink|label="gatetrigger"]', ns)
87
x, y = float(e.get('x')), float(e.get('y'))
88
w, h = float(e.get('width')), float(e.get('height'))
93
width = %f, height = %f,
97
sel = CSSSelector('svg|rect[ink|label="troll"]', ns)
99
x, y = float(e.get('x')), float(e.get('y'))
100
#w, h = float(e.get('width')), float(e.get('height'))
112
sel = CSSSelector('svg|rect[ink|label="gateup"]', ns)
114
x, y = float(e.get('x')), float(e.get('y'))
115
w, h = float(e.get('width')), float(e.get('height'))
120
width = %f, height = %f,
121
fill = {108,57,22,255},
126
sel = CSSSelector('svg|rect[ink|label="gatedown"]', ns)
128
x, y = float(e.get('x')), float(e.get('y'))
129
w, h = float(e.get('width')), float(e.get('height'))
134
width = %f, height = %f,
135
fill = {108,57,22,255},