From aaeb9e4de2aedf4f9bc23f94d1edab7552daf8a9 Mon Sep 17 00:00:00 2001 From: Neythen Date: Wed, 5 May 2021 20:26:56 +0100 Subject: [PATCH] market opening time check added --- __pycache__/stockTicker.cpython-37.pyc | Bin 8291 -> 8080 bytes api_caller.py | 66 +++++++++++++++---------- csv/tickers.csv | 38 +++++++------- final.ppm | Bin 463983 -> 460911 bytes stockTicker.py | 35 +++++++------ 5 files changed, 78 insertions(+), 61 deletions(-) diff --git a/__pycache__/stockTicker.cpython-37.pyc b/__pycache__/stockTicker.cpython-37.pyc index e2520d196ad85dbd0630982af9a408424576809d..2e3e0397a76bd0b1a7e010f3046d939e9c732480 100644 GIT binary patch delta 1097 zcmYL`&2Jk;6u{?=*X#AhYi}LLaS|tXMG|T%QktS5kZ>ra5eM2pQj%udkT@ATb(7f6 zcxjtxmw*x~KBTJ36B6yEcEycTl@sDa{THY>ErLT4AcVvPapS-n_rQ$iH}Ac9Z|1#u zzr1pL(t6dhOh)7OUkA%aA6RpI{D8DFb3ibM3lMytIUx}e8ts}G77=0WgA*1bA}UOh zbTNvb@fCfR6`l^dFrQ5w_JzKP;>q|&ks!QLU#mCqyZBk$wAS~jyb`icj{MViX>k=g;9YTT25-ue(u!1*|1^cqH zFDeWuEa8J>!FroSCwzKlW_n&a_*O2pBA(&tUbLfU^h`g#z-s&=^PtteK>aJcXi&?k6y6(hC z#r{n3*NuQeg57Xkcq`Fu>*{7^+LPD#} zYk@AyB|+7kQ0D7|AiTO!Z?7F2TZ0oL3*@(U_l_E0O%`a5ch^~-Wf;s0=zfc!+^Q+zx$n$43)UywGU=71S9Uov9G5u=A_7*FA7 z?nRi!<=ioNA3x4bz#V*;>rL&c=noY36+R>c_-AgZuV{pHZg7*E5Tiwt$D^En@ju4N B45R=6 delta 1258 zcmYk5U2Gdg5XX1c=kxjEvtyjZas5#XHEFC$p`;K&L1{zUkcZZVq$KGzZECWPn98wrWmDu6@<5~{>o#Y5lfJ|ZC^@$m#NePPBaEqmJ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fXN;ADHWSV&>6r!M zalDAz$9-{enm7a!h~Pb%3re~IUh(#)i^U7InTGxY{z{p<`$Dc^MpsK%Ykd48YilKe zLCMF}G9Ik)KTTwTY?|~@{Rt_>G=Q=Q%}A>pW_!?i(P2Cgv07;IY27Yu6q< zdKAEwz7HsD`r)MVRoX MbZ-_>Mj;#Xe_e8A7XSbN diff --git a/stockTicker.py b/stockTicker.py index 7d0485c..0920866 100644 --- a/stockTicker.py +++ b/stockTicker.py @@ -152,16 +152,7 @@ class StockTicker(): elif current_img == 2: current_img = 1 offset_x = 0 - - #Get the logo from file that is the same as ticker name - def getLogo(self, Ticker): - logos_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos') - try: - Logo = Image.open(os.path.join(logos_path, Ticker + '.png')) - except: - print('Could not find logo for: ' + Ticker + ' using default') - Logo = Image.open(os.path.join(logos_path, 'default.png')) - return Logo + #Using change between min and day price give appropriate arrow #and set the overall change colour @@ -250,12 +241,24 @@ class StockTicker(): ticker = symbol #TEXT current = '%.2f' % float(info[0]) #TEXT - logo = self.getLogo(symbol) + + arrow, change = self.getArrow(change) change = '%.2f' % change midFrame = self.textToImage(ticker, current, change, arrow) #IMAGE THE TEXT - - stitchedStock = self.stitchImage([logo,midFrame]) + + + try: + logos_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos') + print(os.path.join(logos_path, ticker + '.png')) + logo = Image.open(os.path.join(logos_path, ticker + '.png')) + stitchedStock = self.stitchImage([logo,midFrame]) + except: + print('no logo for ' + ticker) + stitchedStock = midFrame + + + image_list.append(self.blank) image_list.append(stitchedStock) @@ -361,13 +364,13 @@ if __name__ == '__main__': stock_ticker.process_msg(brightness) stock_ticker.process_msg(speed) - print(stock_ticker.delay, stock_ticker.brightness) + #t = time.time() #api_caller = pexpect.spawn("sudo -E python3 api_caller.py") #print('time to call api', time.time()-t) - #stock_ticker.getFullStockImage() - #stock_ticker.displayMatrix() + stock_ticker.getFullStockImage() + stock_ticker.displayMatrix() while True: