Update stockTicker.py

This commit is contained in:
Justin 2023-03-30 13:08:53 +08:00 committed by GitHub
parent 62e30970de
commit cd1e45feb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1924,12 +1924,12 @@ class StockTicker():
if '-' in prepost_settings[symbol]['Pre-market']['prechange']: if '-' in prepost_settings[symbol]['Pre-market']['prechange']:
preprice_img = self.textImage(preprice, font, r = 255, g = 0 , b = 0) preprice_img = self.textImage(preprice, font, r = 255, g = 0 , b = 0)
prechange_img = self.textImage(prechange, font, r = 255, g = 0, b = 0) prechange_img = self.textImage(prechange, font, r = 255, g = 0, b = 0)
prepercent_img = self.textImage('('+prepercent + '%' + ')' + timenow + str(weekday), font, r=255, g=0, b=0) prepercent_img = self.textImage('('+prepercent + '%' + ')', font, r=255, g=0, b=0)
arrow = Image.open('logos/down-tiny.png') arrow = Image.open('logos/down-tiny.png')
else: else:
preprice_img = self.textImage(preprice, font, r = 0, g = 255 , b = 0) preprice_img = self.textImage(preprice, font, r = 0, g = 255 , b = 0)
prechange_img = self.textImage(prechange, font, r = 0, g = 255, b = 0) prechange_img = self.textImage(prechange, font, r = 0, g = 255, b = 0)
prepercent_img = self.textImage('('+prepercent + '%' + ')' + timenow + str(weekday), font, r=0, g=255, b=0) prepercent_img = self.textImage('('+prepercent + '%' + ')', font, r=0, g=255, b=0)
arrow = Image.open('logos/up-tiny.png') arrow = Image.open('logos/up-tiny.png')
time_img = self.textImage(prepost_time, time_font, r=255,g=255,b=255) time_img = self.textImage(prepost_time, time_font, r=255,g=255,b=255)
@ -1953,12 +1953,12 @@ class StockTicker():
if '-' in prepost_settings[symbol]['Post-market']['postchange']: if '-' in prepost_settings[symbol]['Post-market']['postchange']:
postprice_img = self.textImage(postprice, font, r = 255, g = 0, b = 0) postprice_img = self.textImage(postprice, font, r = 255, g = 0, b = 0)
postchange_img = self.textImage(postchange, font, r = 255, g = 0, b = 0) postchange_img = self.textImage(postchange, font, r = 255, g = 0, b = 0)
postpercent_img = self.textImage('('+postpercent +'%'+')' + timenow + str(weekday), font, r=255, g=0, b=0) postpercent_img = self.textImage('('+postpercent +'%'+')', font, r=255, g=0, b=0)
arrow = Image.open('logos/down-tiny.png') arrow = Image.open('logos/down-tiny.png')
else: else:
postprice_img = self.textImage(postprice, font, r =0, g = 255 , b = 0) postprice_img = self.textImage(postprice, font, r =0, g = 255 , b = 0)
postchange_img = self.textImage(postchange, font, r = 0, g = 255, b = 0) postchange_img = self.textImage(postchange, font, r = 0, g = 255, b = 0)
postpercent_img = self.textImage('(' + postpercent + '%'+')' + timenow + str(weekday), font, r=0, g=255, b=0) postpercent_img = self.textImage('(' + postpercent + '%'+')', font, r=0, g=255, b=0)
arrow = Image.open('logos/up-tiny.png') arrow = Image.open('logos/up-tiny.png')
time_img = self.textImage(prepost_time, time_font, r=255,g=255,b=255) time_img = self.textImage(prepost_time, time_font, r=255,g=255,b=255)