Commit bb232d61 authored by Kiste's avatar Kiste
Browse files

Nice variable names

parent 59c4b78c
......@@ -30,20 +30,20 @@ def main():
fg.logo('https://studip.uni-hannover.de/assets/images/favicon.png')
fg.language('de')
jsemester = session.get(BASEURL + '/courses/semester')
aktuell = None
for semester in jsemester.json()['semesters']:
if not aktuell:
aktuell = semester
json_semester = session.get(BASEURL + '/courses/semester')
latest = None
for semester in json_semester.json()['semesters']:
if not latest:
latest = semester
else:
if semester['begin'] > aktuell['begin']:
aktuell = semester
jcourses = session.get(BASEURL + '/courses/semester/' + aktuell['semester_id'])
for course in jcourses.json()['courses']:
jnews = session.get(BASEURL + '/news/range/' + course['course_id'])
for news in jnews.json()['news']:
juser = session.get(BASEURL + '/user/' + news['user_id'])
author = juser.json()['user']
if semester['begin'] > latest['begin']:
latest = semester
json_courses = session.get(BASEURL + '/courses/semester/' + latest['semester_id'])
for course in json_courses.json()['courses']:
json_news = session.get(BASEURL + '/news/range/' + course['course_id'])
for news in json_news.json()['news']:
json_user = session.get(BASEURL + '/user/' + news['user_id'])
author = json_user.json()['user']
fe = fg.add_entry()
fe.author(name=str.join(' ', filter(None, (author['title_pre'], author['forename'], author['lastname']))),
email=author['email'])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment