diff --git a/csv/crypto.csv b/csv/crypto.csv index f047339..4425cac 100644 --- a/csv/crypto.csv +++ b/csv/crypto.csv @@ -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 diff --git a/csv/currency.json b/csv/currency.json index 4d10993..24cca5f 100644 --- a/csv/currency.json +++ b/csv/currency.json @@ -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]}] \ No newline at end of file +["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]}] \ No newline at end of file diff --git a/csv/current_weather.json b/csv/current_weather.json index 589b3f5..00a32ea 100644 --- a/csv/current_weather.json +++ b/csv/current_weather.json @@ -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}] \ No newline at end of file +[{"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}] \ No newline at end of file diff --git a/csv/daily_weather.json b/csv/daily_weather.json index 053ca8a..f21a1f9 100644 --- a/csv/daily_weather.json +++ b/csv/daily_weather.json @@ -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}]] \ No newline at end of file +[[{"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}]] \ No newline at end of file diff --git a/csv/last_updates.json b/csv/last_updates.json index b8aac4c..9424c19 100644 --- a/csv/last_updates.json +++ b/csv/last_updates.json @@ -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"} \ No newline at end of file +{"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"} \ No newline at end of file diff --git a/csv/news.csv b/csv/news.csv index 9616e4d..da34569 100644 --- a/csv/news.csv +++ b/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 diff --git a/csv/settings.csv b/csv/settings.csv index 1701092..4688477 100644 --- a/csv/settings.csv +++ b/csv/settings.csv @@ -1,2 +1,2 @@ speed,brightness -s,0 \ No newline at end of file +f,0 \ No newline at end of file diff --git a/csv/tickers.csv b/csv/tickers.csv index ac8e790..04287db 100644 --- a/csv/tickers.csv +++ b/csv/tickers.csv @@ -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 diff --git a/display_images/crypto.ppm b/display_images/crypto.ppm index bb7c846..60a57a2 100755 Binary files a/display_images/crypto.ppm and b/display_images/crypto.ppm differ diff --git a/display_images/forex.ppm b/display_images/forex.ppm index 4eb8342..bba9419 100755 Binary files a/display_images/forex.ppm and b/display_images/forex.ppm differ diff --git a/display_images/news.ppm b/display_images/news.ppm index b8fc6f6..75a95ee 100755 Binary files a/display_images/news.ppm and b/display_images/news.ppm differ diff --git a/display_images/stocks.ppm b/display_images/stocks.ppm index 887512f..0c702ad 100755 Binary files a/display_images/stocks.ppm and b/display_images/stocks.ppm differ diff --git a/display_images/today_weather.ppm b/display_images/today_weather.ppm index bfe44fa..c23cfd1 100755 Binary files a/display_images/today_weather.ppm and b/display_images/today_weather.ppm differ diff --git a/logos/news_logos/9news.png b/logos/news_logos/9news.png new file mode 100644 index 0000000..1127f25 Binary files /dev/null and b/logos/news_logos/9news.png differ diff --git a/logos/news_logos/barron's.png b/logos/news_logos/barron's.png new file mode 100644 index 0000000..a6913fe Binary files /dev/null and b/logos/news_logos/barron's.png differ diff --git a/logos/news_logos/default.png b/logos/news_logos/default.png new file mode 100644 index 0000000..46e7b50 Binary files /dev/null and b/logos/news_logos/default.png differ diff --git a/logos/news_logos/elle.com.png b/logos/news_logos/elle.com.png new file mode 100644 index 0000000..6131213 Binary files /dev/null and b/logos/news_logos/elle.com.png differ diff --git a/logos/news_logos/financial-times.png b/logos/news_logos/financial-times.png new file mode 100644 index 0000000..572b5e1 Binary files /dev/null and b/logos/news_logos/financial-times.png differ diff --git a/logos/news_logos/gizmodo.com.png b/logos/news_logos/gizmodo.com.png new file mode 100644 index 0000000..5389ef3 Binary files /dev/null and b/logos/news_logos/gizmodo.com.png differ diff --git a/logos/news_logos/gma-news.png b/logos/news_logos/gma-news.png new file mode 100644 index 0000000..08f7fbd Binary files /dev/null and b/logos/news_logos/gma-news.png differ diff --git a/logos/news_logos/investor's-business-daily.png b/logos/news_logos/investor's-business-daily.png new file mode 100644 index 0000000..d201e1b Binary files /dev/null and b/logos/news_logos/investor's-business-daily.png differ diff --git a/logos/news_logos/live-science.png b/logos/news_logos/live-science.png new file mode 100644 index 0000000..43faca2 Binary files /dev/null and b/logos/news_logos/live-science.png differ diff --git a/logos/news_logos/manchester-evening-news.png b/logos/news_logos/manchester-evening-news.png new file mode 100644 index 0000000..b56bf3e Binary files /dev/null and b/logos/news_logos/manchester-evening-news.png differ diff --git a/logos/news_logos/nasa.png b/logos/news_logos/nasa.png new file mode 100644 index 0000000..2856478 Binary files /dev/null and b/logos/news_logos/nasa.png differ diff --git a/logos/news_logos/page-six.png b/logos/news_logos/page-six.png new file mode 100644 index 0000000..6fd731c Binary files /dev/null and b/logos/news_logos/page-six.png differ diff --git a/logos/news_logos/pcmag.com.png b/logos/news_logos/pcmag.com.png new file mode 100644 index 0000000..aaadefc Binary files /dev/null and b/logos/news_logos/pcmag.com.png differ diff --git a/logos/news_logos/phys.org.png b/logos/news_logos/phys.org.png new file mode 100644 index 0000000..7f81958 Binary files /dev/null and b/logos/news_logos/phys.org.png differ diff --git a/logos/news_logos/the-economist.png b/logos/news_logos/the-economist.png new file mode 100644 index 0000000..dc5fbd6 Binary files /dev/null and b/logos/news_logos/the-economist.png differ diff --git a/logos/news_logos/the-sun.png b/logos/news_logos/the-sun.png new file mode 100644 index 0000000..7dbf536 Binary files /dev/null and b/logos/news_logos/the-sun.png differ diff --git a/logos/news_logos/the-times.png b/logos/news_logos/the-times.png new file mode 100644 index 0000000..5a63c21 Binary files /dev/null and b/logos/news_logos/the-times.png differ diff --git a/logos/news_logos/tmz.png b/logos/news_logos/tmz.png new file mode 100644 index 0000000..f93b537 Binary files /dev/null and b/logos/news_logos/tmz.png differ diff --git a/logos/news_logos/wjxt-news4jax.png b/logos/news_logos/wjxt-news4jax.png new file mode 100644 index 0000000..956317b Binary files /dev/null and b/logos/news_logos/wjxt-news4jax.png differ diff --git a/stockTicker.py b/stockTicker.py index afa8080..c25f4ac 100644 --- a/stockTicker.py +++ b/stockTicker.py @@ -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,21 +958,24 @@ 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')) - - img = Image.new('RGB', (headline_img.size[0], 32)) - img.paste(headline_img, (2, 0)) - img.paste(source_img, (2,16)) - - img= self.stitchImage([logo,img]) + + logo = Image.open(os.path.join(logos_path, logo_name + '.png')) 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)) + 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)) + img.paste(source_img, (2,16)) + + img= self.stitchImage([logo,img]) image_list.append(img) @@ -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,27 +1027,31 @@ 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')) - - width, height = logo.size - - logo = logo.resize((int(width/2), int(height/2))) - - img = Image.new('RGB', (headline_img.size[0]+ source_img.size[0] + logo.size[0] +5, 32)) - img.paste(headline_img, (source_img.size[0]+ logo.size[0] -5, 3)) - img.paste(source_img, (2,3)) - - img= self.stitchImage([logo,img]) + + logo = Image.open(os.path.join(logos_path, logo_name + '.png')) except Exception as e: - - image_list.append(self.blank) - img = Image.new('RGB', (headline_img.size[0] + source_img.size[0] +5, 32)) + 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 - img.paste(headline_img, (source_img.size[0]+ 5, 3)) - img.paste(source_img, (2,3)) + logo = logo.resize((int(width/2), int(height/2))) + + img = Image.new('RGB', (headline_img.size[0]+ source_img.size[0] + logo.size[0] +5, 32)) + img.paste(headline_img, (source_img.size[0]+ logo.size[0] -5, 3)) + img.paste(source_img, (2,3)) + + img= self.stitchImage([logo,img]) + + 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))