Replace Transilien by IDFM source, add CTS (Strasbourg)
This commit is contained in:
parent
070849c427
commit
368f07da32
|
@ -31,11 +31,21 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"model": "gtfs.gtfsfeed",
|
"model": "gtfs.gtfsfeed",
|
||||||
"pk": "FR-IDF-TN",
|
"pk": "FR-IDF-IDFM",
|
||||||
"fields": {
|
"fields": {
|
||||||
"name": "SNCF - Transilien",
|
"name": "Île-de-France Mobilités",
|
||||||
"country": "FR",
|
"country": "FR",
|
||||||
"feed_url": "https://eu.ftp.opendatasoft.com/sncf/gtfs/transilien-gtfs.zip",
|
"feed_url": "https://data.iledefrance-mobilites.fr/api/v2/catalog/datasets/offre-horaires-tc-gtfs-idfm/files/a925e164271e4bca93433756d6a340d1",
|
||||||
|
"rt_feed_url": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "gtfs.gtfsfeed",
|
||||||
|
"pk": "FR-GES-CTS",
|
||||||
|
"fields": {
|
||||||
|
"name": "Compagnie des Transports Strasbourgeois (CTS)",
|
||||||
|
"country": "FR",
|
||||||
|
"feed_url": "https://opendata.cts-strasbourg.eu/google_transit.zip",
|
||||||
"rt_feed_url": ""
|
"rt_feed_url": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -124,9 +124,11 @@ class Command(BaseCommand):
|
||||||
route_dict: dict
|
route_dict: dict
|
||||||
route_id = route_dict['route_id']
|
route_id = route_dict['route_id']
|
||||||
route_id = f"{gtfs_code}-{route_id}"
|
route_id = f"{gtfs_code}-{route_id}"
|
||||||
|
# Agency is optional there is only one
|
||||||
|
agency_id = route_dict.get('agency_id', "") or Agency.objects.get(gtfs_feed=gtfs_feed)
|
||||||
route = Route(
|
route = Route(
|
||||||
id=route_id,
|
id=route_id,
|
||||||
agency_id=f"{gtfs_code}-{route_dict['agency_id']}",
|
agency_id=f"{gtfs_code}-{agency_id}",
|
||||||
short_name=route_dict['route_short_name'],
|
short_name=route_dict['route_short_name'],
|
||||||
long_name=route_dict['route_long_name'],
|
long_name=route_dict['route_long_name'],
|
||||||
desc=route_dict.get('route_desc', ""),
|
desc=route_dict.get('route_desc', ""),
|
||||||
|
|
Loading…
Reference in New Issue