add config parameter for course info file
This commit is contained in:
parent
e51e9e7539
commit
08c2fae662
2 changed files with 3 additions and 2 deletions
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue