Mercurial > code > home > repos > gcalendarwatch
view localtypes.py @ 42:7d9609edcf9c
track calendar feed summary/description text and emit them in graphs
author | drewp@bigasterisk.com |
---|---|
date | Sun, 18 Feb 2024 12:34:53 -0800 |
parents | e2209226b001 |
children | f75b3a109b66 |
line wrap: on
line source
import datetime from typing import TypedDict class MongoConf(TypedDict): host: str port: int database: str collection: str class Conf(TypedDict): event_uri_ns: str minutes_between_polls: float mongo: MongoConf class Record(TypedDict): uri: str feed: str title: str start: int startTime: datetime.datetime startDate: int end: int endTime: datetime.datetime endDate: int endTimeUnspecified: bool htmlLink: str creatorEmail: str def feedFromCalId(conf: Conf, calId: str) -> str: return conf['event_uri_ns'] + 'feed/' + calId