diff --git a/csv/crypto.csv b/csv/crypto.csv index e60505b..470d6b9 100644 --- a/csv/crypto.csv +++ b/csv/crypto.csv @@ -1,4 +1,4 @@ symbol,name,base,current,24hr change -BTC,bitcoin,usd,31554,-4.613357050355953 -ETH,ethereum,gbp,1389.61,-4.851321076226648 -DOGE,dogecoin,usd,0.184145,-8.017861229371038 +BTC,bitcoin,usd,31398,-3.6158218938894335 +ETH,ethereum,gbp,1353.54,-5.118073955848297 +DOGE,dogecoin,usd,0.182451,-6.2565374215444765 diff --git a/csv/current_weather.json b/csv/current_weather.json index e1582e5..77982fd 100644 --- a/csv/current_weather.json +++ b/csv/current_weather.json @@ -1 +1 @@ -[{"main_weather": "Clouds", "description": "scattered clouds", "temp": 29.76, "min_temp": 28.5, "max_temp": 30.61, "feels_like": 36.76, "humidity": 81, "clouds": 31, "wind_speed": 0.45, "wind_direction": 275, "visibility": 10000, "uv": 0, "rain_chance": 0}, {"main_weather": "Clouds", "description": "overcast clouds", "temp": 19.71, "min_temp": 14.35, "max_temp": 21.63, "feels_like": 19.62, "humidity": 72, "clouds": 90, "wind_speed": 5.14, "wind_direction": 360, "visibility": 10000, "uv": 0.36, "rain_chance": 0}] \ No newline at end of file +[{"main_weather": "Clouds", "description": "broken clouds", "temp": 29.67, "min_temp": 28.44, "max_temp": 30.37, "feels_like": 36.67, "humidity": 82, "clouds": 74, "wind_speed": 0.45, "wind_direction": 9, "visibility": 10000, "uv": 0.42, "rain_chance": 0.32}, {"main_weather": "Clear", "description": "clear sky", "temp": 20.59, "min_temp": 12.13, "max_temp": 25.26, "feels_like": 20.3, "humidity": 61, "clouds": 0, "wind_speed": 2.57, "wind_direction": 0, "visibility": 10000, "uv": 5.94, "rain_chance": 0}] \ No newline at end of file diff --git a/csv/daily_weather.json b/csv/daily_weather.json index 28cf74b..bd247e6 100644 --- a/csv/daily_weather.json +++ b/csv/daily_weather.json @@ -1 +1 @@ -[[{"main_weather": "Rain", "description": "light rain", "min_temp": 28.5, "max_temp": 30.61}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.04, "max_temp": 29.77}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.64, "max_temp": 29.24}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.7, "max_temp": 28.62}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.62, "max_temp": 29.4}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.97, "max_temp": 30.11}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.69, "max_temp": 31.64}, {"main_weather": "Rain", "description": "light rain", "min_temp": 30.01, "max_temp": 32.67}], [{"main_weather": "Clouds", "description": "broken clouds", "min_temp": 14.35, "max_temp": 21.63}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 12.58, "max_temp": 26.02}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 16.35, "max_temp": 27.43}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 17.91, "max_temp": 27.84}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 17.11, "max_temp": 21.74}, {"main_weather": "Rain", "description": "light rain", "min_temp": 15.75, "max_temp": 21.98}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 12.8, "max_temp": 21.13}, {"main_weather": "Rain", "description": "light rain", "min_temp": 14.45, "max_temp": 15.92}]] \ No newline at end of file +[[{"main_weather": "Rain", "description": "light 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.26}, {"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 diff --git a/csv/last_updates.json b/csv/last_updates.json index 96ff93b..e69de29 100644 --- a/csv/last_updates.json +++ b/csv/last_updates.json @@ -1 +0,0 @@ -{"stocks": "15/07/2021 14:46:31", "crypto": "15/07/2021 14:46:34", "news": "15/07/2021 14:09:38", "weather": "15/07/2021 14:09:35", "forex": "14/07/2021 18:58:56", "sports": "15/07/2021 14:09:39"} \ No newline at end of file diff --git a/csv/news.csv b/csv/news.csv index edc4efc..aaf12de 100644 --- a/csv/news.csv +++ b/csv/news.csv @@ -1,21 +1,21 @@ headline,source,date,time -Asus ROG Zephyrus S17 (2021) Review - PCMag,PCMag.com,2021-07-15,16:21:43Z -Covid-19: 994 cases reported in State with HSE on higher alert due to rising numbers of infections - The Irish Times,The Irish Times,2021-07-15,16:18:45Z -'We have never seen such a disaster': Dozens dead after heavy flooding in Europe - Stuff.co.nz,Stuff.co.nz,2021-07-15,16:18:00Z -China Criticized the Afghan War. Now It Worries About the Withdrawal. - The New York Times,New York Times,2021-07-15,16:16:00Z -Bukayo Saka: England winger won't allow negativity to break him after Euro 2020 final disappointment - Sky Sports,Sky Sports,2021-07-15,16:14:04Z -Isolation facilities ready for Delta variant – DoH - The Manila Times,The Manila Times,2021-07-15,16:12:18Z -Plant-based diet rich in soy reduces troubling menopause symptoms by 84% - News-Medical.Net,News-Medical.Net,2021-07-15,16:07:00Z -UK plan for Troubles amnesty breaches international obligations – Irish minister - The Guardian,The Guardian,2021-07-15,16:00:00Z -Calamba local exec survives ambush try - GMA News Online,GMA News,2021-07-15,15:59:04Z -Darts icon and former world champion Andy Fordham dies^ aged 59 - Daily Mail,Daily Mail,2021-07-15,15:57:53Z -Britney Spears' former attorney says change in conservatorship case is imminent: 'We're going to see lawsuits' - Fox News,Fox News,2021-07-15,15:43:58Z -Young YOU | What's happening with the Hubble telescope | You - News24,News24,2021-07-15,15:42:51Z -Engineers find imaging technique could become treatment for deep vein thrombosis - EurekAlert,EurekAlert,2021-07-15,15:41:04Z -Top 10 Covid updates: Third wave likely by end of August^ but numbers may not be high^ says ICMR - Scroll.in,Scroll.in,2021-07-15,15:41:00Z -Brookfield revises hostile bid for Inter Pipeline after losing court challenge^ raises cash price - The Globe and Mail,The Globe And Mail,2021-07-15,15:36:47Z -Britain records 63 Covid deaths in highest daily toll since MARCH - Daily Mail,Daily Mail,2021-07-15,15:32:17Z -Hailey Bieber Shut Down The “Beyond False” Accusations That Justin Bieber “Aggressively Yelled” At Her In A Viral TikTok - BuzzFeed News,BuzzFeed News,2021-07-15,15:31:00Z -‘Leaked’ Kremlin documents suggest Vladimir Putin personally authorised operation to help Donald Trump win in 2016 - NEWS.com.au,News.com.au,2021-07-15,15:27:48Z -Dutch crime reporter Peter de Vries dies after being shot in the head - Telegraph.co.uk,Telegraph.co.uk,2021-07-15,15:25:00Z -GTA Online update reveals "gigantic" shared social space to show off your cars - Eurogamer.net,Eurogamer.net,2021-07-15,15:25:00Z +Germany-Belgium floods – live: 90 dead and 1^300 missing in ‘catastrophe’^ with more rain forecast in Europe - The Independent,Independent,2021-07-16,08:35:46Z +IATF approves PH hosting of Asian women's volleyball tilt in August - CNN Philippines,CNN Philippines,2021-07-16,08:35:19Z +COVID-19 kills 162 more in PH^ says DOH - INQUIRER.net,Inquirer.net,2021-07-16,08:34:00Z +Cele headed back to Phoenix as violence continues in parts of KZN - Eyewitness News,EWN,2021-07-16,08:29:45Z +Years away from PBA^ Gab Banal gives Alaska steady presence - Rappler,Rappler,2021-07-16,08:21:00Z +EU new car sales rise^ as Bank of Japan cuts economic growth forecast – business live - The Guardian,The Guardian,2021-07-16,08:19:26Z +Ten stories from China: Mars^ beautiful music and an emotional reunion - CGTN,Cgtn.com,2021-07-16,08:11:21Z +As Delta drives COVID surge^ vaccines^ strategies under scrutiny - Al Jazeera English,Al Jazeera English,2021-07-16,08:10:15Z +UK hot weather: 'Bermuda blowtorch' 90F scorcher to singe Britain for Freedom Day - maps - Daily Express,Express,2021-07-16,08:09:30Z +Children's viruses that disappeared during pandemic lockdowns are back^ doctors say - CBC.ca,CBC News,2021-07-16,08:00:00Z +Evacuations as flooding hits Buller district^ locals urged to get grab bags ready - Stuff.co.nz,Stuff.co.nz,2021-07-16,07:54:00Z +PDP-Laban House members back Cusi leadership - Rappler,Rappler,2021-07-16,07:53:00Z +Majority of clinical cases of COVID-19 breakthrough infection due to Delta variant: ICMR study - The New Indian Express,The New Indian Express,2021-07-16,07:46:00Z +Aussie scientists see life-saving potential in spider venom to halt effects of heart attacks - GMA News Online,GMA News,2021-07-16,07:44:26Z +Lions coach Gatland pokes fun at Rassie's 'water boy' role - News24,News24,2021-07-16,07:42:05Z +93 people dead and hundreds missing in huge floods in Germany and Belgium - TheJournal.ie,TheJournal.ie,2021-07-16,07:41:00Z +Driving instructor allegedly falsified motorbike licences for gang members - Stuff.co.nz,Stuff.co.nz,2021-07-16,07:40:00Z +Unconventional superconductor acts the part of a promising quantum computing platform - Phys.org,Phys.Org,2021-07-16,07:30:13Z +Kyla opens up about suffering third miscarriage - Rappler,Rappler,2021-07-16,07:29:00Z +Indian photojournalist Danish Siddiqui killed in Afghanistan’s Kandahar province - Hindustan Times,Hindustan Times,2021-07-16,07:23:12Z diff --git a/csv/tickers.csv b/csv/tickers.csv index cfe82d9..ac8e790 100644 --- a/csv/tickers.csv +++ b/csv/tickers.csv @@ -1,4 +1,4 @@ name,current,opening -MSFT,280.31,282.16 -NFLX,540.37,554.86 -GOOG,2620.4,2647.615 +MSFT,281.06,282.16 +NFLX,542.98,554.86 +GOOG,2625.98,2647.615 diff --git a/display_images/crypto.ppm b/display_images/crypto.ppm index f5e8d64..49431e9 100755 Binary files a/display_images/crypto.ppm and b/display_images/crypto.ppm differ diff --git a/display_images/daily_weather.ppm b/display_images/daily_weather.ppm index 6e2fd8d..9b9fcb5 100755 Binary files a/display_images/daily_weather.ppm and b/display_images/daily_weather.ppm differ diff --git a/display_images/stocks.ppm b/display_images/stocks.ppm index e3fb1de..887512f 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 2e66be5..169c7c8 100755 Binary files a/display_images/today_weather.ppm and b/display_images/today_weather.ppm differ diff --git a/stockTicker.py b/stockTicker.py index 127da5c..e198729 100644 --- a/stockTicker.py +++ b/stockTicker.py @@ -1304,12 +1304,12 @@ class StockTicker(): uv_img = Image.open(weather_dir + '/uv.png') img.paste(uv_img, ( 82, 22)) - utext_img = self.textImage(str(current_weather['uv']) , small_font) + utext_img = self.textImage(str(round(current_weather['uv'], 1)) , small_font) img.paste(utext_img, (95, 23)) weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] months =['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] - month = months[int(datetime.now().strftime('%m'))] + month = months[int(datetime.now().strftime('%m'))-1] date = str(int(datetime.now().strftime('%d'))) weekday = weekdays[datetime.today().weekday()] @@ -1363,7 +1363,7 @@ class StockTicker(): current_weathers = json.load(open('csv/current_weather.json', 'r')) weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] months =['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] - month = months[int(datetime.now().strftime('%m'))] + month = months[int(datetime.now().strftime('%m'))-1] date = str(int(datetime.now().strftime('%d'))) weekday = weekdays[datetime.today().weekday()] @@ -1433,7 +1433,7 @@ class StockTicker(): hum_img = Image.open(weather_dir + '/humidity.png') htext_img = self.textImage(str(current_weather['humidity']) + '%', font) uv_img = Image.open(weather_dir + '/uv.png') - utext_img = self.textImage(str(current_weather['uv']) , font) + utext_img = self.textImage(str(round(current_weather['uv'], 1)), font) rain_img = Image.open(weather_dir + '/rain-chance.png') @@ -1652,7 +1652,7 @@ class StockTicker(): weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] months =['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] - month = months[int(datetime.now().strftime('%m'))] + month = months[int(datetime.now().strftime('%m'))-1] date = str(int(datetime.now().strftime('%d'))) weekday = weekdays[datetime.today().weekday()] date_img = self.textImage((month + ' ' + date + ',' + weekday).upper(), extra_small_font) @@ -1661,7 +1661,7 @@ class StockTicker(): 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(current_weather['uv']) , extra_small_font) + 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') @@ -1893,16 +1893,16 @@ class StockTicker(): def process_msg(self, msg): if msg == 'S': # stocks - self.scrollFunctionsAnimated(['stocks', 'stocks'], animation = 'continuous') + self.scrollFunctionsAnimated(['stocks', 'stocks'], animation = 'traditional') elif msg == 'C': # crypto - self.scrollFunctionsAnimated(['crypto', 'crypto'], animation = 'continuous') + self.scrollFunctionsAnimated(['crypto', 'crypto'], animation = 'traditional') elif msg == 'F': # forex - self.scrollFunctionsAnimated(['forex', 'forex'], animation = 'continuous') + self.scrollFunctionsAnimated(['forex', 'forex'], animation = 'traditional') elif msg == 'N': #news - self.scrollFunctionsAnimated(['news', 'news'], animation = 'continuous') + self.scrollFunctionsAnimated(['news', 'news'], animation = 'traditional') # speed settings elif msg == 's':