Conditions | 5 |
Total Lines | 28 |
Lines | 0 |
Ratio | 0 % |
Changes | 9 | ||
Bugs | 0 | Features | 0 |
1 | #!/usr/bin/env python3 |
||
16 | def main(): |
||
17 | stations = nsmaps.station.Stations(DATA_DIR) |
||
18 | major_station_types = ( |
||
19 | StationType.intercitystation, |
||
20 | StationType.knooppuntIntercitystation, |
||
21 | StationType.megastation, |
||
22 | StationType.knooppuntSneltreinstation, |
||
23 | StationType.sneltreinstation, |
||
24 | StationType.knooppuntStoptreinstation, |
||
25 | StationType.stoptreinstation |
||
26 | ) |
||
27 | stations_options = stations.get_stations_for_types(major_station_types) |
||
28 | |||
29 | stations_todo = [] |
||
30 | |||
31 | n_stations = 0 |
||
32 | for station in stations_options: |
||
33 | if n_stations >= MAX_STATIONS: |
||
34 | break |
||
35 | if not station.has_travel_time_data() and station.get_country_code() == 'NL': |
||
36 | print(station.get_travel_time_filepath()) |
||
37 | stations_todo.append(station) |
||
38 | n_stations += 1 |
||
39 | print(station) |
||
40 | |||
41 | timestamp = "19-04-2016 08:00" |
||
42 | stations.create_traveltimes_data(stations_todo, timestamp) |
||
43 | stations.recreate_missing_destinations(timestamp, False) |
||
44 | |||
47 | main() |