Beispiel #1
0
def findLocations():
    try:
        lat_lng = request.args.get('LAT-LNG')
        return (worker.add_job("LAT-LNG=" + lat_lng) + "\n")
    except:
        return ("Incorrect URL\n")
    return ("If you see this, please contact the the server admin\n")
Beispiel #2
0
def findLATs():
    try:
        lat = request.args.get('LAT')
        return (worker.add_job("LAT=" + lat) + "\n")
    except:
        return ("Incorrect URL\n")
    return ("If you see this, please contact the the server admin\n")
Beispiel #3
0
def findShapes():
    try:
        shape = request.args.get('shape', type=str)
        return (worker.add_job("Shape=" + shape) + "\n")
    except:
        return ("Incorrect URL\n")
    return ("If you see this, please contact the the server admin\n")
Beispiel #4
0
def findCities():
    try:
        city = request.args.get('city', type=str)
        return (worker.add_job("City=" + city) + "\n")
    except:
        return ("Incorrect URL\n")
    return ("If you see this, please contact the the server admin\n")
Beispiel #5
0
def executeCommand(command):
    try:
        if "%" in command:
            command = urllib2.unquote(command)
        vals = command.split("=")
        methods = [
            "All", "Date", "Country", "City", "State", "Shape", "LAT", "LNG",
            "LAT-LNG"
        ]
        if vals[0] in methods:
            return (worker.add_job(command) + "\t Sent\n")
    except:
        return ("Invalid Command\n")
    return ("If you see this, please contact the the server admin\n")
Beispiel #6
0
def findDates():
    try:
        start = request.args.get('start', type=str)
        end = request.args.get('end', type=str)
        if "%" in start:
            start = urllib2.unquote(start)
        if "\'" in start:
            start = start.strip("\'")
            print(start)
        if "%" in end:
            end = urllib2.unquote(end)
        if "\'" in end:
            end = end.strip("\'")
        return (worker.add_job("Date=" + start + "-" + end) + "\n")
    except:
        return ("Incorrect URL\n")
    return ("If you see this, please contact the the server admin\n")
Beispiel #7
0
def getUserFriendly():
    #gets all data
    return (worker.add_job("All=None") + "\n")