-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
28 lines (23 loc) · 802 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import sys
import Scraper
import Grader
import Printer
import Config
import Pager
if __name__ == "__main__":
# -----| Scraping Data |-----
file_path = Scraper.readfilePath(sys.argv)
name, course = Scraper.getNameAndCourseName(file_path)
date_of_creation = Scraper.getDateOfCreation(file_path)
data = Scraper.getData(file_path)
# -----| Rubric Config |-----
rubric = Config.getRubric()
dataJSON = Config.attachRubricToDataAsJSON(data, rubric)
# -----| Computing Grades |-----
grade = Grader.Grader(dataJSON)
# -----| Printing Grades |-----
with Pager.Pager() as pager: # redirects stdout
Printer.header(name, course, date_of_creation)
Printer.grade(grade)
Printer.path_to_all_grades(grade)
Printer.captured_data(data)