Add support for feeds from reparatur-initiativen.de
This commit is contained in:
parent
93b0a314d4
commit
af33203932
@ -6,6 +6,7 @@ from datetime import date, datetime, timedelta, timezone
|
|||||||
from typing import Dict, List, NamedTuple
|
from typing import Dict, List, NamedTuple
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
import pytz
|
||||||
import recurring_ical_events
|
import recurring_ical_events
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
@ -137,6 +138,8 @@ def get_events_from_calendar(cal: Calendar) -> List[CalendarEvent]:
|
|||||||
all_day_event = True
|
all_day_event = True
|
||||||
start = datetime.combine(start, datetime.min.time(), tzinfo=get_tzinfo())
|
start = datetime.combine(start, datetime.min.time(), tzinfo=get_tzinfo())
|
||||||
|
|
||||||
|
start = start.astimezone(pytz.timezone("Europe/Berlin"))
|
||||||
|
|
||||||
end = vevent.get("DTEND", None)
|
end = vevent.get("DTEND", None)
|
||||||
if end is not None:
|
if end is not None:
|
||||||
end = end.dt
|
end = end.dt
|
||||||
@ -145,6 +148,8 @@ def get_events_from_calendar(cal: Calendar) -> List[CalendarEvent]:
|
|||||||
all_day_event = True
|
all_day_event = True
|
||||||
end = datetime.combine(end, datetime.max.time(), tzinfo=get_tzinfo())
|
end = datetime.combine(end, datetime.max.time(), tzinfo=get_tzinfo())
|
||||||
|
|
||||||
|
end = end.astimezone(pytz.timezone("Europe/Berlin"))
|
||||||
|
|
||||||
def get_str(key: str):
|
def get_str(key: str):
|
||||||
value = vevent.get(key, None)
|
value = vevent.get(key, None)
|
||||||
|
|
||||||
|
2035
poetry.lock
generated
2035
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@ include = [
|
|||||||
package-mode = false
|
package-mode = false
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.10"
|
||||||
icalendar = "^4.0.9"
|
icalendar = "^4.0.9"
|
||||||
fastapi = "^0.75.0"
|
fastapi = "^0.75.0"
|
||||||
uvicorn = {extras = ["standard"], version = "^0.17.6"}
|
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"
|
recurring-ical-events = "^1.0.1-beta.0"
|
||||||
pyyaml = "^6.0"
|
pyyaml = "^6.0"
|
||||||
asyncache = "^0.3.1"
|
asyncache = "^0.3.1"
|
||||||
|
pytz = "^2025.1"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
black = "^22.1.0"
|
black = "^22.1.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user