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 |
#15 in #course
38 downloads per month
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
~17–27MB
~427K SLoC