2022-08-16 10:32:46 +02:00
|
|
|
mod ics;
|
2022-08-16 10:41:42 +02:00
|
|
|
mod info;
|
2022-08-15 14:52:57 +02:00
|
|
|
mod timetable;
|
2022-08-16 15:48:13 +02:00
|
|
|
mod utils;
|
2022-08-12 21:20:39 +02:00
|
|
|
|
2022-08-12 19:55:28 +02:00
|
|
|
#[tokio::main]
|
2022-08-14 12:44:36 +02:00
|
|
|
async fn main() {
|
2022-08-16 15:48:13 +02:00
|
|
|
println!("Fetch the timetable...");
|
2022-08-15 19:20:10 +02:00
|
|
|
let timetable = timetable::timetable(3, 1, None).await;
|
2022-08-12 21:20:39 +02:00
|
|
|
|
2022-08-16 15:48:13 +02:00
|
|
|
println!("Fetch informations about the year...");
|
2022-08-15 19:20:10 +02:00
|
|
|
let info = info::info().await;
|
|
|
|
|
2022-08-16 15:48:13 +02:00
|
|
|
println!("Build the ICS file...");
|
2022-08-16 10:41:42 +02:00
|
|
|
let builded_timetable = timetable::build(timetable, info);
|
|
|
|
|
2022-08-16 12:25:01 +02:00
|
|
|
ics::export(builded_timetable, "target/debug.ics");
|
2022-08-14 12:44:36 +02:00
|
|
|
}
|