diff --git a/find_WWR_and_output_as_gpx.py b/find_WWR_and_output_as_gpx.py index 11c9538..727f99f 100644 --- a/find_WWR_and_output_as_gpx.py +++ b/find_WWR_and_output_as_gpx.py @@ -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