This commit is contained in:
Your Name 2021-06-17 18:30:13 +01:00
parent 1a4ed74c38
commit e560d1b4c1
7 changed files with 8 additions and 8 deletions

View File

@ -1 +1 @@
16/06/2021 14:19:52
17/06/2021 13:21:55

1 16/06/2021 14:19:52 17/06/2021 13:21:55

View File

@ -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

1 name current opening
2 MSFT 254.9199 260.61 259.4 256.065
3 NFLX 486.83 501.255 495 490.25
4 GOOG 2494.04 2528.78 2524.95 2510.46

BIN
final.ppm

Binary file not shown.

Binary file not shown.

View File

@ -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
teams.ppm

Binary file not shown.

Binary file not shown.