17 releases
0.4.2 | Nov 4, 2023 |
---|---|
0.4.1 | Oct 27, 2023 |
0.3.6 | Oct 27, 2023 |
0.2.9 | Oct 23, 2023 |
#2432 in Parser implementations
137 downloads per month
25KB
490 lines
usask_cba_calc
A command-line tool designed to calculate the first-year engineering grades for students at the University of Saskatchewan's College of Engineering. This tool takes an input file in JSON format and provides the calculated GPA and other relevant information. The tool is written in Rust to take advantage of Rust's excellent data modelling capabilities.
Installation
-
Install Rust: If you don't already have Rust installed on your system, you can do so by visiting the official Rust website and following their installation instructions.
-
Install the Binary: Use cargo to install the binary from crates.io
cargo install usask_cba_calculator
-
Verify Installation: Run the following command in your terminal
usask_cba_calc --help
The output should look something like this,
Usage: usask-cba-calc [file_path]
Arguments:
[file_path] Path to file containing JSON data.
If no file path is provided, the program will read from stdin.
cli tool to calculate usask's first year engineering cba grades
usask-cba-calc v0.2.3
Usage
-
Open up your terminal or command prompt
-
Type
usask_cba_calc -s
This will ask you a few questions to generate a boiler plate JSON schema, later open the grades.json file to fill in your grade information
-
Type
usask_cba_calc /path/to/file.json
NOTE: You can also pipe in data to the tool.
Input file schema
The way the input file needs to be structured is very specific, follow the general layout shown below
{
"Subject1": {
"CLOs": {
"1.1": {
"difficulty_type": "B",
"weightage": 20.0,
"RLOs": {
"1.3": {
"weightage": 50.0,
"assignments": [95, 90, 85]
},
"3.3": {
"weightage": 50.0,
"assignments": [80, 75]
}
}
},
"1.2": {
"difficulty_type": "B+",
"weightage": 80.0,
"RLOs": {
"1.1": {
"weightage": 50.0,
"assignments": [95, 90, 85]
}
}
}
}
},
"Subject2": {
"CLOs": {
"2.1": {
"difficulty_type": "A",
"weightage": 0.0,
"RLOs": {
"2.1": {
"weightage": 100.0,
"assignments": [12]
}
}
},
"1.2": {
"difficulty_type": "B+",
"weightage": 100.0,
"RLOs": {
"2.2": {
"weightage": 100.0,
"assignments": [95, 0, 0]
}
}
}
}
}
}
Dependencies
~3–9.5MB
~85K SLoC