From 896c90a82233106ddb8ba41ef281193224e1e908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Thu, 16 Sep 2021 15:34:26 +0200 Subject: [PATCH] adjust lecture pickure to new script class --- scripts/rofi-lectures.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/rofi-lectures.py b/scripts/rofi-lectures.py index b5e8f9d..d7eba6e 100755 --- a/scripts/rofi-lectures.py +++ b/scripts/rofi-lectures.py @@ -1,9 +1,11 @@ #!/usr/bin/python3 from courses import Courses from rofi import rofi -from utils import generate_short_title, MAX_LEN +from utils import generate_short_title +from config import MAX_LEN -lectures = Courses().current.lectures +script = Courses().current.script +lectures = script.lectures sorted_lectures = sorted(lectures, key=lambda l: -l.number) @@ -28,5 +30,5 @@ key, index, selected = rofi('Select lecture', options, [ if key == 0: sorted_lectures[index].edit() elif key == 1: - new_lecture = lectures.new_lecture() + new_lecture = script.new_lecture() new_lecture.edit()