fix date string and introduce HTTP argument parsing
This commit is contained in:
@@ -4,9 +4,10 @@ them as GPX Waypoints to a given output file in GPX format.
|
||||
"""
|
||||
|
||||
__author__ = "fordprefect"
|
||||
__date__ = "2020-03-2
|
||||
__date__ = "2020-03-25"
|
||||
__version__ = "0.1"
|
||||
|
||||
import cgi
|
||||
import gpxpy
|
||||
import requests
|
||||
import os
|
||||
@@ -44,6 +45,13 @@ verbosity = 0
|
||||
######## end of configuration
|
||||
#####################################
|
||||
|
||||
def get_arguments():
|
||||
"""Wrapper for cgi-environment.
|
||||
Takes no options, returns dict of arguments
|
||||
"""
|
||||
with cgi.FieldStorage() as args:
|
||||
return {i: args.getvalue(i) for i in args}
|
||||
|
||||
## initialize gpx file
|
||||
if os.path.isfile(gpxfilename):
|
||||
# open file and parse
|
||||
|
||||
Reference in New Issue
Block a user