matplobbot-shared 0.1.29__tar.gz → 0.1.30__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of matplobbot-shared might be problematic. Click here for more details.
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/PKG-INFO +1 -1
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/matplobbot_shared.egg-info/PKG-INFO +1 -1
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/setup.py +1 -1
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/shared_lib/services/schedule_service.py +16 -4
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/README.md +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/matplobbot_shared.egg-info/SOURCES.txt +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/matplobbot_shared.egg-info/dependency_links.txt +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/matplobbot_shared.egg-info/requires.txt +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/matplobbot_shared.egg-info/top_level.txt +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/setup.cfg +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/shared_lib/__init__.py +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/shared_lib/database.py +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/shared_lib/i18n.py +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/shared_lib/services/__init__.py +0 -0
- {matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/shared_lib/services/university_api.py +0 -0
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="matplobbot-shared",
|
|
5
|
-
version="0.1.
|
|
5
|
+
version="0.1.30", # Let's use the version from your requirements.txt
|
|
6
6
|
packages=find_packages(include=['shared_lib', 'shared_lib.*']),
|
|
7
7
|
description="Shared library for the Matplobbot ecosystem (database, services, i18n).",
|
|
8
8
|
author="Ackrome",
|
{matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/shared_lib/services/schedule_service.py
RENAMED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import List, Dict, Any
|
|
4
4
|
from datetime import datetime, date
|
|
5
|
+
from collections import defaultdict
|
|
6
|
+
|
|
7
|
+
names_shorter = defaultdict(lambda: 'Неизвестно')
|
|
8
|
+
to_add = {
|
|
9
|
+
'Практические (семинарские) занятия': 'Семинар',
|
|
10
|
+
'Лекции': 'Лекция',
|
|
11
|
+
'Консультации текущие': 'Консультация',
|
|
12
|
+
'Повторная промежуточная аттестация (экзамен)':'Пересдача'
|
|
13
|
+
}
|
|
14
|
+
names_shorter.update(to_add)
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
|
|
6
18
|
def format_schedule(schedule_data: List[Dict[str, Any]], lang: str, entity_name: str, start_date: date) -> str:
|
|
7
19
|
"""Formats a list of lessons into a readable daily schedule."""
|
|
@@ -26,10 +38,10 @@ def format_schedule(schedule_data: List[Dict[str, Any]], lang: str, entity_name:
|
|
|
26
38
|
formatted_lessons = []
|
|
27
39
|
for lesson in sorted(lessons, key=lambda x: x['beginLesson']):
|
|
28
40
|
formatted_lessons.append(
|
|
29
|
-
f"`{lesson['beginLesson']} - {lesson['endLesson']}`\n"
|
|
30
|
-
f"{lesson['discipline']}\n"
|
|
31
|
-
f"{lesson['kindOfWork']}\n"
|
|
32
|
-
f"{lesson['auditorium']} ({lesson['building']})\n"
|
|
41
|
+
f"`{lesson['beginLesson']} - {lesson['endLesson']} | {lesson['auditorium']}`\n"
|
|
42
|
+
f"{lesson['discipline']} | {names_shorter[lesson['kindOfWork']]}\n"
|
|
43
|
+
# f"{lesson['kindOfWork']}\n"
|
|
44
|
+
# f"{lesson['auditorium']} ({lesson['building']})\n"
|
|
33
45
|
f"{lesson['lecturer_title'].replace('_',' ')}\n"
|
|
34
46
|
f"{lesson['lecturerEmail']}\n"
|
|
35
47
|
)
|
|
File without changes
|
{matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/matplobbot_shared.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/matplobbot_shared.egg-info/requires.txt
RENAMED
|
File without changes
|
{matplobbot_shared-0.1.29 → matplobbot_shared-0.1.30}/matplobbot_shared.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|