Closed oguh43 closed 2 years ago
The substitution render is customizable, so there is no guarantee that it will work, as it could look different on each school (it may break). I can still add it though.
For now, I've added a simple (b0d722b)
def get_missing_teachers(self, date: date) -> list[EduTeacher]
I'll add more tomorrow, or later this week.
I've added
def get_timetable_changes(self, date: date) -> list[TimetableChange]
in a8487bb. Can you give me some feedback or close this issue?
Types for context:
class Action(enum.Enum):
DELETION = enum.auto()
CHANGE = enum.auto()
ADDITION = enum.auto()
class TimetableChange:
def __init__(self, change_class: str, lesson_n: int, action: Union[Action, tuple[int, int]]):
self.change_class = change_class
self.lesson_n = lesson_n
self.action = action
Very cool
Is your feature request related to a problem? Please describe. Nope, I just implemented it into my own api and would like for it to be available in your too. However, I currently have no intention of looking into how your api works internally and will thus only provide my implementation as a base. https://github.com/oguh43/gymbilba/blob/cc830ece954fcb3dbfcf4ea55d3934809620dfa6/gymbilba.py#L102-L129 Calling
get_substitution
returns a json, namely in this format:If you have any idea, how to get rid of those pesky unicode escape sequences, I'm all ears. Also there are no language dependant strings used in my code, only regex + soup. (Idk if you want another dependency)