#course #scheduling #hku

coursehku

A library for course scheduling in HKU

4 releases (1 stable)

1.0.0 Jan 21, 2024
0.3.0 Jan 12, 2024
0.2.0 Jan 11, 2024
0.1.0 Jan 8, 2024

#14 in #course

Download history 27/week @ 2024-01-07 2/week @ 2024-01-21 15/week @ 2024-02-25 3/week @ 2024-03-10 76/week @ 2024-03-31

79 downloads per month

MIT/Apache

19KB
471 lines

CourseHKU

A library to deal with HKU course data.

Add to your project

Add this to your Cargo.toml:

cargo add coursehku

Usage

use CourseHKU::course::CourseTable;
use std::path::PathBuf;

fn main() {
    let table = CourseTable::load(PathBuf::from("data.csv"));

    let table = table
        .to_lazy()  // convert to lazy table
        .semester(1)  // filter semester 1
        .contains(&["COMP", "MATH", "ENGG"])  // filter courses by code
        .no_conflict_with(table.get_course("COMP1117").unwrap())  // filter courses that do not conflict with COMP1117
        .collect()  // collect the lazy table
        .unwrap();
    println!("{}", table);
}

Run example

git clone https://github.com/adlsdztony/CourseHKU.git
cd CourseHKU
cargo run --example scheduler

Dependencies

~16–28MB
~428K SLoC