From 293e29409a14665212efe87894f0193654f047ed Mon Sep 17 00:00:00 2001 From: fordprefect Date: Wed, 25 Mar 2020 21:57:23 +0100 Subject: [PATCH] fix date string and introduce HTTP argument parsing --- search.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/search.py b/search.py index 11c9538..727f99f 100644 --- a/search.py +++ b/search.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