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]
49
47
""" % (x,y,w,h, desc)
51
sel = CSSSelector('svg|rect[ink|label="flower"]', ns)
53
x, y = float(e.get('x')), float(e.get('y'))
61
sel = CSSSelector('svg|rect[ink|label="cat"]', ns)
63
x, y = float(e.get('x')), float(e.get('y'))
71
sel = CSSSelector('svg|rect[ink|label="fish"]', 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="flag"]', ns)
85
x, y = float(e.get('x')), float(e.get('y'))
86
w, h = float(e.get('width')), float(e.get('height'))
91
width = %f, height = %f,
95
sel = CSSSelector('svg|rect[ink|label="gatetrigger"]', ns)
97
x, y = float(e.get('x')), float(e.get('y'))
98
w, h = float(e.get('width')), float(e.get('height'))
103
width = %f, height = %f,
107
sel = CSSSelector('svg|rect[ink|label="troll"]', ns)
109
x, y = float(e.get('x')), float(e.get('y'))
110
#w, h = float(e.get('width')), float(e.get('height'))
122
sel = CSSSelector('svg|rect[ink|label="gateup"]', ns)
124
x, y = float(e.get('x')), float(e.get('y'))
125
w, h = float(e.get('width')), float(e.get('height'))
130
width = %f, height = %f,
131
fill = {108,57,22,255},
136
sel = CSSSelector('svg|rect[ink|label="gatedown"]', ns)
138
x, y = float(e.get('x')), float(e.get('y'))
139
w, h = float(e.get('width')), float(e.get('height'))
144
width = %f, height = %f,
145
fill = {108,57,22,255},