diff --git a/scripts/config.py b/scripts/config.py index 5b69cc8..f980d93 100644 --- a/scripts/config.py +++ b/scripts/config.py @@ -19,3 +19,4 @@ DATE_FORMAT = '%a %d %b %Y %H:%M' LOCALE = "de_DE.utf8" COURSE_IGNORE_FILE = '.courseignore' COURSE_INFO_FILE = 'info.yaml' +DEFAULT_MASTER_FILE_NAME = 'master.tex' diff --git a/scripts/lectures.py b/scripts/lectures.py index b1ea912..4efeb0f 100755 --- a/scripts/lectures.py +++ b/scripts/lectures.py @@ -8,7 +8,7 @@ import re import subprocess -from config import get_week, DATE_FORMAT, CURRENT_COURSE_ROOT, LOCALE +from config import get_week, DATE_FORMAT, CURRENT_COURSE_ROOT, LOCALE, DEFAULT_MASTER_FILE_NAME # TODO locale.setlocale(locale.LC_TIME, LOCALE) @@ -58,7 +58,10 @@ class Lectures(list): def __init__(self, course): self.course = course self.root = course.path - self.master_file = self.root / 'master.tex' + if 'master_file' in course.info: + self.master_file = self.root / course.info['master_file'] + else: + self.master_file = self.root / DEFAULT_MASTER_FILE_NAME list.__init__(self, self.read_files()) def read_files(self):