Archived
1
0
Fork 0
forked from Anri/cal8tor
This commit is contained in:
Mylloon 2022-08-16 23:40:42 +02:00
parent 4f4bc49b43
commit 44846562be
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,11 +1,29 @@
use clap::Parser;
mod ics; mod ics;
mod info; mod info;
mod timetable; mod timetable;
mod utils; mod utils;
#[derive(Parser)]
#[clap(version, about, long_about = None)]
struct Args {
/// Class
#[clap(short, long, value_parser)]
class: i8,
/// Subgroup if you have one, for example in `L1-A`, specify here the `A`
#[clap(short, long, value_parser)]
letter: Option<char>,
}
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
println!("Fetch the timetable..."); let args = Args::parse();
println!("class: L{}{}", args.class, args.letter.unwrap_or_default());
/* println!("Fetch the timetable...");
let timetable = timetable::timetable(3, 1, None).await; let timetable = timetable::timetable(3, 1, None).await;
println!("Fetch informations about the year..."); println!("Fetch informations about the year...");
@ -14,5 +32,5 @@ async fn main() {
println!("Build the ICS file..."); println!("Build the ICS file...");
let builded_timetable = timetable::build(timetable, info); let builded_timetable = timetable::build(timetable, info);
ics::export(builded_timetable, "target/debug.ics"); ics::export(builded_timetable, "target/debug.ics"); */
} }