def main(): reqs = read_requirements() prereqs = get_prereqs(reqs) coreqs = get_coreqs(reqs) courses = read_courses() sifted_prereqs = sift_reqs(prereqs) sifted_coreqs = sift_reqs(coreqs) grouped_courses = group_courses(courses) readable_prereqs = replace_course_ids_with_names(sifted_prereqs, grouped_courses) readable_coreqs = replace_course_ids_with_names(sifted_coreqs, grouped_courses) courses_with_reqs = match_reqs_to_courses(readable_prereqs, readable_coreqs, courses) ungrouped_courses_with_reqs = ungroup_courses(courses_with_reqs) sorted_courses_with_reqs = sorted(ungrouped_courses_with_reqs, key=lambda c: c['course']) write_pretty(sorted_courses_with_reqs, 'output/requirements.json') write_minified(sorted_courses_with_reqs, 'output/requirements.min.json')