This Python 3 command line utility provides a set of class planning tools.
usage: src [-h] [--version] {list,depth} ...
positional arguments:
{list,depth}
list list --help
depth depth --help
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
usage: src list [-h] [-f FULFILLED] courses
List all classes that can be taken
positional arguments:
courses JSON file with course pre-requisites
optional arguments:
-h, --help show this help message and exit
-f FULFILLED, --fulfilled FULFILLED
File with list of taken courses
usage: src depth [-h] [-f FULFILLED] courses required
Calculate depth of required pre-requisites that have not been taken yet
positional arguments:
courses JSON file with course pre-requisites
required JSON file with a list of required courses
optional arguments:
-h, --help show this help message and exit
-f FULFILLED, --fulfilled FULFILLED
File with list of taken courses
The courses file must be in JSON format where each course is a key with a corresponding descriptor object.
Example:
{
"a": {
"reqs": [] // No pre-requisites
},
"b": {
"reqs": ["a"] // b has a pre-requisite on a
},
"c": {
"reqs": [] // No pre-requisites
},
"d": {
"reqs": [] // No pre-requisites
},
"e": {
"reqs": [["b", "c"], "d"] // e has a pre-requisite on b or c and d
}
}
The required courses file must be in JSON format where each course is a key with an optional list of classes that can be taken to fulfill the requirement for this course.
Example:
{
"a": [],
"b": ["c"], // Course b can fulfill course c
"c": ["b"] // Course c can fulfill course b
}
The fulfilled courses file should be in plaintext format with a class that has been taken on each line.
Example:
a
b