From 090a16433d3a30a97196a89e8c3565dda38ba639 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Sep 2024 19:19:37 +0200 Subject: [PATCH] todo --- src/timetable.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/timetable.rs b/src/timetable.rs index fb53b48..58f4168 100644 --- a/src/timetable.rs +++ b/src/timetable.rs @@ -58,7 +58,8 @@ pub async fn timetable( /* TODO: Instead of searching *_M2, just find any TD_* and TP_* */ let matches = - Regex::new(r"(?PCOURS|TD|TD_M2|TP|TP_M2|COURS_TD)? (?P.*) : (?P(lundi|mardi|mercredi|jeudi|vendredi)) (?P.*) \(durée : (?P.*)\)") + Regex::new( + r"(?PCOURS|COURS_TD|TD|TD_M2|TP|TP_M2)? (?P.*) : (?P(lundi|mardi|mercredi|jeudi|vendredi)) (?P.*) \(durée : (?P.*)\)") .unwrap() .captures(i.value().attr("title").unwrap()) .unwrap(); @@ -79,6 +80,7 @@ pub async fn timetable( category: match matches .name("type") .map_or("", |m| m.as_str()) { + /* TODO: Instead of searching *_M2, just find any TD_* and TP_* */ "COURS" => [models::Category::Cours].into(), "TP" | "TP_M2" => [models::Category::TP].into(), "TD" | "TD_M2" => [models::Category::TD].into(),