Update RATP routes following M14 opening
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
nemunaire 2024-07-26 12:55:17 +02:00
commit 18b0820c26
2 changed files with 9 additions and 3 deletions

View file

@ -64,6 +64,8 @@ class IDFMAPI:
"125": "C01154",
#"131": "C01159",
"184": "C01205",
"186": "C01207",
"323": "C01287",
},
"rers": {
"A": "C01742",
@ -203,6 +205,8 @@ class IDFMAPI:
disruptionIds.append(disruptionId)
for disruptionId in disruptionIds:
if disruptionId in ['83691f06-234d-11ef-b7d8-0a58a9feac02', '1921779e-4439-11ef-b8a3-0a58a9feac02', '58fb726e-4a30-11ef-af84-0a58a9feac02', 'e34952cc-4ac8-11ef-af84-0a58a9feac02']:
continue
impactType = disruptionTypes[disruptionId]
status = "past"
for ap in disruptions[disruptionId]["applicationPeriods"]:
@ -260,7 +264,7 @@ class IDFMAPI:
draw.rectangle((0, 0, width, size), fill)
draw.text((int(width / 2), int(size / 2)), line, fill="white", anchor="mm", font=fnt_icon)
elif fill == "white":
elif mode != "tramways" and fill == "white":
img = Image.open(os.path.join(config.icons_dir, "ratp", "lignes", icon_mode + "_" + line + "_NB" + state + "_RVB.png"))
return img.resize((int(size), int(img.height * size / img.width)))
@ -277,6 +281,8 @@ class IDFMAPI:
coeff = 2.5
elif state.endswith("moyen"):
coeff = 2
elif state.endswith("enorme"):
coeff = 1.1
else:
coeff = 1.5
@ -293,7 +299,7 @@ class IDFMAPI:
class RATPWeatherModule:
def __init__(self, major_lines=["M7", "M5", "M14", "RB", "T3A"]):
def __init__(self, major_lines=["M7", "M14", "RB", "TT3A"]):
self.major_lines = major_lines
def gen_alerts(self, config):