replace / with space in economic calendar images

This commit is contained in:
Justin 2023-07-05 22:21:28 +08:00 committed by GitHub
parent 6793301249
commit 1b27186078
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5846,7 +5846,7 @@ class StockTicker():
period_img = None
flag_img = Image.open('logos/economic_logos/' + event['country'] + '.png')
circle_img = Image.open('logos/indicator.png')
title_img = self.textImage((event['title'].upper()).replace("(", '').replace(")", ''), font, r = 255, g = 255, b = 255)
title_img = self.textImage((event['title'].upper()).replace("(", '').replace(")", '').replace("/", " "), font, r = 255, g = 255, b = 255)
country_img = self.textImage(event['country'].upper(), font2, r= 255, g = 255, b = 0)
date_img = self.textImage(event['time'], small_font, r=0, g=150, b=255)
indicator_img = self.textImage(event['indicator'], font2, r=255, g=255, b=255)
@ -5972,7 +5972,7 @@ class StockTicker():
width, height = flag_img.size
flag_img = flag_img.resize((int(width/2), int(height/2)))
circle_img = Image.open('logos/indicator.png')
title_img = self.textImage((event['title'].upper()).replace("(", '').replace(")", ''), font, r = 255, g = 255, b = 255)
title_img = self.textImage((event['title'].upper()).replace("(", '').replace(")", '').replace("/", " "), font, r = 255, g = 255, b = 255)
country_img = self.textImage(event['country'].upper(), small_font, r= 255, g = 255, b = 0)
date_img = self.textImage(event['time'].split(' ')[2], small_font, r=0, g=150, b=255)
indicator_img = self.textImage(event['indicator'], small_font, r=255, g=255, b=255)