Commit ffba9b9d authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Initial commit

parents
*~
test/
generated/
\ No newline at end of file
#!/usr/bin/python3
import sys
import re
if __name__ == '__main__':
dx = float(sys.argv[1])
dy = float(sys.argv[2])
for l in open(sys.argv[3]):
pattern = '(\()(at|start|end)\s+([-.\d]+)\s+([-.\d]+)(\))'
part = re.split(pattern, l)
for i in range(0, len(part), 6):
e = part[i:i+6]
sys.stdout.write(e[0])
if len(e) > 1:
sys.stdout.write(e[1])
sys.stdout.write(e[2])
sys.stdout.write(" %.2f" % (float(e[3]) + dx))
sys.stdout.write(" %.2f" % (float(e[4]) + dy))
sys.stdout.write(e[5])
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