feat(notification): support notification

This commit is contained in:
MingxuanGame
2025-08-21 07:22:44 +00:00
parent 6ac9a124ea
commit 9fb0d0c198
13 changed files with 626 additions and 70 deletions

View File

@@ -118,3 +118,9 @@ def are_adjacent_weeks(dt1: datetime, dt2: datetime) -> bool:
def are_same_weeks(dt1: datetime, dt2: datetime) -> bool:
return dt1.isocalendar()[:2] == dt2.isocalendar()[:2]
def truncate(text: str, limit: int = 100, ellipsis: str = "...") -> str:
if len(text) > limit:
return text[:limit] + ellipsis
return text