diff --git a/scripts/config.py b/scripts/config.py index b8ec5d1..155e4af 100644 --- a/scripts/config.py +++ b/scripts/config.py @@ -17,3 +17,4 @@ CURRENT_COURSE_WATCH_FILE = Path('/tmp/current_course').resolve() ROOT = Path('~/Uni/semester-5').expanduser() DATE_FORMAT = '%a %d %b %Y %H:%M' LOCALE = "de_DE.utf8" +COURSE_IGNORE_FILE = '.courseignore' diff --git a/scripts/courses.py b/scripts/courses.py index 46a87f5..4f5ddfc 100755 --- a/scripts/courses.py +++ b/scripts/courses.py @@ -3,8 +3,7 @@ from pathlib import Path import yaml from lectures import Lectures -from config import ROOT, CURRENT_COURSE_ROOT, CURRENT_COURSE_SYMLINK, CURRENT_COURSE_WATCH_FILE - +from config import ROOT, CURRENT_COURSE_ROOT, CURRENT_COURSE_SYMLINK, CURRENT_COURSE_WATCH_FILE, COURSE_IGNORE_FILE class Course(): def __init__(self, path): self.path = path @@ -34,7 +33,7 @@ class Courses(list): return sorted(_courses, key=lambda c: c.name) def ignored_courses(self): - with open(ROOT / '.courseignore') as ignore: + with open(ROOT / COURSE_IGNORE_FILE) as ignore: lines = ignore.readlines() paths = [] for line in lines: