parent
c94e98acb1
commit
8cf0b982f0
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import configparser
|
import configparser
|
||||||
import operator
|
|
||||||
import os
|
import os
|
||||||
import typing
|
import typing
|
||||||
from datetime import date, datetime, timedelta
|
from datetime import date, datetime, timedelta
|
||||||
|
@ -265,7 +264,6 @@ async def get_data(now: datetime) -> typing.Mapping[str, str | object]:
|
||||||
events += hn.whoishiring(last_year, next_year)
|
events += hn.whoishiring(last_year, next_year)
|
||||||
|
|
||||||
events += domains.renewal_dates(my_data)
|
events += domains.renewal_dates(my_data)
|
||||||
events += [Event(name="today", date=today)]
|
|
||||||
|
|
||||||
for launch in rockets:
|
for launch in rockets:
|
||||||
dt = None
|
dt = None
|
||||||
|
@ -284,7 +282,8 @@ async def get_data(now: datetime) -> typing.Mapping[str, str | object]:
|
||||||
e = Event(name="rocket", date=dt, title=rocket_name)
|
e = Event(name="rocket", date=dt, title=rocket_name)
|
||||||
events.append(e)
|
events.append(e)
|
||||||
|
|
||||||
events.sort(key=operator.attrgetter("as_datetime"))
|
events += [Event(name="today", date=today)]
|
||||||
|
events.sort(key=lambda e: (e.as_datetime, e.name != "today"))
|
||||||
|
|
||||||
observer = sun.bristol()
|
observer = sun.bristol()
|
||||||
reply["sunrise"] = sun.sunrise(observer)
|
reply["sunrise"] = sun.sunrise(observer)
|
||||||
|
|
Loading…
Reference in a new issue