Use SecretLoader
This commit is contained in:
parent
34d10270d6
commit
f51f35b5c6
|
@ -18,4 +18,4 @@ advantage of the its e-ink screen, but I had problems getting it to run 24/7.
|
|||
|
||||
__all__ = ['__version__']
|
||||
|
||||
from _version import __version__
|
||||
from ._version import __version__
|
||||
|
|
|
@ -2,9 +2,7 @@ import argparse
|
|||
import bottle
|
||||
import datetime
|
||||
|
||||
from . import google_calendar
|
||||
|
||||
import config
|
||||
from . import (google_calendar, config)
|
||||
|
||||
TEMPLATE_INDEX = bottle.SimpleTemplate(name = "templates/index.html")
|
||||
|
||||
|
@ -42,7 +40,8 @@ def render_calendar(events_map, today):
|
|||
def get_events_map() -> tuple[dict[datetime.date, list[str]], datetime.date]:
|
||||
today = datetime.date.today()
|
||||
events_map = { }
|
||||
for prefix, url in config.ICAL_LINKS.items():
|
||||
for url in config.get_ical_links():
|
||||
prefix = 'J '
|
||||
for date, event in google_calendar.get_events_for_month(url, today):
|
||||
text = '{}: {}'.format(prefix, event.summary)
|
||||
events_map.setdefault(date, []).append(text)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
ical
|
||||
requests_cache
|
||||
secret_loader @ git@gitfub.space:Jmaa/secret_loader.git
|
||||
secret_loader @ git+https://gitfub.space/Jmaa/secret_loader@main
|
||||
bottle
|
||||
|
|
Loading…
Reference in New Issue
Block a user