mirror of https://github.com/stijndcl/didier
Remove unnecessary setting, add check around schedule parsing
parent
3167c99645
commit
1df345838d
|
@ -131,9 +131,11 @@ class ScheduleSlot:
|
|||
def __post_init__(self):
|
||||
"""Fix some properties to display more nicely"""
|
||||
# Re-format the location data
|
||||
room, building, campus = re.search(r"(.*)\. (?:Gebouw )?(.*)\. (?:Campus )?(.*)\. ", self.location).groups()
|
||||
room = room.replace("PC / laptoplokaal ", "PC-lokaal")
|
||||
self.location = f"{campus} {building} {room}"
|
||||
match = re.search(r"(.*)\. (?:Gebouw )?(.*)\. (?:Campus )?(.*)\. ", self.location)
|
||||
if match is not None:
|
||||
room, building, campus = match.groups()
|
||||
room = room.replace("PC / laptoplokaal ", "PC-lokaal")
|
||||
self.location = f"{campus} {building} {room}"
|
||||
|
||||
# The same course can only start once at the same moment,
|
||||
# so this is guaranteed to be unique
|
||||
|
|
|
@ -29,7 +29,6 @@ __all__ = [
|
|||
"DISCORD_CUSTOM_COMMAND_PREFIX",
|
||||
"UFORA_ANNOUNCEMENTS_CHANNEL",
|
||||
"UFORA_RSS_TOKEN",
|
||||
"URBAN_DICTIONARY_TOKEN",
|
||||
"IMGFLIP_NAME",
|
||||
"IMGFLIP_PASSWORD",
|
||||
"ScheduleType",
|
||||
|
@ -77,7 +76,6 @@ MA_CS_ENG_2_ROLE: Optional[int] = env.int("MA_CS_ENG_2_ROLE", 102330043480016491
|
|||
|
||||
"""API Keys"""
|
||||
UFORA_RSS_TOKEN: Optional[str] = env.str("UFORA_RSS_TOKEN", None)
|
||||
URBAN_DICTIONARY_TOKEN: Optional[str] = env.str("URBAN_DICTIONARY_TOKEN", None)
|
||||
IMGFLIP_NAME: Optional[str] = env.str("IMGFLIP_NAME", None)
|
||||
IMGFLIP_PASSWORD: Optional[str] = env.str("IMGFLIP_PASSWORD", None)
|
||||
|
||||
|
|
Loading…
Reference in New Issue