218 |
219 |
219 @app.route('/static/<path:path>') |
220 @app.route('/static/<path:path>') |
220 def static_file(path): |
221 def static_file(path): |
221 return send_from_directory(path.join('static', path)) |
222 return send_from_directory(path.join('static', path)) |
222 |
223 |
|
224 from argparse import ArgumentParser |
|
225 parser = ArgumentParser() |
|
226 parser.add_argument('gtfs_zip_path') |
|
227 parser.add_argument('profile_path') |
|
228 |
223 if __name__ == '__main__': |
229 if __name__ == '__main__': |
224 from argparse import ArgumentParser |
|
225 parser = ArgumentParser() |
|
226 parser.add_argument('-p', '--port', type = int, default = 5000) |
230 parser.add_argument('-p', '--port', type = int, default = 5000) |
227 parser.add_argument('-d', '--debug', action = 'store_true') |
231 parser.add_argument('-d', '--debug', action = 'store_true') |
228 args = parser.parse_args() |
232 |
|
233 args = parser.parse_args() |
|
234 profile = ConfigParser() |
|
235 profile.read(args.profile_path) |
|
236 buses.load_buses(args.gtfs_zip_path, profile = profile) |
|
237 |
|
238 if __name__ == '__main__': |
229 app.run(debug = args.debug, port = args.port) |
239 app.run(debug = args.debug, port = args.port) |