4 ORIGINAL
, TABLE
= (800, 480), (1024, 768)
5 STYLE
= 'fill:#000000;opacity:.2;'
7 cx
= lambda x
: int(x
)*ORIGINAL
[0]/TABLE
[0]
8 cy
= lambda y
: int(y
)*ORIGINAL
[1]/TABLE
[1]
10 print '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
11 print ('<svg xmlns="http://www.w3.org/2000/svg" width="%d" '+
12 'height="%d" version="1.1">') % ORIGINAL
14 for line
in sys
.stdin
:
15 line
= line
.strip().split('/')
18 x
, y
, curid
, timestamp
= line
19 print ('<path style="%s" d="m %d,%d a 5.5,5.5 0 1 1'+
20 '-11,0 5.5,5.5 0 1 1 11,0 z"/>') % (STYLE
, cx(x
), cy(y
))