implement route headway in sms
This commit is contained in:
parent
dc5cb9527d
commit
eefbe06d59
|
@ -83,8 +83,12 @@ class App(AppBase):
|
||||||
origin_name, dest_name = origin['display_name'], dest['display_name']
|
origin_name, dest_name = origin['display_name'], dest['display_name']
|
||||||
origin_area, dest_area = PUNCT.sub('', origin['area']), PUNCT.sub('', dest['area'])
|
origin_area, dest_area = PUNCT.sub('', origin['area']), PUNCT.sub('', dest['area'])
|
||||||
url = "http://chalobest.in" + detail['route']['url']
|
url = "http://chalobest.in" + detail['route']['url']
|
||||||
response = "%s: %s (%s) to %s (%s) %s" % (
|
if detail.headway:
|
||||||
",".join(routes), origin_name, origin_area, dest_name, dest_area, url)
|
headway = "Frequency: " + detail.headway + " mins"
|
||||||
|
else:
|
||||||
|
headway = "Route currently not running."
|
||||||
|
response = "%s: %s (%s) to %s (%s). %s. %s" % (
|
||||||
|
",".join(routes), origin_name, origin_area, dest_name, dest_area, headway, url)
|
||||||
|
|
||||||
elif msg.text.find(" to ") != -1:
|
elif msg.text.find(" to ") != -1:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user