Add support for feeds from reparatur-initiativen.de

This commit is contained in:
Fabian Müller 2025-02-05 23:07:48 +01:00
parent 93b0a314d4
commit af33203932
3 changed files with 1107 additions and 936 deletions

View File

@ -6,6 +6,7 @@ from datetime import date, datetime, timedelta, timezone
from typing import Dict, List, NamedTuple
import aiohttp
import pytz
import recurring_ical_events
import yaml
@ -137,6 +138,8 @@ def get_events_from_calendar(cal: Calendar) -> List[CalendarEvent]:
all_day_event = True
start = datetime.combine(start, datetime.min.time(), tzinfo=get_tzinfo())
start = start.astimezone(pytz.timezone("Europe/Berlin"))
end = vevent.get("DTEND", None)
if end is not None:
end = end.dt
@ -145,6 +148,8 @@ def get_events_from_calendar(cal: Calendar) -> List[CalendarEvent]:
all_day_event = True
end = datetime.combine(end, datetime.max.time(), tzinfo=get_tzinfo())
end = end.astimezone(pytz.timezone("Europe/Berlin"))
def get_str(key: str):
value = vevent.get(key, None)

2035
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ include = [
package-mode = false
[tool.poetry.dependencies]
python = "^3.8"
python = "^3.10"
icalendar = "^4.0.9"
fastapi = "^0.75.0"
uvicorn = {extras = ["standard"], version = "^0.17.6"}
@ -19,6 +19,7 @@ aiohttp = {extras = ["speedups"], version = "^3.8.1"}
recurring-ical-events = "^1.0.1-beta.0"
pyyaml = "^6.0"
asyncache = "^0.3.1"
pytz = "^2025.1"
[tool.poetry.dev-dependencies]
black = "^22.1.0"