convert tabs to spaces
This commit is contained in:
parent
ed177817e3
commit
f1e1947b51
1 changed files with 4 additions and 4 deletions
8
app.py
8
app.py
|
@ -8,11 +8,11 @@ cache=Cache(app)
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
return render_template("map.html")
|
return render_template("map.html")
|
||||||
|
|
||||||
@app.route("/bus.svg")
|
@app.route("/bus.svg")
|
||||||
def favicon():
|
def favicon():
|
||||||
return send_from_directory(app.static_folder,"bus.svg")
|
return send_from_directory(app.static_folder,"bus.svg")
|
||||||
|
|
||||||
data=requests.get("https://tarc.rideralerts.com/InfoPoint/rest/Routes/GetVisibleRoutes").json()
|
data=requests.get("https://tarc.rideralerts.com/InfoPoint/rest/Routes/GetVisibleRoutes").json()
|
||||||
routes=",".join(str(r.get("RouteId")) for r in data)
|
routes=",".join(str(r.get("RouteId")) for r in data)
|
||||||
|
@ -20,5 +20,5 @@ routes=",".join(str(r.get("RouteId")) for r in data)
|
||||||
@app.route("/tarc.csv")
|
@app.route("/tarc.csv")
|
||||||
@cache.cached(timeout=5)
|
@cache.cached(timeout=5)
|
||||||
def tarc():
|
def tarc():
|
||||||
d=requests.get("https://tarc.rideralerts.com/InfoPoint/rest/Vehicles/GetAllVehiclesForRoutes?routeIDs=0,"+routes).json()
|
d=requests.get("https://tarc.rideralerts.com/InfoPoint/rest/Vehicles/GetAllVehiclesForRoutes?routeIDs=0,"+routes).json()
|
||||||
return "\n".join(f"{v['Latitude']},{v['Longitude']},{v['RouteId']},{v['Name']},{v['OnBoard']},{v['DirectionLong']},{v['Speed']},{v['LastUpdated'][6:16]}" for v in d)
|
return "\n".join(f"{v['Latitude']},{v['Longitude']},{v['RouteId']},{v['Name']},{v['OnBoard']},{v['DirectionLong']},{v['Speed']},{v['LastUpdated'][6:16]}" for v in d)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue