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
parent 9236ded404
commit 18b0820c26
2 changed files with 9 additions and 3 deletions

View File

@ -93,7 +93,7 @@ def main(only_on_coming_evt=False, ignore_module=[], force_coming_event=True, ex
evt_coming = force_coming_event or ical.non_local_event_coming(config) or ical.local_event_ending(config) evt_coming = force_coming_event or ical.non_local_event_coming(config) or ical.local_event_ending(config)
if evt_coming: if evt_coming:
from modules.ratp import RATPNextStopModule from modules.ratp import RATPNextStopModule
nstops, nalerts = RATPNextStopModule().draw_module(config, ["RB/cite+universitaire", "M7/porte+d+italie", "B125/raspail+++jean+jaures+++saint+eloi"], int(480/1.6), 275) nstops, nalerts = RATPNextStopModule().draw_module(config, ["M14/hopital+bicetre/A", "RB/cite+universitaire"], int(480/1.6), 275)
image.paste(nstops, (480-int(480/1.6), NEXT_STOP_Y)) image.paste(nstops, (480-int(480/1.6), NEXT_STOP_Y))
occuped_space = nstops.height occuped_space = nstops.height
alerts += nalerts alerts += nalerts

View File

@ -64,6 +64,8 @@ class IDFMAPI:
"125": "C01154", "125": "C01154",
#"131": "C01159", #"131": "C01159",
"184": "C01205", "184": "C01205",
"186": "C01207",
"323": "C01287",
}, },
"rers": { "rers": {
"A": "C01742", "A": "C01742",
@ -203,6 +205,8 @@ class IDFMAPI:
disruptionIds.append(disruptionId) disruptionIds.append(disruptionId)
for disruptionId in disruptionIds: 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] impactType = disruptionTypes[disruptionId]
status = "past" status = "past"
for ap in disruptions[disruptionId]["applicationPeriods"]: for ap in disruptions[disruptionId]["applicationPeriods"]:
@ -260,7 +264,7 @@ class IDFMAPI:
draw.rectangle((0, 0, width, size), fill) draw.rectangle((0, 0, width, size), fill)
draw.text((int(width / 2), int(size / 2)), line, fill="white", anchor="mm", font=fnt_icon) 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")) 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))) return img.resize((int(size), int(img.height * size / img.width)))
@ -277,6 +281,8 @@ class IDFMAPI:
coeff = 2.5 coeff = 2.5
elif state.endswith("moyen"): elif state.endswith("moyen"):
coeff = 2 coeff = 2
elif state.endswith("enorme"):
coeff = 1.1
else: else:
coeff = 1.5 coeff = 1.5
@ -293,7 +299,7 @@ class IDFMAPI:
class RATPWeatherModule: 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 self.major_lines = major_lines
def gen_alerts(self, config): def gen_alerts(self, config):