Migrated to mkdocs for documentation. Slight clean up of code.

This commit is contained in:
2024-04-06 16:16:23 +02:00
parent cff77bcc95
commit c0056a27d1
15 changed files with 179 additions and 100 deletions

View File

@ -5,12 +5,6 @@ from ExerciseGroup import ExerciseGroup
import re
from exceptions.CourseUnavailable import CourseUnavailable
# PROBLEM: This implementation is bad due to inconsistencies in the website
# The way we can tell the difference between an assignment and an exercise is by the presence of an a with the class "ass-submitable"
# As opposed to folders which contain exercises which are marked with "ass-group"
# Therefore, we should take that into consideration and spawn the corresponding Exercise or Assignment class
# Naming becomes a bit inconsistent like that as well, as Assignments could be Exercises. Might opt to call the "assignments" "exerciseGroups" or some shit.
class Course:
# Extend the Base class init
def __init__(self, url:str, name:str, session:Session, parent):

View File

@ -123,6 +123,4 @@ class ExerciseGroup():
session,
self)
for x in folders]
def recurse(self, folder:str):
print(self.url)

View File

@ -44,7 +44,6 @@ class Themis:
def getYear(self, start:int, end:int):
# Get the current year
return Year(self.session, self, start, end)
def allYears(self):

View File

@ -18,7 +18,7 @@ class Year:
return f"https://themis.housing.rug.nl/course/{self.start}-{self.year}"
# Method to get the courses of the year
def getCourses(self, errors:bool=False) -> list[Course]:
def allCourses(self, errors:bool=False) -> list[Course]:
# lis in a big ul
r = self.session.get(self.url)
soup = BeautifulSoup(r.text, 'lxml')