-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The code for fetching descriptions and co-requisites looks quite similar: looping through subjects, then courses, fetching something, merging it with the courses, and saving it to the file.
Create a function that does the looping for us and only requires a definition of what should happen to each course.
For example (fetching descriptions):
augmentCourses({
// subjects (optional): { code: "CS" }, use for debugging
name: "description" // for logging
action: (subject, course, index) => {
const description = await fetchDescription(course.term, course.crn);
},
});The name field is for logging ("1/151: 3/4 descriptions fetched")
Metadata
Metadata
Assignees
Labels
No labels