From 2ff27c5e3f981d092d9eb99629a77d748d97f930 Mon Sep 17 00:00:00 2001 From: Johnson Chetty Date: Sat, 22 Sep 2012 08:46:16 +0200 Subject: [PATCH] route/freqs/ tweak --- .../gtfs/gtfs_mumbai_bus/calendar_dates.txt | 133 ++++++++++++++++++ chaloBEST/gtfs/gtfs_mumbai_bus/feed_info.txt | 2 + chaloBEST/mumbai/views.py | 2 +- 3 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 chaloBEST/gtfs/gtfs_mumbai_bus/calendar_dates.txt create mode 100644 chaloBEST/gtfs/gtfs_mumbai_bus/feed_info.txt diff --git a/chaloBEST/gtfs/gtfs_mumbai_bus/calendar_dates.txt b/chaloBEST/gtfs/gtfs_mumbai_bus/calendar_dates.txt new file mode 100644 index 0000000..65f8dba --- /dev/null +++ b/chaloBEST/gtfs/gtfs_mumbai_bus/calendar_dates.txt @@ -0,0 +1,133 @@ +service_id,date,exception_type +HOL,20120815,1 +HOL,20120818,1 +HOL,20120820,1 +HOL,20120919,1 +HOL,20121002,1 +HOL,20121024,1 +HOL,20121113,1 +HOL,20121114,1 +HOL,20121026,1 +HOL,20121128,1 +HOL,20121125,1 +MF&HOL,20120815,1 +MF&HOL,20120818,1 +MF&HOL,20120820,1 +MF&HOL,20120919,1 +MF&HOL,20121002,1 +MF&HOL,20121024,1 +MF&HOL,20121113,1 +MF&HOL,20121114,1 +MF&HOL,20121026,1 +MF&HOL,20121128,1 +MF&HOL,20121125,1 +SH,20120815,1 +SH,20120818,1 +SH,20120820,1 +SH,20120919,1 +SH,20121002,1 +SH,20121024,1 +SH,20121113,1 +SH,20121114,1 +SH,20121026,1 +SH,20121128,1 +SH,20121125,1 +AD,20120815,1 +AD,20120818,1 +AD,20120820,1 +AD,20120919,1 +AD,20121002,1 +AD,20121024,1 +AD,20121113,1 +AD,20121114,1 +AD,20121026,1 +AD,20121128,1 +AD,20121125,1 +MS&HOL,20120815,1 +MS&HOL,20120818,1 +MS&HOL,20120820,1 +MS&HOL,20120919,1 +MS&HOL,20121002,1 +MS&HOL,20121024,1 +MS&HOL,20121113,1 +MS&HOL,20121114,1 +MS&HOL,20121026,1 +MS&HOL,20121128,1 +MS&HOL,20121125,1 +SAT/SH,20120815,1 +SAT/SH,20120818,1 +SAT/SH,20120820,1 +SAT/SH,20120919,1 +SAT/SH,20121002,1 +SAT/SH,20121024,1 +SAT/SH,20121113,1 +SAT/SH,20121114,1 +SAT/SH,20121026,1 +SAT/SH,20121128,1 +SAT/SH,20121125,1 +SAT&HOL,20120815,1 +SAT&HOL,20120818,1 +SAT&HOL,20120820,1 +SAT&HOL,20120919,1 +SAT&HOL,20121002,1 +SAT&HOL,20121024,1 +SAT&HOL,20121113,1 +SAT&HOL,20121114,1 +SAT&HOL,20121026,1 +SAT&HOL,20121128,1 +SAT&HOL,20121125,1 +SAT&SH,20120815,1 +SAT&SH,20120818,1 +SAT&SH,20120820,1 +SAT&SH,20120919,1 +SAT&SH,20121002,1 +SAT&SH,20121024,1 +SAT&SH,20121113,1 +SAT&SH,20121114,1 +SAT&SH,20121026,1 +SAT&SH,20121128,1 +SAT&SH,20121125,1 +SAT/SUND&HOL,20120815,1 +SAT/SUND&HOL,20120818,1 +SAT/SUND&HOL,20120820,1 +SAT/SUND&HOL,20120919,1 +SAT/SUND&HOL,20121002,1 +SAT/SUND&HOL,20121024,1 +SAT/SUND&HOL,20121113,1 +SAT/SUND&HOL,20121114,1 +SAT/SUND&HOL,20121026,1 +SAT/SUND&HOL,20121128,1 +SAT/SUND&HOL,20121125,1 +S/H,20120815,1 +S/H,20120818,1 +S/H,20120820,1 +S/H,20120919,1 +S/H,20121002,1 +S/H,20121024,1 +S/H,20121113,1 +S/H,20121114,1 +S/H,20121026,1 +S/H,20121128,1 +S/H,20121125,1 +"SAT,SUN&HOL",20120815,1 +"SAT,SUN&HOL",20120818,1 +"SAT,SUN&HOL",20120820,1 +"SAT,SUN&HOL",20120919,1 +"SAT,SUN&HOL",20121002,1 +"SAT,SUN&HOL",20121024,1 +"SAT,SUN&HOL",20121113,1 +"SAT,SUN&HOL",20121114,1 +"SAT,SUN&HOL",20121026,1 +"SAT,SUN&HOL",20121128,1 +"SAT,SUN&HOL",20121125,1 +FH,20120815,1 +FH,20120818,1 +FH,20120820,1 +FH,20120919,1 +FH,20121002,1 +FH,20121024,1 +FH,20121113,1 +FH,20121114,1 +FH,20121026,1 +FH,20121128,1 +FH,20121125,1 diff --git a/chaloBEST/gtfs/gtfs_mumbai_bus/feed_info.txt b/chaloBEST/gtfs/gtfs_mumbai_bus/feed_info.txt new file mode 100644 index 0000000..373b922 --- /dev/null +++ b/chaloBEST/gtfs/gtfs_mumbai_bus/feed_info.txt @@ -0,0 +1,2 @@ +feed_publisher_name,feed_publisher_url,feed_lang,feed_start_date,feed_end_date,feed_version +ChaloBEST,http://chalobest.in,en,,,0.31 diff --git a/chaloBEST/mumbai/views.py b/chaloBEST/mumbai/views.py index ad6adcd..f2b173c 100644 --- a/chaloBEST/mumbai/views.py +++ b/chaloBEST/mumbai/views.py @@ -292,7 +292,7 @@ def route_headway(request, code): return render_to_json_response( { 'route': route.get_dict(), - 'frequency': str(min(frequencies)) + "-" + str(max(frequencies)) + 'frequency': str(min(frequencies)) + "-" + str(max(frequencies)) if min(frequencies)!=max(frequencies) else max(frequencies) #'scheds': [ (s.headway1, s.headway2, s.headway3, s.headway4, str(s.unique_route) ) for s in scheds] })