feat: Implement week grid layout for timetable display
- Added WeekGrid composable to visualize weekly timetable with lessons. - Introduced LessonBlock for individual lesson representation. - Created theme file for consistent color schemes across the app. - Developed NextLessonWidget and TodayWidget for home screen integration. - Implemented Upcoming data class to manage upcoming lessons. - Added WidgetStyle for dynamic theming in widgets. - Created SyncWorker for periodic timetable updates and widget refresh.
This commit is contained in:
@@ -8,7 +8,7 @@ import { join } from "node:path";
|
||||
import { createHash } from "node:crypto";
|
||||
import { parseWeekRanges, parseTextDates } from "../shared/weeks.js";
|
||||
const run = promisify(execFile);
|
||||
export const PARSER_VERSION = 7;
|
||||
export const PARSER_VERSION = 8;
|
||||
const days = [
|
||||
"понедельник",
|
||||
"вторник",
|
||||
@@ -24,10 +24,13 @@ const clean = (value) =>
|
||||
.replace(/[\t ]+/g, " ")
|
||||
.replace(/\s*\n\s*/g, "\n")
|
||||
.trim();
|
||||
const groupsIn = (value) =>
|
||||
// A group is a two-digit year and a capitalised abbreviation: "23-БА", "24-ДОи", "25-ИЯ(РА)",
|
||||
// "23-ИНС-1". Header cells also carry practice dates ("02.11-22.11-производственная практика",
|
||||
// "09.11 по 06.12"): a number right after a date's dot or another digit is never a group.
|
||||
export const groupsIn = (value) =>
|
||||
[
|
||||
...value.matchAll(
|
||||
/\b\d{2}\s*[-–]?\s*[А-ЯЁа-яё]{2,8}(?:\s*\([А-ЯЁа-яё]+\))?(?:\s*[-–]\s*\d)?/gu,
|
||||
/(?<![\d.,:/])\b\d{2}\s*[-–]?\s*[А-ЯЁ][А-ЯЁа-яё]{1,7}(?:\s*\([А-ЯЁа-яё]+\))?(?:\s*[-–]\s*\d)?/gu,
|
||||
),
|
||||
].map((m) =>
|
||||
m[0]
|
||||
|
||||
Reference in New Issue
Block a user