minor fixes

This commit is contained in:
aceisace 2022-04-14 04:57:55 +02:00
parent 9a843fe033
commit 661aab45d4
3 changed files with 5 additions and 37 deletions

View File

@ -20,7 +20,7 @@ top_level = os.path.dirname(
# Get path of 'fonts' and 'images' folders within Inkycal folder
fonts_location = top_level + '/fonts/'
images = top_level + '/images/'
image_folder = top_level + '/image_folder/'
# Get available fonts within fonts folder
fonts = {}

View File

@ -108,9 +108,9 @@ class Feeds(inkycal_module):
for feeds in self.feed_urls:
text = feedparser.parse(feeds)
for posts in text.entries:
summary = posts.summary
parsed_feeds.append(
f"{posts.title}: {re.sub('<[^<]+?>', '', posts.summary)}")
if "summary" in posts:
summary = posts["summary"]
parsed_feeds.append(f"{posts.title}: {re.sub('<[^<]+?>', '', posts.summary)}")
self._parsed_feeds = parsed_feeds

View File

@ -30,39 +30,7 @@ tests = [
"tickers": [],
"padding_x": 10, "padding_y": 10, "fontsize": 12, "language": "en"
}
},
{
"name": "Stocks",
"config": {
"size": [528, 200],
"tickers": ['TSLA', 'AMD', 'NVDA', '^DJI', 'BTC-USD', 'EURUSD=X'],
"padding_x": 10, "padding_y": 10, "fontsize": 12, "language": "en"
}
},
{
"name": "Stocks",
"config": {
"size": [528, 800],
"tickers": ['TSLA', 'AMD', 'NVDA', '^DJI', 'BTC-USD', 'EURUSD=X'],
"padding_x": 10, "padding_y": 10, "fontsize": 12, "language": "en"
}
},
{
"name": "Stocks",
"config": {
"size": [528, 100],
"tickers": "TSLA,AMD,NVDA,^DJI,BTC-USD,EURUSD=X",
"padding_x": 10, "padding_y": 10, "fontsize": 12, "language": "en"
}
},
{
"name": "Stocks",
"config": {
"size": [528, 400],
"tickers": ['TSLA', 'AMD', 'NVDA', '^DJI', 'BTC-USD', 'EURUSD=X'],
"padding_x": 10, "padding_y": 10, "fontsize": 14, "language": "en"
}
},
}
]