big fix
This commit is contained in:
parent
1a4ed74c38
commit
e560d1b4c1
@ -1 +1 @@
|
||||
16/06/2021 14:19:52
|
||||
17/06/2021 13:21:55
|
||||
|
|
@ -1,4 +1,4 @@
|
||||
name,current,opening
|
||||
MSFT,254.9199,259.4
|
||||
NFLX,486.83,495
|
||||
GOOG,2494.04,2524.95
|
||||
MSFT,260.61,256.065
|
||||
NFLX,501.255,490.25
|
||||
GOOG,2528.78,2510.46
|
||||
|
|
BIN
league.ppm
BIN
league.ppm
Binary file not shown.
@ -588,7 +588,7 @@ class StockTicker():
|
||||
def getLeagueImage(self):
|
||||
|
||||
img = Image.new('RGB', (10000, 32))
|
||||
league_info = json.load(open('/home/pi/Desktop/stock_ticker/csv/sports/premier_league/past_games.json', 'r'))
|
||||
league_info = json.load(open('csv/sports/premier_league/past_games.json', 'r'))
|
||||
print(league_info[0].keys())
|
||||
small_font = ImageFont.load("./fonts/5x7.pil")
|
||||
large_font = ImageFont.load("./fonts/10x20.pil")
|
||||
@ -617,7 +617,7 @@ class StockTicker():
|
||||
print(home_team)
|
||||
|
||||
try:
|
||||
away_logo = Image.open('/home/pi/Desktop/stock_ticker/logos/sports/premier_league/' + away_team +'.png')
|
||||
away_logo = Image.open('logos/sports/premier_league/' + away_team +'.png')
|
||||
except:
|
||||
away_logo = self.textImage(away_team.replace(' ', '\n'), small_font, r = 255, g = 255, b = 255)
|
||||
|
||||
@ -654,7 +654,7 @@ class StockTicker():
|
||||
|
||||
def getTeamsImage(self):
|
||||
img = Image.new('RGB', (10000, 32))
|
||||
team_info = json.load(open('/home/pi/Desktop/stock_ticker/csv/sports/premier_league/team_stats.json', 'r'))
|
||||
team_info = json.load(open('csv/sports/premier_league/team_stats.json', 'r'))
|
||||
|
||||
small_font = ImageFont.load("./fonts/5x7.pil")
|
||||
med_font = ImageFont.load("./fonts/7x14.pil")
|
||||
@ -664,7 +664,7 @@ class StockTicker():
|
||||
x_offset = 0
|
||||
for team in team_info:
|
||||
try:
|
||||
logo = Image.open('/home/pi/Desktop/stock_ticker/logos/sports/premier_league/' + team['name'] +'.png')
|
||||
logo = Image.open('logos/sports/premier_league/' + team['name'] +'.png')
|
||||
img.paste(logo, (x_offset, 0))
|
||||
x_offset += logo.size[0] + 2
|
||||
except:
|
||||
|
BIN
weather.ppm
BIN
weather.ppm
Binary file not shown.
Loading…
Reference in New Issue
Block a user