Compare commits
No commits in common. "77d2fef43a39a2b8f0dcdd99c8ab5c5d7b46abad" and "cb4b733bbb6adf8b705f6820b2ca284765a3d143" have entirely different histories.
77d2fef43a
...
cb4b733bbb
|
@ -20,7 +20,6 @@ from . import (
|
||||||
birthday,
|
birthday,
|
||||||
calendar,
|
calendar,
|
||||||
conference,
|
conference,
|
||||||
domains,
|
|
||||||
economist,
|
economist,
|
||||||
fx,
|
fx,
|
||||||
gwr,
|
gwr,
|
||||||
|
@ -251,8 +250,6 @@ async def get_data(now: datetime) -> typing.Mapping[str, str | object]:
|
||||||
events += subscription.get_events(os.path.join(my_data, "subscriptions.yaml"))
|
events += subscription.get_events(os.path.join(my_data, "subscriptions.yaml"))
|
||||||
events += economist.publication_dates(last_week, next_year)
|
events += economist.publication_dates(last_week, next_year)
|
||||||
|
|
||||||
events += domains.renewal_dates(my_data)
|
|
||||||
|
|
||||||
events.sort(key=operator.attrgetter("as_datetime"))
|
events.sort(key=operator.attrgetter("as_datetime"))
|
||||||
|
|
||||||
observer = sun.bristol()
|
observer = sun.bristol()
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
"""Accomodation."""
|
|
||||||
|
|
||||||
import csv
|
|
||||||
import os
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
from .types import Event
|
|
||||||
|
|
||||||
url = "https://admin.gandi.net/domain/01578ef0-a84b-11e7-bdf3-00163e6dc886/"
|
|
||||||
|
|
||||||
|
|
||||||
def renewal_dates(data_dir: str) -> list[Event]:
|
|
||||||
"""Get domain renewal dates."""
|
|
||||||
domain_files = [
|
|
||||||
(datetime.strptime(f, "export_domains_%m_%d_%Y_%I_%M_%p.csv"), f)
|
|
||||||
for f in os.listdir(data_dir)
|
|
||||||
if f.startswith("export_domains_")
|
|
||||||
]
|
|
||||||
return [
|
|
||||||
Event(
|
|
||||||
name="domain",
|
|
||||||
title=row["fqdn"],
|
|
||||||
date=datetime.fromisoformat(row["date_registry_end_utc"][:10]).date(),
|
|
||||||
url=url + row["fqdn"],
|
|
||||||
)
|
|
||||||
for row in csv.DictReader(open(os.path.join(data_dir, max(domain_files)[1])))
|
|
||||||
]
|
|
Loading…
Reference in a new issue