Parses corequisites from the bodyHtml
Given a course detail html, this returns the description, the prerequisites, and the
corequisites.
Takes in the HTML inside of the <td class="ntdefault"> and grabs the description. All HTML is
escaped and the line breaks are removed.
Parses the prerequisites from the bodyHtml
Used to parse both prerequisites and corequisites. Simply calls all the individual functions.
parses the restrictions sections of a course detail
Given a Prerequisite tree, this function will replace all __SUBJECT-CODE|COURSE-NUMBER__
directives in the operands of the Prerequisite with ['SUBJECT-CODE', 'COURSE-NUMBER']
tuples.
If the string provided matches /__(.*)\|(.*)__/ (e.g. blah __CIS|310__ blah) then the
function will return just the __CIS|310__ and leave out the blah blah
Given the HTML containing the prerequisites, this function will find all the anchors denoting
course in the catalog and replace them with a __SUBJECT-CODE|COURSE-NUMBER__ directive. This
directive will be parsed out later.
Recursive function that takes in a string which can include ( ) and transforms it into an
array of arrays. Strings get separated by spaces and substrings inside of ( ) will get put
into a sub array:
e.g.:
the quick (brown (fox jumps) over the (lazy dog))
becomes:
['the', 'quick', ['brown', ['fox', 'jumps'], 'over', 'the', ['lazy', 'dog']]]
Generated using TypeDoc
Recursively builds the
_Prerequisitetype given aParseTreefrom thetokenizeByOperatorfunction.