diff --git a/Calendar/AgendaListPanel.py b/Calendar/AgendaListPanel.py index 44cd6bf..4bbceb5 100644 --- a/Calendar/AgendaListPanel.py +++ b/Calendar/AgendaListPanel.py @@ -40,7 +40,10 @@ class AgendaListPanel (PanelDesign): self.__draw_seperator__(1-infolist_size[1], colors["fg"]) - def add_taks (self, tasks): + def add_tasks (self, tasks): + pass + + def add_crypto (self, crypto): pass def __finish_panel__(self): diff --git a/Calendar/DayListPanel.py b/Calendar/DayListPanel.py index 6530ce9..7fbb213 100644 --- a/Calendar/DayListPanel.py +++ b/Calendar/DayListPanel.py @@ -51,11 +51,12 @@ class DayListPanel (PanelDesign): self.__draw_rss_infoarea__(rss) def add_crypto (self, crypto): - for row in self.__day_rows__: - row.add_crypto(crypto) if general_settings["info-area"] is "crypto": self.__draw_crypto_infoarea__(crypto) + def add_tasks (self, tasks): + pass + def __draw_rss_infoarea__ (self, rss): height = infoarea_replacedrowscount * self.dayrow_size[1] * self.size[1] - rss_y_padding ypos = self.size[1] - height diff --git a/Calendar/DayRowDesign.py b/Calendar/DayRowDesign.py index 63eac57..7f6d44d 100644 --- a/Calendar/DayRowDesign.py +++ b/Calendar/DayRowDesign.py @@ -37,9 +37,6 @@ class DayRowDesign (DesignEntity): def add_rssfeed (self, rss): pass - - def add_crypto (self, crypto): - pass def __draw_event_list__ (self, calendar): number_width = daynumber_y_size[0] * self.size[1] diff --git a/Calendar/DayViewPanel.py b/Calendar/DayViewPanel.py index 124f21f..512d3a1 100644 --- a/Calendar/DayViewPanel.py +++ b/Calendar/DayViewPanel.py @@ -49,7 +49,7 @@ class DayViewPanel (PanelDesign): self.__draw_rss_feed__(rss) self.__draw_infoarea_line__() - def add_cryptofeed (self, crypto): + def add_crypto (self, crypto): if general_settings["info-area"] == "crypto": self.__draw_crypto_feed__(crypto) self.__draw_infoarea_line__() @@ -90,7 +90,7 @@ class DayViewPanel (PanelDesign): events.pos = pos self.draw_design(events) - def add_taks (self, tasks): + def add_tasks (self, tasks): pass def __finish_panel__ (self): diff --git a/Calendar/E-Paper.py b/Calendar/E-Paper.py index 0745d70..19db1a1 100644 --- a/Calendar/E-Paper.py +++ b/Calendar/E-Paper.py @@ -22,7 +22,7 @@ from AgendaListPanel import AgendaListPanel import OwmForecasts import IcalEvents import RssParserPosts -from GeckoCrypto import GeckoCrypto +import GeckoCrypto all_locales = locale.locale_alias if language.lower() not in all_locales.keys(): @@ -62,7 +62,7 @@ def main(): owm = OwmForecasts.OwmForecasts(location, api_key, paid_api=owm_paid_subscription) events_cal = IcalEvents.IcalEvents(ical_urls, highlighted_ical_urls) rss = RssParserPosts.RssParserPosts(rss_feeds) - crypto = GeckoCrypto(crypto_coins) + crypto = GeckoCrypto.GeckoCrypto(crypto_coins) while True: loop_timer.begin_loop() @@ -78,10 +78,6 @@ def main(): else: raise ImportError("choosen_design must be valid (" + choosen_design + ")") - debug.print_line('Fetching crypto prices from coin gecko') - crypto.reload() - design.add_crypto(crypto) - debug.print_line("Fetching weather information from open weather map") owm.reload() design.add_weather(owm) @@ -94,6 +90,10 @@ def main(): rss.reload() design.add_rssfeed(rss) + debug.print_line('Fetching crypto prices from coin gecko') + crypto.reload() + design.add_crypto(crypto) + debug.print_line("\nStarting to render") for i, output in enumerate(output_adapters): try: diff --git a/Calendar/MonthOvPanel.py b/Calendar/MonthOvPanel.py index b580056..f5be56c 100644 --- a/Calendar/MonthOvPanel.py +++ b/Calendar/MonthOvPanel.py @@ -71,6 +71,9 @@ class MonthOvPanel (PanelDesign): if general_settings["info-area"] is "crypto": self.__draw_crypto_post_list_to_bottom__(crypto) + def add_tasks (self, tasks): + pass + def add_calendar (self, calendar): if general_settings["highlight-event-days"]: month_events = list(set([ (event.begin_datetime.day, event.begin_datetime.month, event.begin_datetime.year) for event in calendar.get_month_events()])) diff --git a/Calendar/MonthViewPanel.py b/Calendar/MonthViewPanel.py index 294520d..c3bc3a7 100644 --- a/Calendar/MonthViewPanel.py +++ b/Calendar/MonthViewPanel.py @@ -74,7 +74,10 @@ class MonthViewPanel (PanelDesign): rss.pos = pos self.draw_design(rss) - def add_taks (self, tasks): + def add_tasks (self, tasks): + pass + + def add_crypto (self, crypto): pass def __finish_panel__(self): diff --git a/Calendar/PanelDesign.py b/Calendar/PanelDesign.py index 53e65dc..361d57c 100644 --- a/Calendar/PanelDesign.py +++ b/Calendar/PanelDesign.py @@ -10,16 +10,19 @@ class PanelDesign (DesignEntity): self.start_timestamp = datetime.now() def add_weather (self, weather): - raise NotImplementedError("Functions needs to be implemented") + raise NotImplementedError("Function needs to be implemented") def add_calendar (self, calendar): - raise NotImplementedError("Functions needs to be implemented") + raise NotImplementedError("Function needs to be implemented") def add_rssfeed (self, rss): - raise NotImplementedError("Functions needs to be implemented") + raise NotImplementedError("Function needs to be implemented") - def add_taks (self, tasks): - raise NotImplementedError("Functions needs to be implemented") + def add_tasks (self, tasks): + raise NotImplementedError("Function needs to be implemented") + + def add_crypto (self, crypto): + raise NotImplementedError("Function needs to be implemented") def __finish_panel__(self): pass