news logos added
@ -1,4 +1,4 @@
|
||||
symbol,name,base,current,24hr change
|
||||
BTC,bitcoin,usd,31377,-1.7468733440038657
|
||||
ETH,ethereum,gbp,1355.57,-2.5698610989558937
|
||||
DOGE,dogecoin,usd,0.181844,-4.182728647925469
|
||||
BTC,bitcoin,usd,32447,0.6525124102349
|
||||
ETH,ethereum,gbp,1474.35,2.7079711942798514
|
||||
DOGE,dogecoin,usd,0.192086,-4.859820003305688
|
||||
|
|
@ -1 +1 @@
|
||||
["USD", {"AUD": [1.3391, 1.3374], "CAD": [1.2472, 1.2481], "CHF": [0.91771, 0.91667], "EUR": [0.8466, 0.84431], "GBP": [0.72094, 0.72204], "JPY": [110.31, 110.22], "NZD": [1.4239, 1.4337]}]
|
||||
["USD", {"AUD": [1.3553, 1.3667], "CAD": [1.2551, 1.2684], "CHF": [0.91966, 0.92151], "EUR": [0.84926, 0.84947], "GBP": [0.72665, 0.73363], "JPY": [110.26, 110.12], "NZD": [1.4358, 1.4444]}]
|
@ -1 +1 @@
|
||||
[{"main_weather": "Rain", "description": "light rain", "temp": 29.25, "min_temp": 28.44, "max_temp": 30.37, "feels_like": 35.92, "humidity": 82, "clouds": 67, "wind_speed": 1.34, "wind_direction": 41, "visibility": 10000, "uv": 0, "rain_chance": 0.2}, {"main_weather": "Clear", "description": "clear sky", "temp": 22.69, "min_temp": 12.13, "max_temp": 25.11, "feels_like": 22.37, "humidity": 52, "clouds": 0, "wind_speed": 3.09, "wind_direction": 340, "visibility": 10000, "uv": 7.13, "rain_chance": 0}]
|
||||
[{"main_weather": "Clouds", "description": "broken clouds", "temp": 28.1, "min_temp": 27.71, "max_temp": 30.98, "feels_like": 32.51, "humidity": 81, "clouds": 68, "wind_speed": 2.24, "wind_direction": 230, "visibility": 10000, "uv": 0, "rain_chance": 0}, {"main_weather": "Clear", "description": "clear sky", "temp": 26.13, "min_temp": 18.22, "max_temp": 27.53, "feels_like": 26.13, "humidity": 56, "clouds": 7, "wind_speed": 5.66, "wind_direction": 90, "visibility": 10000, "uv": 0.51, "rain_chance": 0.1}]
|
@ -1 +1 @@
|
||||
[[{"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.44, "max_temp": 30.37}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.83, "max_temp": 29.38}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.46, "max_temp": 28.27}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.86, "max_temp": 27.9}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.2, "max_temp": 28.18}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.33, "max_temp": 29.33}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.22, "max_temp": 31.57}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.13, "max_temp": 31.38}], [{"main_weather": "Clear", "description": "clear sky", "min_temp": 12.13, "max_temp": 25.11}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 15.69, "max_temp": 27.68}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 18.42, "max_temp": 28.52}, {"main_weather": "Rain", "description": "light rain", "min_temp": 17.16, "max_temp": 23.64}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 15.21, "max_temp": 24.05}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 14.51, "max_temp": 23.63}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 14.55, "max_temp": 22.1}, {"main_weather": "Rain", "description": "light rain", "min_temp": 16.33, "max_temp": 25.36}]]
|
||||
[[{"main_weather": "Clouds", "description": "few clouds", "min_temp": 27.71, "max_temp": 30.98}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.2, "max_temp": 30.81}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.39, "max_temp": 31.18}, {"main_weather": "Rain", "description": "light rain", "min_temp": 29, "max_temp": 31.48}, {"main_weather": "Rain", "description": "light rain", "min_temp": 29.33, "max_temp": 31.54}, {"main_weather": "Rain", "description": "light rain", "min_temp": 29.2, "max_temp": 31.51}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.92, "max_temp": 30.58}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.59, "max_temp": 30.84}], [{"main_weather": "Clear", "description": "clear sky", "min_temp": 18.22, "max_temp": 27.53}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 15.65, "max_temp": 23.16}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 15.7, "max_temp": 21.11}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 16.07, "max_temp": 19.15}, {"main_weather": "Rain", "description": "light rain", "min_temp": 14.87, "max_temp": 25.12}, {"main_weather": "Rain", "description": "light rain", "min_temp": 15.54, "max_temp": 22.73}, {"main_weather": "Rain", "description": "light rain", "min_temp": 14.28, "max_temp": 21.54}, {"main_weather": "Rain", "description": "light rain", "min_temp": 14.13, "max_temp": 21.82}]]
|
@ -1 +1 @@
|
||||
{"stocks": "16/07/2021 07:01:02", "crypto": "16/07/2021 07:01:04", "news": "16/07/2021 07:01:06", "weather": "16/07/2021 07:01:05", "forex": "16/07/2021 13:01:09", "sports": "16/07/2021 07:01:07"}
|
||||
{"stocks": "22/07/2021 14:07:18", "crypto": "22/07/2021 13:59:46", "news": "22/07/2021 13:59:47", "weather": "22/07/2021 13:59:46", "forex": "22/07/2021 19:59:50", "sports": "22/07/2021 13:59:48"}
|
40
csv/news.csv
@ -1,21 +1,21 @@
|
||||
headline,source,date,time
|
||||
Wobbling moon^ climate change to raise flood risk in 2030s: NASA - Sify,Sify News,2021-07-16,10:30:36Z
|
||||
Coronavirus: Is my chest pain an outcome of COVID-19 or anxiety? - Times of India,The Times of India,2021-07-16,10:30:00Z
|
||||
NRL 2021 LIVE updates: Sea Eagles v Dragons^ Eels beat Titans 26-8 - The Sydney Morning Herald,The Sydney Morning Herald,2021-07-16,10:29:58Z
|
||||
LCO astronomers say comet C/2014 UN271 is the largest ever discovered - SlashGear,SlashGear,2021-07-16,10:29:00Z
|
||||
Jacob Zuma: South Africa unrest was planned – President Ramaphosa - Daily Post Nigeria,Daily Post Nigeria,2021-07-16,10:26:37Z
|
||||
UK Covid live: hospitalisation numbers could reach ‘quite scary’ levels in weeks^ says Chris Whitty - The Guardian,The Guardian,2021-07-16,10:26:19Z
|
||||
18-year-old customer on Jeff Bezos' Blue Origin rocket to be youngest person ever in space - NBC News,NBC News,2021-07-16,10:14:00Z
|
||||
"Shocked" Court Denies Bail To Jamia Shooter In Hate Speech Case - NDTV,NDTV News,2021-07-16,10:11:12Z
|
||||
PDP-Laban: From fighting dictatorship to fighting each other - INQUIRER.net,Inquirer.net,2021-07-16,10:11:00Z
|
||||
Germany floods: Rhineland-Palatinate German state be worst hit for west Germany and Belgium floods - BBC News,BBC News,2021-07-16,10:09:25Z
|
||||
Producing memory from speckle patterns - Phys.org,Phys.Org,2021-07-16,09:59:13Z
|
||||
Rain or Shine survives NLEX as Kiefer Ravena recommits to lineup - Rappler,Rappler,2021-07-16,09:57:00Z
|
||||
ICC Men's T20 World Cup groups announced - International Cricket Council,International Cricket Council,2021-07-16,09:51:49Z
|
||||
Surge-ing ahead: CITF aims to have all adult residents in KL^ Selangor vaccinated by Aug 1 - The Star Online,The Star Online,2021-07-16,09:51:00Z
|
||||
KTV Covid-19 cluster: Only 6 of first 88 cases fully vaccinated; include 'frequent patrons' aged 19 to 60 - TODAYonline,TODAYonline,2021-07-16,09:50:13Z
|
||||
Over 200000 people quarantined as part of wide net cast to contain KTV Covid-19 cluster: Ong Ye Kung - TODAYonline,TODAYonline,2021-07-16,09:50:12Z
|
||||
Santos becomes fourth company to abandon drilling intentions in the Great Australian Bight - ABC News,ABC News (AU),2021-07-16,09:49:09Z
|
||||
Group sizes for indoor high-intensity mask-off activities reduced amid tighter COVID-19 measures - CNA,CNA,2021-07-16,09:47:50Z
|
||||
Pulitzer Prize-winning Reuters photographer Danish Siddiqui killed in Afghanistan - CNN ,CNN,2021-07-16,09:47:00Z
|
||||
These 5 symptoms in 1st week of infection may up risk of long Covid - IOL,IOL,2021-07-16,09:34:56Z
|
||||
Websites go down in internet outage - live updates - Telegraph.co.uk,Telegraph.co.uk,2021-07-22,16:37:40Z
|
||||
Realme is working on its own MagSafe charging tech called MagDart - Pocket-lint,Pocket-lint,2021-07-22,16:23:06Z
|
||||
Police Federation of England and Wales no longer has confidence in home secretary^ calling pay freeze 'final straw' - Sky News,Sky.com,2021-07-22,16:18:45Z
|
||||
Untwisting DNA Reveals New Force That Shapes Genomes - Newswise,Newswise,2021-07-22,16:15:00Z
|
||||
‘It’s too late’: US doctor says dying patients begging for Covid vaccine - The Guardian,The Guardian,2021-07-22,16:05:00Z
|
||||
Merkel: Germany has not done enough to hit Paris climate targets - The Guardian,The Guardian,2021-07-22,16:03:00Z
|
||||
Old Review - IGN,IGN,2021-07-22,16:02:43Z
|
||||
RTE star Joe Duffy asked if he's 'a big fat s***e' by Liveline caller in mad row - Irish Mirror,Irish Mirror,2021-07-22,16:02:01Z
|
||||
Covid-19: Nine in 10 need to be vaccinated to reach herd immunity – HSE - The Irish Times,The Irish Times,2021-07-22,15:58:28Z
|
||||
Staff should name and shame employers making it difficult to get vaccinated – Varadkar - The Irish Times,The Irish Times,2021-07-22,15:56:15Z
|
||||
Eric Clapton refuses to play venues requiring vaccines for concertgoers - BBC News,BBC News,2021-07-22,15:55:34Z
|
||||
AI breakthrough will 'transform' biology - Yahoo News Australia,Yahoo Entertainment,2021-07-22,15:54:55Z
|
||||
BREAKING: Lagos announces restriction for council poll - The Nation Newspaper ,The Nation Newspaper ,2021-07-22,15:52:54Z
|
||||
Labour MP ordered to leave Commons for saying Boris Johnson has ‘lied over and over again’ - The Independent,Independent,2021-07-22,15:48:43Z
|
||||
Cleanup begins in flood-ravaged Chinese city of Zhengzhou - CBC.ca,CBC News,2021-07-22,15:47:52Z
|
||||
DeepMind puts the entire human proteome online^ as folded by AlphaFold - Yahoo Finance Australia,Yahoo Entertainment,2021-07-22,15:46:22Z
|
||||
Young Co Cavan mother who died while trying to save son from drowning named as Natasha Core - Sunday World,Sundayworld.com,2021-07-22,15:44:41Z
|
||||
Samsung Galaxy Z Flip 3^ Fold 3 tipped to feature IPX8 water resistance - MobileSyrup,MobileSyrup,2021-07-22,15:43:00Z
|
||||
UK tech giant founder Mike Lynch can be extradited to US - BBC News,BBC News,2021-07-22,15:38:22Z
|
||||
EU has shipped tiny percentage of planned COVID-19 shot donations - Rappler,Rappler,2021-07-22,15:34:00Z
|
||||
|
Can't render this file because it contains an unexpected character in line 9 and column 9.
|
@ -1,2 +1,2 @@
|
||||
speed,brightness
|
||||
s,0
|
||||
f,0
|
|
@ -1,4 +1,4 @@
|
||||
name,current,opening
|
||||
MSFT,281.06,282.16
|
||||
NFLX,542.98,554.86
|
||||
GOOG,2625.98,2647.615
|
||||
MSFT,285.04,283.84
|
||||
NFLX,508.93,510.58
|
||||
GOOG,2663.775,2654
|
||||
|
|
BIN
logos/news_logos/9news.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
logos/news_logos/barron's.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
logos/news_logos/default.png
Normal file
After Width: | Height: | Size: 247 B |
BIN
logos/news_logos/elle.com.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
logos/news_logos/financial-times.png
Normal file
After Width: | Height: | Size: 897 B |
BIN
logos/news_logos/gizmodo.com.png
Normal file
After Width: | Height: | Size: 966 B |
BIN
logos/news_logos/gma-news.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
logos/news_logos/investor's-business-daily.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
logos/news_logos/live-science.png
Normal file
After Width: | Height: | Size: 883 B |
BIN
logos/news_logos/manchester-evening-news.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
logos/news_logos/nasa.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
logos/news_logos/page-six.png
Normal file
After Width: | Height: | Size: 276 B |
BIN
logos/news_logos/pcmag.com.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
logos/news_logos/phys.org.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
logos/news_logos/the-economist.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
logos/news_logos/the-sun.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
logos/news_logos/the-times.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
logos/news_logos/tmz.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
logos/news_logos/wjxt-news4jax.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
@ -679,11 +679,12 @@ class StockTicker():
|
||||
def getCryptoProfessional(self):
|
||||
|
||||
title_img = self.openImage('feature_titles/small_feature_titles/crypto.png')
|
||||
image_list = [title_img]
|
||||
self.blank = Image.new('RGB', (0, 16))
|
||||
image_list = [title_img, Image.new('RGB', (5, 16))]
|
||||
|
||||
start = time.time()
|
||||
self.readCryptoCSV()
|
||||
self.blank = Image.new('RGB', (0, 16))
|
||||
|
||||
for i, coin in enumerate(self.coins):
|
||||
|
||||
info = self.coin_info[coin]
|
||||
@ -768,11 +769,12 @@ class StockTicker():
|
||||
def getForexProfessional(self):
|
||||
|
||||
title_img = self.openImage('feature_titles/small_feature_titles/forex.png')
|
||||
image_list = [title_img]
|
||||
self.blank = Image.new('RGB', (0, 16))
|
||||
image_list = [title_img, Image.new('RGB', (5, 16))]
|
||||
|
||||
base, currency_info = json.load(open('csv/currency.json', 'r'))
|
||||
currencies = ['AUD', 'CAD', 'CHF', 'EUR', 'GBP', 'JPY', 'NZD']
|
||||
self.blank = Image.new('RGB', (0, 16))
|
||||
|
||||
|
||||
for i, currency in enumerate(currencies):
|
||||
|
||||
@ -864,7 +866,7 @@ class StockTicker():
|
||||
|
||||
def getStockProfessional(self):
|
||||
title_img = self.openImage('feature_titles/small_feature_titles/stocks.png')
|
||||
image_list = [title_img]
|
||||
image_list = [title_img, Image.new('RGB', (5, 16))]
|
||||
|
||||
self.readStocksCSV()
|
||||
|
||||
@ -956,9 +958,18 @@ class StockTicker():
|
||||
source_img = self.textImage(source_date_times[i], source_font, r=255, g=255, b=0, matrix_height = True)
|
||||
|
||||
try:
|
||||
logo_name = sources[i].lower().replace(' ', '-')
|
||||
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'news_logos')
|
||||
|
||||
logo = Image.open(os.path.join(logos_path, sources[i].lower().replace(' ', '-') + '.png'))
|
||||
logo = Image.open(os.path.join(logos_path, logo_name + '.png'))
|
||||
|
||||
except Exception as e:
|
||||
logo_name = 'default'
|
||||
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'news_logos')
|
||||
|
||||
logo = Image.open(os.path.join(logos_path, logo_name + '.png'))
|
||||
|
||||
|
||||
|
||||
img = Image.new('RGB', (headline_img.size[0], 32))
|
||||
img.paste(headline_img, (2, 0))
|
||||
@ -966,12 +977,6 @@ class StockTicker():
|
||||
|
||||
img= self.stitchImage([logo,img])
|
||||
|
||||
except Exception as e:
|
||||
image_list.append(self.blank)
|
||||
img = Image.new('RGB', (headline_img.size[0], 32))
|
||||
img.paste(headline_img, (0,0))
|
||||
img.paste(source_img, (0,16))
|
||||
|
||||
|
||||
image_list.append(img)
|
||||
image_list.append(self.blank)
|
||||
@ -986,7 +991,7 @@ class StockTicker():
|
||||
source_font = ImageFont.load("./fonts/6x10.pil")
|
||||
|
||||
title_img = self.openImage('feature_titles/small_feature_titles/news.png')
|
||||
image_list = [title_img, self.blank]
|
||||
image_list = [title_img, Image.new('RGB', (5, 16))]
|
||||
|
||||
headlines = []
|
||||
sources = []
|
||||
@ -1022,9 +1027,19 @@ class StockTicker():
|
||||
|
||||
|
||||
try:
|
||||
logo_name = sources[i].lower().replace(' ', '-')
|
||||
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'news_logos')
|
||||
|
||||
logo = Image.open(os.path.join(logos_path, sources[i].lower().replace(' ', '-') + '.png'))
|
||||
logo = Image.open(os.path.join(logos_path, logo_name + '.png'))
|
||||
|
||||
except Exception as e:
|
||||
logo_name = 'default'
|
||||
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'news_logos')
|
||||
|
||||
logo = Image.open(os.path.join(logos_path, logo_name + '.png'))
|
||||
|
||||
|
||||
|
||||
|
||||
width, height = logo.size
|
||||
|
||||
@ -1036,13 +1051,7 @@ class StockTicker():
|
||||
|
||||
img= self.stitchImage([logo,img])
|
||||
|
||||
except Exception as e:
|
||||
|
||||
image_list.append(self.blank)
|
||||
img = Image.new('RGB', (headline_img.size[0] + source_img.size[0] +5, 32))
|
||||
|
||||
img.paste(headline_img, (source_img.size[0]+ 5, 3))
|
||||
img.paste(source_img, (2,3))
|
||||
|
||||
|
||||
image_list.append(img)
|
||||
@ -1258,7 +1267,7 @@ class StockTicker():
|
||||
imgs = [title_img, self.blank]
|
||||
current_weathers = json.load(open('csv/current_weather.json', 'r'))
|
||||
for i, location in enumerate(locations):
|
||||
img = Image.new('RGB', (200, 32))
|
||||
img = Image.new('RGB', (203, 32))
|
||||
|
||||
|
||||
current_weather = current_weathers[i]
|
||||
@ -1343,12 +1352,12 @@ class StockTicker():
|
||||
img.paste(wtext_img, (168, 10))
|
||||
|
||||
wdir_img = self.textImage(self.degreesToCompass(current_weather['wind_direction']).upper(), small_font)
|
||||
img.paste(wdir_img, (183, 10))
|
||||
img.paste(wdir_img, (191, 10))
|
||||
|
||||
vis_img = Image.open(weather_dir + '/visibility.png')
|
||||
img.paste(vis_img, (154,20))
|
||||
|
||||
vtext_img = self.textImage(str(current_weather['visibility']/1000) + 'km'.upper(), small_font)
|
||||
vtext_img = self.textImage(str(round(current_weather['visibility']/1000, 1)) + 'km'.upper(), small_font)
|
||||
img.paste(vtext_img, (168, 22))
|
||||
|
||||
imgs.append(img)
|
||||
@ -1364,7 +1373,7 @@ class StockTicker():
|
||||
f.close()
|
||||
|
||||
title_img = self.openImage('feature_titles/small_feature_titles/weather.png')
|
||||
image_list = [title_img]
|
||||
image_list = [title_img, Image.new('RGB', (3, 16))]
|
||||
|
||||
current_weathers = json.load(open('csv/current_weather.json', 'r'))
|
||||
weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
@ -1666,8 +1675,6 @@ class StockTicker():
|
||||
rtext_img = self.textImage(str(int(current_weather['rain_chance']*100)) + '%', extra_small_font)
|
||||
hum_img = Image.open(weather_dir + '/humidity.png')
|
||||
htext_img = self.textImage(str(current_weather['humidity']) + '%', extra_small_font)
|
||||
uv_img = Image.open(weather_dir + '/uv.png')
|
||||
utext_img = self.textImage(str(round(current_weather['uv'], 1)) , extra_small_font)
|
||||
wind_img = Image.open(weather_dir + '/wind.png')
|
||||
wtext_img = self.textImage(str(current_weather['wind_speed']) + 'm/s'.upper(), extra_small_font)
|
||||
uv_img = Image.open(weather_dir + '/uv.png')
|
||||
@ -1678,7 +1685,7 @@ class StockTicker():
|
||||
wtext_img = self.textImage("{0:.0f}".format(current_weather['wind_speed']) + 'm/s'.upper(), small_font)
|
||||
wdir_img = self.textImage(self.degreesToCompass(current_weather['wind_direction']), small_font)
|
||||
vis_img = Image.open(weather_dir + '/visibility.png')
|
||||
vtext_img = self.textImage(str(current_weather['visibility']/1000) + 'km'.upper(), small_font)
|
||||
vtext_img = self.textImage(str(round(current_weather['visibility']/1000, 1)) + 'km'.upper(), small_font)
|
||||
|
||||
|
||||
img.paste(location_img, (0,0))
|
||||
|