From 8652ef187ce6890ea59a855c82b7a16ee2267e24 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 18 May 2019 09:35:49 +0200 Subject: [PATCH] General fixes --- Calendar/CryptoListDesign.py | 7 +++---- Calendar/E-Paper.py | 4 ++-- Calendar/settings.py.sample | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Calendar/CryptoListDesign.py b/Calendar/CryptoListDesign.py index b5b9a8f..1797bf7 100644 --- a/Calendar/CryptoListDesign.py +++ b/Calendar/CryptoListDesign.py @@ -2,14 +2,14 @@ from DesignEntity import DesignEntity from TableDesign import TableDesign from Assets import defaultfontsize from CryptoPrices import CryptoPrices -from settings import coins as cryptos +from settings import crypto_coins as cryptos class CryptoListDesign (DesignEntity): def __init__ (self, size, coin, text_size = defaultfontsize): super(CryptoListDesign, self).__init__(size) self.coin = coin - self.__post_matrix__ = [] + self.__post_matrix__ = [[]] self.text_size = text_size def __finish_image__ (self): @@ -22,6 +22,5 @@ class CryptoListDesign (DesignEntity): x=0 while x < len(name): row = name[x]+": $"+str(price[x]) - self.__post_matrix__.append(row) + self.__post_matrix__[0].append(row) x= x+1 - print(self.__post_matrix__) diff --git a/Calendar/E-Paper.py b/Calendar/E-Paper.py index 50b780d..fef890a 100644 --- a/Calendar/E-Paper.py +++ b/Calendar/E-Paper.py @@ -13,7 +13,7 @@ from Assets import path from LoopTimer import LoopTimer import locale from DebugConsole import DebugConsole -from settings import datetime_encoding, language, render_to_display, render_to_file, display_colours, location, api_key, owm_paid_subscription, choosen_design, ical_urls, highlighted_ical_urls, rss_feeds, update_interval, calibrate_hours,coins +from settings import datetime_encoding, language, render_to_display, render_to_file, display_colours, location, api_key, owm_paid_subscription, choosen_design, ical_urls, highlighted_ical_urls, rss_feeds, update_interval, calibrate_hours, crypto_coins from MonthOvPanel import MonthOvPanel from DayListPanel import DayListPanel from DayViewPanel import DayViewPanel @@ -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) - coin = CryptoPrices.CryptoPrices(coins) + coin = CryptoPrices.CryptoPrices(crypto_coins) while True: loop_timer.begin_loop() diff --git a/Calendar/settings.py.sample b/Calendar/settings.py.sample index b16d504..46e0db6 100644 --- a/Calendar/settings.py.sample +++ b/Calendar/settings.py.sample @@ -11,7 +11,7 @@ rss_feeds = [ "http://feeds.bbci.co.uk/news/world/rss.xml#" ] -coins = [ +crypto_coins = [ "bitcoin", "litecoin", "ethereum", @@ -36,7 +36,7 @@ font_boldness = "semibold" # extralight, light, regular, semibold, bold, extra line_thickness = 1 # 1-3 Thickness advised choosen_design = "month-overview" # month-overview, day-list, day-view, agenda-list, month-view general_settings = { # General settings that designs may use - "info-area" : "rss", # empty, events, rss + "info-area" : "rss", # empty, events, rss, crypto "highlight-event-days" : True, "weather-info" : True }