diff --git a/README.md b/README.md index 78e326a..44179ad 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # cal7tor • *cal*endar P*7* extrac*tor* -> !! Fork de [cal8tor](https://git.mylloon.fr/Anri/cal8tor) !! -> -> !! En cours de dev -> ne fonctionne pas !! +> Fork de [cal8tor](https://git.mylloon.fr/Anri/cal8tor) Extracteur d'emploi du temps pour les masters d'informatique de Paris Cité (Diderot) @@ -22,23 +20,25 @@ Pour afficher la page d'aide $ cal7tor --help ``` -## Voir le calendrier dans le terminal + ## Exporter le calendrier au format `.ics` -Pour les LP par exemple, lance : +Pour les M1 par exemple, lance : ```bash -$ cal8tor LP --export calendar.ics +$ cal8tor M1 --export calendar.ics ``` > Le fichier comprend le fuseau horaire pour `Europe/Paris` et est diff --git a/src/main.rs b/src/main.rs index 801a6b6..3cf8b6d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,11 +34,10 @@ struct Args { async fn main() { let args = Args::parse(); - let matches = - Regex::new(r"(?i)M(?P[1,2])[-–•·]?(?P(LP|IMPAIRS|DATA|GENIAL|MPRI))?") - .unwrap() - .captures(&args.class) - .unwrap(); + let matches = Regex::new(r"(?i)M(?P[1,2])") + .unwrap() + .captures(&args.class) + .unwrap(); let level = matches .name("level") @@ -46,15 +45,10 @@ async fn main() { .as_str() .parse::() .unwrap(); - let pathway = matches.name("pathway").unwrap().as_str(); let user_agent = format!("cal7tor/{}", env!("CARGO_PKG_VERSION")); - println!( - "Récupération de l'emploi du temps des M{}-{}...", - level, - pathway.to_uppercase() - ); + println!("Récupération de l'emploi du temps des M{}...", level,); let timetable = timetable::timetable(level, args.semester, args.year, &user_agent).await; println!("Récupération des informations par rapport à l'année...");