tidied up paths

This commit is contained in:
Neythen 2021-05-04 17:39:16 +01:00
parent 6f4315bc32
commit 783e266b74
76 changed files with 9 additions and 7 deletions

0
logos/._AAPL.png Normal file → Executable file
View File

0
logos/._ADSK.png Normal file → Executable file
View File

0
logos/._AMZN.png Normal file → Executable file
View File

0
logos/._BABA.png Normal file → Executable file
View File

0
logos/._BIDU.png Normal file → Executable file
View File

0
logos/._COST.png Normal file → Executable file
View File

0
logos/._DIS.png Normal file → Executable file
View File

0
logos/._DNKN.png Normal file → Executable file
View File

0
logos/._FB.png Normal file → Executable file
View File

0
logos/._FDX.png Normal file → Executable file
View File

0
logos/._GILD.png Normal file → Executable file
View File

0
logos/._GOOG.png Normal file → Executable file
View File

0
logos/._HOG.png Normal file → Executable file
View File

0
logos/._HPQ.png Normal file → Executable file
View File

0
logos/._INTC.png Normal file → Executable file
View File

0
logos/._JPM.png Normal file → Executable file
View File

0
logos/._KO.png Normal file → Executable file
View File

0
logos/._LULU.png Normal file → Executable file
View File

0
logos/._LUV.png Normal file → Executable file
View File

0
logos/._MMM.png Normal file → Executable file
View File

0
logos/._MSFT.png Normal file → Executable file
View File

0
logos/._NFLX.png Normal file → Executable file
View File

0
logos/._NKE.png Normal file → Executable file
View File

0
logos/._PYPL.png Normal file → Executable file
View File

0
logos/._RCL.png Normal file → Executable file
View File

0
logos/._ROKU.png Normal file → Executable file
View File

0
logos/._SBUX.png Normal file → Executable file
View File

0
logos/._TSLA.png Normal file → Executable file
View File

0
logos/._TWTR.png Normal file → Executable file
View File

0
logos/._TXN.png Normal file → Executable file
View File

0
logos/._W.png Normal file → Executable file
View File

0
logos/._WM.png Normal file → Executable file
View File

0
logos/._WMT.png Normal file → Executable file
View File

0
logos/._blank.png Normal file → Executable file
View File

0
logos/._default.png Normal file → Executable file
View File

0
logos/._down.png Normal file → Executable file
View File

0
logos/._up.png Normal file → Executable file
View File

0
logos/AAPL.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 861 B

After

Width:  |  Height:  |  Size: 861 B

0
logos/ADSK.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

0
logos/AMZN.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
logos/BABA.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

0
logos/BIDU.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

0
logos/COST.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

0
logos/DIS.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

0
logos/DNKN.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

0
logos/FB.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
logos/FDX.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
logos/GILD.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
logos/GOOG.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
logos/HOG.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

0
logos/HPQ.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
logos/INTC.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
logos/JPM.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
logos/KO.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
logos/LULU.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
logos/LUV.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

0
logos/MMM.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
logos/MSFT.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
logos/NFLX.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
logos/NKE.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
logos/PYPL.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

0
logos/RCL.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

0
logos/ROKU.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
logos/SBUX.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

0
logos/TSLA.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 912 B

After

Width:  |  Height:  |  Size: 912 B

0
logos/TWTR.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 918 B

After

Width:  |  Height:  |  Size: 918 B

0
logos/TXN.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
logos/W.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

0
logos/WM.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

0
logos/WMT.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

0
logos/blank.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 281 B

After

Width:  |  Height:  |  Size: 281 B

0
logos/default.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
logos/down.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

0
logos/up.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 192 B

View File

@ -42,7 +42,7 @@ class StockTicker():
# Configuration for the matrix # Configuration for the matrix
options = RGBMatrixOptions() options = RGBMatrixOptions()
options.rows = 64 options.rows = 32
options.cols = 64 options.cols = 64
options.chain_length = 1 options.chain_length = 1
options.parallel = 1 options.parallel = 1
@ -151,22 +151,24 @@ class StockTicker():
#Get the logo from file that is the same as ticker name #Get the logo from file that is the same as ticker name
def getLogo(self, Ticker): def getLogo(self, Ticker):
logos_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos')
try: try:
Logo = Image.open('logos/' + Ticker + '.png') Logo = Image.open(os.path.join(logos_path, Ticker + '.png'))
except: except:
print('Could not find logo for: ' + Ticker + ' using default') print('Could not find logo for: ' + Ticker + ' using default')
Logo = Image.open('logos/default.png') Logo = Image.open(os.path.join(logos_path, 'default.png'))
return Logo return Logo
#Using change between min and day price give appropriate arrow #Using change between min and day price give appropriate arrow
#and set the overall change colour #and set the overall change colour
def getArrow(self, CHANGE): def getArrow(self, CHANGE):
self.greenORred self.greenORred
logos_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos')
if(CHANGE>0): if(CHANGE>0):
Arrow = Image.open('logos/up.png') Arrow = Image.open(os.path.join(logos_path, 'up.png'))
self.greenORred = (0, 255, 0) self.greenORred = (0, 255, 0)
return Arrow, CHANGE return Arrow, CHANGE
Arrow = Image.open('logos/down.png') Arrow = Image.open(os.path.join(logos_path, 'down.png'))
self.greenORred = (255, 0, 0) self.greenORred = (255, 0, 0)
CHANGE = (CHANGE * -1) CHANGE = (CHANGE * -1)
return Arrow, CHANGE return Arrow, CHANGE
@ -336,8 +338,8 @@ if __name__ == '__main__':
#print(sys.stdin.readlines()) #print(sys.stdin.readlines())
stock_ticker = StockTicker() stock_ticker = StockTicker()
stock_ticker.getSymbols() stock_ticker.getSymbols()
#stock_ticker.getFullStockImage() stock_ticker.getFullStockImage()
#stock_ticker.displayMatrix() stock_ticker.displayMatrix()
while True: while True: