diff --git a/scripts/config.py b/scripts/config.py index 155e4af..5b69cc8 100644 --- a/scripts/config.py +++ b/scripts/config.py @@ -18,3 +18,4 @@ ROOT = Path('~/Uni/semester-5').expanduser() DATE_FORMAT = '%a %d %b %Y %H:%M' LOCALE = "de_DE.utf8" COURSE_IGNORE_FILE = '.courseignore' +COURSE_INFO_FILE = 'info.yaml' diff --git a/scripts/courses.py b/scripts/courses.py index 4f5ddfc..cc22c56 100755 --- a/scripts/courses.py +++ b/scripts/courses.py @@ -3,13 +3,13 @@ from pathlib import Path import yaml from lectures import Lectures -from config import ROOT, CURRENT_COURSE_ROOT, CURRENT_COURSE_SYMLINK, CURRENT_COURSE_WATCH_FILE, COURSE_IGNORE_FILE +from config import ROOT, CURRENT_COURSE_ROOT, CURRENT_COURSE_SYMLINK, CURRENT_COURSE_WATCH_FILE, COURSE_IGNORE_FILE, COURSE_INFO_FILE class Course(): def __init__(self, path): self.path = path self.name = path.stem - self.info = yaml.load((path / 'info.yaml').open()) + self.info = yaml.load((path / COURSE_INFO_FILE).open()) self._lectures = None @property