Added info about additional, not displayed events.
This commit is contained in:
parent
4cfe34ed93
commit
11ffdeac13
2 changed files with 4 additions and 3 deletions
|
@ -49,7 +49,9 @@ available_panels = {
|
||||||
loop_timer = LoopTimer(update_interval, run_on_hour=True)
|
loop_timer = LoopTimer(update_interval, run_on_hour=True)
|
||||||
|
|
||||||
"""Main loop starts from here"""
|
"""Main loop starts from here"""
|
||||||
def main ():
|
def main():
|
||||||
|
owm = OwmForecasts.OwmForecasts(location, api_key, paid_api=owm_paid_subscription)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
loop_timer.begin_loop()
|
loop_timer.begin_loop()
|
||||||
start_time = loop_timer.get_current()[0]
|
start_time = loop_timer.get_current()[0]
|
||||||
|
@ -65,7 +67,6 @@ def main ():
|
||||||
raise ImportError("choosen_design must be valid (" + choosen_design + ")")
|
raise ImportError("choosen_design must be valid (" + choosen_design + ")")
|
||||||
|
|
||||||
debug.print_line("Fetching weather information from open weather map")
|
debug.print_line("Fetching weather information from open weather map")
|
||||||
owm = OwmForecasts.OwmForecasts(location, api_key, paid_api=owm_paid_subscription)
|
|
||||||
design.add_weather(owm)
|
design.add_weather(owm)
|
||||||
|
|
||||||
debug.print_line('Fetching events from your calendar')
|
debug.print_line('Fetching events from your calendar')
|
||||||
|
|
|
@ -9,7 +9,7 @@ class SingelDayEventListDesign (EventListDesign):
|
||||||
"""Specialized event list for day list design."""
|
"""Specialized event list for day list design."""
|
||||||
def __init__ (self, size, events, font_size = 16, line_spacing=2, col_spacing=5, general_color="black", background_color="white", highlight_color="red"):
|
def __init__ (self, size, events, font_size = 16, line_spacing=2, col_spacing=5, general_color="black", background_color="white", highlight_color="red"):
|
||||||
prefix_func = lambda x : self.__get_event_prefix__(x)
|
prefix_func = lambda x : self.__get_event_prefix__(x)
|
||||||
super().__init__(size, events, text_size=font_size, line_spacing=line_spacing, col_spacing=col_spacing, event_prefix_func=prefix_func, font_family=font)
|
super().__init__(size, events, text_size=font_size, line_spacing=line_spacing, col_spacing=col_spacing, event_prefix_func=prefix_func, font_family=font, show_more_info=True)
|
||||||
|
|
||||||
def __get_event_prefix__ (self, event):
|
def __get_event_prefix__ (self, event):
|
||||||
if event.allday:
|
if event.allday:
|
||||||
|
|
Loading…
Reference in a new issue