Commit 21c2501c authored by Jean-Benoist Leger's avatar Jean-Benoist Leger

missing getGPX.py

parent 186bad4c
#!/usr/bin/python
import cgi
import cgitb
import sys
cgitb.enable(display=1, logdir="/tmp/hervelog/")
#cgitb.enable()
import rv
form = cgi.FieldStorage()
try:
jid=int(form['jid'].value)
minimal=bool(int(form['minimal'].value))
step=int(form['step'].value)
nptsmax=int(form['nptsmax'].value)
except (KeyError, ValueError):
sys.exit(1)
gpxxml = rv.getGPX(jid,minimal,step,nptsmax)
print "Content-Disposition: attachment; filename=rv_result_%d.gpx" % jid
print "Content-type: application/gpx+xml\n"
print gpxxml
sys.stdout.flush()
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