11 releases
0.3.7 | Feb 15, 2023 |
---|---|
0.3.6 | Jul 22, 2022 |
0.3.2 | Jun 30, 2022 |
0.2.1 | Jun 28, 2022 |
0.1.0 | Jun 24, 2022 |
#4 in #exam
26 downloads per month
155KB
925 lines
Multiple Choice Exam Randomizer (mc-exam-randomizer)
Usage
use mc_exam_randomizer::{
errors::ExamReaderError,
shuffler::{shuffle_exam, Exam},
};
fn main() {
// use your own file
let filename_tex = "files/exam.tex";
match Exam::from_tex(filename_tex, "master") {
Ok(ex) => {
println!("master {:#?}", ex);
let version_1 = shuffle_exam(&ex, Some("version 1"));
println!("ver1 {:#?}", version_1);
}
Err(err) => match err {
ExamReaderError::TemplateError(err_st) => {
println!("ERR: {:#?}", err_st);
}
_ => println!("Err: {:#?}", err),
},
};
}
Dependencies
~2.3–3.5MB
~56K SLoC