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