diff --git a/csv/GIF_settings.json b/csv/GIF_settings.json new file mode 100644 index 0000000..e450716 --- /dev/null +++ b/csv/GIF_settings.json @@ -0,0 +1 @@ +{"speed": "medium", "animation": "continuous", "title": true, "pause": "", "images": ["asdf.gif", "image.gif", "hafgrt.gif", "asdf.gif", "image.gif", "hafgrt.gif", "asdf.gif", "image.gif", "hafgrt.gif", "asdf.gif", "image.gif", "hafgrt.gif"]} \ No newline at end of file diff --git a/csv/crypto.csv b/csv/crypto.csv index 90847b3..a28d8b5 100644 --- a/csv/crypto.csv +++ b/csv/crypto.csv @@ -1,4 +1,4 @@ symbol,name,base,current,24hr change -BTC,bitcoin,usd,47722,-0.7326547346313347 -ETH,ethereum,gbp,2598.0,1.1392072549969245 -DOGE,dogecoin,usd,0.240296,-2.648548292305624 +BTC,bitcoin,usd,47731,-1.6366277806338174 +ETH,ethereum,gbp,2452.22,-3.272526724697188 +DOGE,dogecoin,usd,0.238755,-1.8543425846579291 diff --git a/csv/crypto_settings.json b/csv/crypto_settings.json new file mode 100644 index 0000000..e9d312d --- /dev/null +++ b/csv/crypto_settings.json @@ -0,0 +1 @@ +{"feature": "Stocks", "speed": "medium", "animation": "continuous", "percent": false, "point": true, "no_logos": true, "chart": false, "title": true, "symbols": {"NEO,USD": -1, "BTC,USD": -1, "ETH,BTC": -1}} \ No newline at end of file diff --git a/csv/current_weather.json b/csv/current_weather.json index b133401..eef937d 100644 --- a/csv/current_weather.json +++ b/csv/current_weather.json @@ -1 +1 @@ -[{"main_weather": "Clouds", "description": "broken clouds", "temp": 28.17, "min_temp": 28.16, "max_temp": 30.46, "feels_like": 32.2, "humidity": 78, "clouds": 70, "wind_speed": 1.94, "wind_direction": 281, "visibility": 10000, "uv": 0, "rain_chance": 0.01}, {"main_weather": "Clouds", "description": "overcast clouds", "temp": 18.07, "min_temp": 14.53, "max_temp": 22.82, "feels_like": 18.02, "humidity": 80, "clouds": 100, "wind_speed": 3.19, "wind_direction": 209, "visibility": 10000, "uv": 0, "rain_chance": 0}] \ No newline at end of file +{"feature": "Current Weather", "speed": "medium", "animation": "continuous", "temp": "celsius", "wind_speed": "miles/sec", "colour": "white", "city_colour": "yellow", "title": true, "cities": {"London": {"main_weather": "Rain", "description": "light rain", "temp": 29.71, "min_temp": 27.67, "max_temp": 29.71, "feels_like": 36.71, "humidity": 83, "clouds": 38, "wind_speed": 3.9, "wind_direction": 126, "visibility": 10000, "uv": 0, "rain_chance": 0.51}, "Hong Kong": -1, "Boston": -1}} \ No newline at end of file diff --git a/csv/daily_weather.json b/csv/daily_weather.json index 01a164f..f9a666e 100644 --- a/csv/daily_weather.json +++ b/csv/daily_weather.json @@ -1 +1 @@ -[[{"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.16, "max_temp": 30.46}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.66, "max_temp": 29.22}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.51, "max_temp": 29.01}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.63, "max_temp": 29.33}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.52, "max_temp": 29.44}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.63, "max_temp": 29.15}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.02, "max_temp": 28.59}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.86, "max_temp": 27.62}], [{"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 14.53, "max_temp": 22.82}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 13.83, "max_temp": 21.66}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 14.97, "max_temp": 23.29}, {"main_weather": "Rain", "description": "light rain", "min_temp": 15.9, "max_temp": 20.96}, {"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 13.74, "max_temp": 19.77}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 10.61, "max_temp": 19.19}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.09, "max_temp": 19.06}, {"main_weather": "Rain", "description": "light rain", "min_temp": 11.51, "max_temp": 16.53}]] \ No newline at end of file +{"feature": "Current Weather", "speed": "medium", "animation": "continuous", "temp": "celsius", "wind_speed": "miles/sec", "colour": "white", "city_colour": "yellow", "title": true, "cities": {"London": [{"main_weather": "Rain", "description": "light rain", "min_temp": 27.67, "max_temp": 29.71}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 27.74, "max_temp": 30.05}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.06, "max_temp": 29.8}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.05, "max_temp": 29.34}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.91, "max_temp": 29.29}, {"main_weather": "Clouds", "description": "few clouds", "min_temp": 27.69, "max_temp": 29.03}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.56, "max_temp": 29.03}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.64, "max_temp": 29.29}], "Moscow": -1, "Tokyo": -1, "Beijing": -1}, "current_weather": true} \ No newline at end of file diff --git a/csv/forex_settings.json b/csv/forex_settings.json new file mode 100644 index 0000000..a4f9ea5 --- /dev/null +++ b/csv/forex_settings.json @@ -0,0 +1 @@ +{"feature": "Stocks", "speed": "medium", "animation": "continuous", "percent": false, "point": true, "no_logos": true, "chart": false, "title": true, "symbols": {"NZD,USD": -1, "CAD,USD": -1, "GBP,BTC": -1}} \ No newline at end of file diff --git a/csv/image_settings.json b/csv/image_settings.json new file mode 100644 index 0000000..ce806eb --- /dev/null +++ b/csv/image_settings.json @@ -0,0 +1 @@ +{"speed": "medium", "animation": "continuous", "title": true, "pause": "", "images": ["asdf.png", "image.png", "hafgrt.jpg", "asdf.png", "image.png", "hafgrt.jpg", "asdf.png", "image.png", "hafgrt.jpg", "asdf.png", "image.png", "hafgrt.jpg"]} \ No newline at end of file diff --git a/csv/last_updates.json b/csv/last_updates.json index e69de29..a3ebbae 100644 --- a/csv/last_updates.json +++ b/csv/last_updates.json @@ -0,0 +1 @@ +{"stocks": "19/09/2021 12:09:24", "crypto": "19/09/2021 12:09:26", "news": "19/09/2021 12:09:28", "weather": "19/09/2021 12:09:26", "forex": "19/09/2021 18:09:31", "sports": "19/09/2021 12:09:29"} \ No newline at end of file diff --git a/csv/live_games.json b/csv/live_games.json new file mode 100644 index 0000000..9e92824 --- /dev/null +++ b/csv/live_games.json @@ -0,0 +1 @@ +{"feature": "Sports (Upcoming Games)", "speed": "medium", "animation": "continuous", "title": true, "leagues": {"NFL": -1, "NBA": -1, "NHA": -1, "Premier League": -1}} \ No newline at end of file diff --git a/csv/news.csv b/csv/news.csv index 3a584ba..ae8caba 100644 --- a/csv/news.csv +++ b/csv/news.csv @@ -1,21 +1,21 @@ headline,source,date,time -Michael Gove faces calls to return £100k in donations from property developer - The Guardian,The Guardian,2021-09-16,18:36:00Z -Fake Covid vaccination card market booms - NBC News,NBC News,2021-09-16,18:25:41Z -Labour fears Dominic Raab will target rights act in new justice post - The Guardian,The Guardian,2021-09-16,18:17:00Z -New bodycam video shows emotional Gabby Petito after reported fight with fiancé in Utah - NBC News,NBC News,2021-09-16,18:16:13Z -Brexit triumph as Crown Stamp returns to pint glasses after bonfire of EU rules - Telegraph.co.uk,Telegraph.co.uk,2021-09-16,18:08:00Z -Plants evolved complexity in two bursts—with a 250-million-year hiatus - Phys.org,Phys.Org,2021-09-16,18:00:07Z -Apple's next big technology was absent at the iPhone 13 launch^ but Tim Cook says he's still a fan - CNBC,CNBC,2021-09-16,17:58:12Z -The Impact Of Cyber Attackers Exploiting New iPhone Software Vulnerability - Newstalk,Newstalk,2021-09-16,17:51:26Z -Government did not advise President Higgins against attending service^ it says - The Irish Times,The Irish Times,2021-09-16,17:48:47Z -More than half of Manitoba's new COVID-19 cases unvaccinated - CTV News Winnipeg,Ctvnews.ca,2021-09-16,17:42:21Z -Several Rockets Strike Kabul City District: Report - NDTV,NDTV News,2021-09-16,17:38:00Z -Freddie Combs dead: X Factor star dies aged 49 from kidney failure - The Mirror,Mirror Online,2021-09-16,17:36:42Z -Canada must 'learn from' the pandemic crisis in parts of the West^ Tam says - CBC.ca,CBC News,2021-09-16,17:36:08Z -Duque confirmó las fechas para los tres días sin IVA - El Tiempo,Google News,2021-09-16,17:33:15Z -Police Arrested The South Carolina Lawyer Who They Said Planned His Own Killing For An Insurance Payout - BuzzFeed News,BuzzFeed News,2021-09-16,17:32:00Z -Love triangle ends in bloodshed as taxi owner shoots lover and her alleged boyfriend - IOL,IOL,2021-09-16,17:31:20Z -BBNaija S6: Nini^ Saga receive strikes for flouting house rules - Punch Newspapers,The Punch,2021-09-16,17:24:54Z -Alberta reverses hands-off approach to Covid to tackle ‘crisis of unvaccinated’ - The Guardian,The Guardian,2021-09-16,17:24:00Z -House Democrats’ tax plan would increase marriage penalty for wealthy couples - CNBC,CNBC,2021-09-16,17:21:55Z -First Looks: Canon EOS R3 - Geek Culture,Geek Culture,2021-09-16,17:19:16Z +West Ham vs Manchester United LIVE: Premier League latest score^ goals and updates from fixture today - The Independent,Independent,2021-09-19,14:40:46Z +SpaceX returns four private citizens from orbit in splashdown off Florida - The Irish Times,The Irish Times,2021-09-19,14:33:38Z +Punjab Congress crisis Live Updates: Charanjit Singh Channi chosen as next Punjab CM^ to take oath on Monday - The Indian Express,The Indian Express,2021-09-19,14:32:46Z +Emmy Awards 2021: What to Watch For - The New York Times,New York Times,2021-09-19,14:22:31Z +Haitian migrants intend to remain at Texas border despite plan to expel them - The Guardian,The Guardian,2021-09-19,14:06:00Z +Biden pitching partnership after tough stretch with allies - Associated Press,Associated Press,2021-09-19,14:04:27Z +Texas doctor says he violated the state's strict new abortion law - CNN,CNN,2021-09-19,14:03:00Z +Seasonal variations are making flying on Mars harder for helicopter Ingenuity - Digital Trends,Digital Trends,2021-09-19,13:57:42Z +Obadiah Mailafia was hounded till death by DSS^ Buhari govt – Sowore - Daily Post Nigeria,Daily Post Nigeria,2021-09-19,13:56:13Z +Putin’s party set to retain parliament majority after polls - Punch Newspapers,The Punch,2021-09-19,13:54:38Z +Use of 10p statins in organ donation ‘could save thousands of lives’ - The Guardian,The Guardian,2021-09-19,13:54:00Z +Boxer Manny Pacquiao to run for Philippines president - The Guardian,The Guardian,2021-09-19,13:53:00Z +SpaceX returns with Atlantic splashdown - The Manila Times,The Manila Times,2021-09-19,13:51:23Z +Breaking: Buhari Orders Incorporation of NNPC^ Appoints Board - THISDAY Newspapers,THISDAY Newspapers,2021-09-19,13:36:21Z +Australia and France intensify war of words over cancelled submarine deal - Financial Times,Financial Times,2021-09-19,13:25:49Z +Only Fools And Horses actor John Challis dies aged 79 - The Guardian,The Guardian,2021-09-19,13:23:00Z +Woman dragged into churchyard and raped as cops investigate horror sex attack - Mirror.co.uk,Mirror Online,2021-09-19,13:21:11Z +Elon Musk welcomes SpaceX crew home with $50m donation to charity - The Guardian,The Guardian,2021-09-19,13:19:00Z +Tom Cruise gets sneak preview from SpaceX’s 1st private crew - Red Deer Advocate - Flipboard,Flipboard.com,2021-09-19,13:17:42Z +Where the main party leaders are on the final day of the federal election campaign - CBC.ca,CBC News,2021-09-19,13:17:36Z diff --git a/csv/news_settings.json b/csv/news_settings.json index e69de29..3ed4a99 100644 --- a/csv/news_settings.json +++ b/csv/news_settings.json @@ -0,0 +1 @@ +{"feature": "News", "speed": "medium", "animation": "continuous", "country": "USA", "category": "general", "title": true, "sources": {"Bloomberg": -1, "ABC News": -1, "Yahoo": -1}} \ No newline at end of file diff --git a/csv/past_games.json b/csv/past_games.json new file mode 100644 index 0000000..9e92824 --- /dev/null +++ b/csv/past_games.json @@ -0,0 +1 @@ +{"feature": "Sports (Upcoming Games)", "speed": "medium", "animation": "continuous", "title": true, "leagues": {"NFL": -1, "NBA": -1, "NHA": -1, "Premier League": -1}} \ No newline at end of file diff --git a/csv/sports/premier_league/future_games.json b/csv/sports/premier_league/future_games.json index 81f7220..dcdd72b 100644 --- a/csv/sports/premier_league/future_games.json +++ b/csv/sports/premier_league/future_games.json @@ -1 +1 @@ -[{"date": "2021-09-17", "time": "19:00:00", "round": "5", "home_team": "Newcastle", "home_score": null, "away_team": "Leeds", "away_score": null}, {"date": "2021-09-18", "time": "16:30:00", "round": "5", "home_team": "Aston Villa", "home_score": null, "away_team": "Everton", "away_score": null}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Burnley", "home_score": null, "away_team": "Arsenal", "away_score": null}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Liverpool", "home_score": null, "away_team": "Crystal Palace", "away_score": null}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Man City", "home_score": null, "away_team": "Southampton", "away_score": null}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Norwich", "home_score": null, "away_team": "Watford", "away_score": null}, {"date": "2021-09-18", "time": "11:30:00", "round": "5", "home_team": "Wolves", "home_score": null, "away_team": "Brentford", "away_score": null}, {"date": "2021-09-19", "time": "13:00:00", "round": "5", "home_team": "Brighton", "home_score": null, "away_team": "Leicester", "away_score": null}, {"date": "2021-09-19", "time": "15:30:00", "round": "5", "home_team": "Tottenham", "home_score": null, "away_team": "Chelsea", "away_score": null}, {"date": "2021-09-19", "time": "13:00:00", "round": "5", "home_team": "West Ham", "home_score": null, "away_team": "Man United", "away_score": null}, {"date": "2021-09-25", "time": "16:30:00", "round": "6", "home_team": "Brentford", "home_score": null, "away_team": "Liverpool", "away_score": null}, {"date": "2021-09-25", "time": "11:30:00", "round": "6", "home_team": "Chelsea", "home_score": null, "away_team": "Man City", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Everton", "home_score": null, "away_team": "Norwich", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Leeds", "home_score": null, "away_team": "West Ham", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Leicester", "home_score": null, "away_team": "Burnley", "away_score": null}] \ No newline at end of file +[{"date": "2021-09-19", "time": "13:00:00", "round": "5", "home_team": "Brighton", "home_score": "2", "away_team": "Leicester", "away_score": "1"}, {"date": "2021-09-19", "time": "15:30:00", "round": "5", "home_team": "Tottenham", "home_score": "0", "away_team": "Chelsea", "away_score": "0"}, {"date": "2021-09-19", "time": "13:00:00", "round": "5", "home_team": "West Ham", "home_score": "1", "away_team": "Man United", "away_score": "2"}, {"date": "2021-09-25", "time": "16:30:00", "round": "6", "home_team": "Brentford", "home_score": null, "away_team": "Liverpool", "away_score": null}, {"date": "2021-09-25", "time": "11:30:00", "round": "6", "home_team": "Chelsea", "home_score": null, "away_team": "Man City", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Everton", "home_score": null, "away_team": "Norwich", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Leeds", "home_score": null, "away_team": "West Ham", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Leicester", "home_score": null, "away_team": "Burnley", "away_score": null}, {"date": "2021-09-25", "time": "11:30:00", "round": "6", "home_team": "Man United", "home_score": null, "away_team": "Aston Villa", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Watford", "home_score": null, "away_team": "Newcastle", "away_score": null}, {"date": "2021-09-26", "time": "15:30:00", "round": "6", "home_team": "Arsenal", "home_score": null, "away_team": "Tottenham", "away_score": null}, {"date": "2021-09-26", "time": "13:00:00", "round": "6", "home_team": "Southampton", "home_score": null, "away_team": "Wolves", "away_score": null}, {"date": "2021-09-27", "time": "19:00:00", "round": "6", "home_team": "Crystal Palace", "home_score": null, "away_team": "Brighton", "away_score": null}, {"date": "2021-10-02", "time": "16:30:00", "round": "7", "home_team": "Brighton", "home_score": null, "away_team": "Arsenal", "away_score": null}, {"date": "2021-10-02", "time": "14:00:00", "round": "7", "home_team": "Burnley", "home_score": null, "away_team": "Norwich", "away_score": null}] \ No newline at end of file diff --git a/csv/sports/premier_league/live_games.json b/csv/sports/premier_league/live_games.json index 0637a08..b7b3a19 100644 --- a/csv/sports/premier_league/live_games.json +++ b/csv/sports/premier_league/live_games.json @@ -1 +1 @@ -[] \ No newline at end of file +[{"date": "2021-09-19", "time": "15:30:00", "progess": "37", "status": "1H", "home_team": "Tottenham", "home_score": "0", "away_team": "Chelsea", "away_score": "0"}] \ No newline at end of file diff --git a/csv/sports/premier_league/past_games.json b/csv/sports/premier_league/past_games.json index 4652c4d..9b9684d 100644 --- a/csv/sports/premier_league/past_games.json +++ b/csv/sports/premier_league/past_games.json @@ -1 +1 @@ -[{"date": "2021-09-13", "time": "19:00:00", "round": "4", "home_team": "Everton", "home_score": "3", "away_team": "Burnley", "away_score": "1"}, {"date": "2021-09-12", "time": "15:30:00", "round": "4", "home_team": "Leeds", "home_score": "0", "away_team": "Liverpool", "away_score": "3"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Watford", "home_score": "0", "away_team": "Wolves", "away_score": "2"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Southampton", "home_score": "0", "away_team": "West Ham", "away_score": "0"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Man United", "home_score": "4", "away_team": "Newcastle", "away_score": "1"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Leicester", "home_score": "0", "away_team": "Man City", "away_score": "1"}, {"date": "2021-09-11", "time": "11:30:00", "round": "4", "home_team": "Crystal Palace", "home_score": "3", "away_team": "Tottenham", "away_score": "0"}, {"date": "2021-09-11", "time": "16:30:00", "round": "4", "home_team": "Chelsea", "home_score": "3", "away_team": "Aston Villa", "away_score": "0"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Brentford", "home_score": "0", "away_team": "Brighton", "away_score": "1"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Arsenal", "home_score": "1", "away_team": "Norwich", "away_score": "0"}, {"date": "2021-08-29", "time": "15:30:00", "round": "3", "home_team": "Wolves", "home_score": "0", "away_team": "Man United", "away_score": "1"}, {"date": "2021-08-29", "time": "13:00:00", "round": "3", "home_team": "Tottenham", "home_score": "1", "away_team": "Watford", "away_score": "0"}, {"date": "2021-08-29", "time": "13:00:00", "round": "3", "home_team": "Burnley", "home_score": "1", "away_team": "Leeds", "away_score": "1"}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "West Ham", "home_score": "2", "away_team": "Crystal Palace", "away_score": "2"}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "Norwich", "home_score": "1", "away_team": "Leicester", "away_score": "2"}] \ No newline at end of file +[{"date": "2021-09-18", "time": "11:30:00", "round": "5", "home_team": "Wolves", "home_score": "0", "away_team": "Brentford", "away_score": "2"}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Norwich", "home_score": "1", "away_team": "Watford", "away_score": "3"}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Man City", "home_score": "0", "away_team": "Southampton", "away_score": "0"}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Liverpool", "home_score": "3", "away_team": "Crystal Palace", "away_score": "0"}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Burnley", "home_score": "0", "away_team": "Arsenal", "away_score": "1"}, {"date": "2021-09-18", "time": "16:30:00", "round": "5", "home_team": "Aston Villa", "home_score": "3", "away_team": "Everton", "away_score": "0"}, {"date": "2021-09-17", "time": "19:00:00", "round": "5", "home_team": "Newcastle", "home_score": "1", "away_team": "Leeds", "away_score": "1"}, {"date": "2021-09-13", "time": "19:00:00", "round": "4", "home_team": "Everton", "home_score": "3", "away_team": "Burnley", "away_score": "1"}, {"date": "2021-09-12", "time": "15:30:00", "round": "4", "home_team": "Leeds", "home_score": "0", "away_team": "Liverpool", "away_score": "3"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Watford", "home_score": "0", "away_team": "Wolves", "away_score": "2"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Southampton", "home_score": "0", "away_team": "West Ham", "away_score": "0"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Man United", "home_score": "4", "away_team": "Newcastle", "away_score": "1"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Leicester", "home_score": "0", "away_team": "Man City", "away_score": "1"}, {"date": "2021-09-11", "time": "11:30:00", "round": "4", "home_team": "Crystal Palace", "home_score": "3", "away_team": "Tottenham", "away_score": "0"}, {"date": "2021-09-11", "time": "16:30:00", "round": "4", "home_team": "Chelsea", "home_score": "3", "away_team": "Aston Villa", "away_score": "0"}] \ No newline at end of file diff --git a/csv/stocks_settings.json b/csv/stocks_settings.json new file mode 100644 index 0000000..374bb67 --- /dev/null +++ b/csv/stocks_settings.json @@ -0,0 +1 @@ +{"feature": "Stocks", "speed": "medium", "animation": "continuous", "percent": false, "point": true, "no_logos": true, "chart": false, "title": true, "symbols": {"APL": 0.0, "GOOG": 0.0, "FB": -1, "ROKU": -1, "TGT": -1, "TSLA": -1, "SNAP": -1, "T": -1, "DIS": -1, "NFLX": -1, "MSFT": -1, "HOG": -1, "M": -1, "A": -1}} diff --git a/csv/team_stats.json b/csv/team_stats.json new file mode 100644 index 0000000..9e92824 --- /dev/null +++ b/csv/team_stats.json @@ -0,0 +1 @@ +{"feature": "Sports (Upcoming Games)", "speed": "medium", "animation": "continuous", "title": true, "leagues": {"NFL": -1, "NBA": -1, "NHA": -1, "Premier League": -1}} \ No newline at end of file diff --git a/csv/tickers.csv b/csv/tickers.csv index aa2dc22..100c3a8 100644 --- a/csv/tickers.csv +++ b/csv/tickers.csv @@ -1,4 +1,4 @@ name,current,opening -MSFT,304.21,303.88 -NFLX,586.72,583.95 -GOOG,2895.85,2902.95 +MSFT,299.87,304.36 +NFLX,589.43,587.765 +GOOG,2828.02,2880.115 diff --git a/csv/upcoming_games.json b/csv/upcoming_games.json new file mode 100644 index 0000000..9e92824 --- /dev/null +++ b/csv/upcoming_games.json @@ -0,0 +1 @@ +{"feature": "Sports (Upcoming Games)", "speed": "medium", "animation": "continuous", "title": true, "leagues": {"NFL": -1, "NBA": -1, "NHA": -1, "Premier League": -1}} \ No newline at end of file diff --git a/display_images/Crypto.ppm b/display_images/Crypto.ppm index 87a03b2..64fb976 100644 Binary files a/display_images/Crypto.ppm and b/display_images/Crypto.ppm differ diff --git a/display_images/Stocks.ppm b/display_images/Stocks.ppm index 7e294be..529cf42 100644 Binary files a/display_images/Stocks.ppm and b/display_images/Stocks.ppm differ diff --git a/server.py b/server.py index 7d2ebdf..701fb1b 100644 --- a/server.py +++ b/server.py @@ -19,7 +19,8 @@ from multiprocessing import Process from subprocess import Popen, PIPE import numpy as np #stock_ticker = StockTicker() -api_caller = pexpect.spawn("sudo -E python3 api_caller.py") +print('API CALLER NOT STARTED') +#api_caller = pexpect.spawn("sudo -E python3 api_caller.py") command = 300 @@ -321,12 +322,141 @@ def display_format(): @app.route("/feature_settings", methods = ['PUT', 'POST', 'GET']) def feature_settings(): - data = str(request.data) - print('feature settings') - print(data) + data = str(request.data.decode('utf-8')) + + input_settings = json.loads(data) + print(input_settings) + + feature = input_settings['feature'] + if feature in ['Stocks', 'Crypto', 'Forex']: + save_trade_settings(input_settings) + elif feature in ['Current Weather', 'Daily Forecast']: + save_weather_settings(input_settings) + elif feature == 'News': + save_news_settings(input_settings) + elif 'Sports' in feature: + save_sports_settings(input_settings) + + elif feature in ['Custom GIFs', 'Custom Images']: + save_image_settings(input_settings) + return index() + + +def combine_dict(current_settings, input_symbols, current_key): + # removes keys not in input from current_settings[current_key] and adds keys not in current from input + + current_symbols = list(current_settings[current_key].keys()) + + # add any stock that arent current in the settings + for IS in input_symbols: + if IS not in current_symbols: + current_settings[current_key][IS] = -1 + + # remove stocks not in settings + for CS in current_symbols: + if CS not in input_symbols: + del current_settings[current_key][CS] + + return current_settings + +def save_trade_settings(input_settings): + + + filename = input_settings['feature'].lower() + '_settings.json' + + current_settings = json.load(open('csv/' + filename, 'r')) + + current_settings['speed'] = input_settings['speed'].lower() + current_settings['animation'] = input_settings['animation'].lower() + current_settings['percent'] = input_settings['percent'] + current_settings['point'] = input_settings['point'] + current_settings['no_logos'] = input_settings['no_logos'] + current_settings['chart'] = input_settings['chart'] + current_settings['title'] = input_settings['title'] + current_settings = combine_dict(current_settings, input_settings['symbols'], 'symbols') + + json.dump(current_settings, open('csv/' + filename, 'w+')) + +def save_weather_settings(input_settings): + + + filename = 'current_weather.json' if input_settings['feature'] == 'Current Weather' else 'daily_weather.json' + + current_settings = json.load(open('csv/' + filename, 'r')) + + current_settings['speed'] = input_settings['speed'].lower() + current_settings['animation'] = input_settings['animation'].lower() + current_settings['temp'] = input_settings['temp'].lower() + current_settings['wind_speed'] = input_settings['wind_speed'].lower() + current_settings['colour'] = input_settings['colour'].lower() + current_settings['city_colour'] = input_settings['city_colour'].lower() + current_settings['title'] = input_settings['title'] + + if input_settings['feature'] == 'Daily Forecast': + current_settings['current_weather'] = input_settings['current_weather'] + + + current_settings = combine_dict(current_settings, input_settings['cities'], 'cities') + + json.dump(current_settings, open('csv/' + filename, 'w+')) + +def save_news_settings(input_settings): + filename = 'news_settings.json' + + current_settings = json.load(open('csv/' + filename, 'r')) + + current_settings['speed'] = input_settings['speed'].lower() + current_settings['animation'] = input_settings['animation'].lower() + current_settings['title'] = input_settings['title'] + current_settings['category'] = input_settings['category'].lower() + current_settings['country'] = input_settings['country'] + + + current_settings = combine_dict(current_settings, input_settings['sources'], 'sources') + + json.dump(current_settings, open('csv/' + filename, 'w+')) + +def save_sports_settings(input_settings): + + feature = input_settings['feature'] + + if feature == 'Sports (Upcoming Games)': + filename = 'upcoming_games.json' + elif feature == 'Sports (Past Games)': + filename = 'past_games.json' + elif feature == 'Sports (Live Games)': + filename = 'live_games.json' + elif feature == 'Sports (Team Stats)': + filename = 'team_stats.json' + + current_settings = json.load(open('csv/' + filename, 'r')) + + current_settings['speed'] = input_settings['speed'].lower() + current_settings['animation'] = input_settings['animation'].lower() + current_settings['title'] = input_settings['title'] + + + current_settings = combine_dict(current_settings, input_settings['leagues'], 'leagues') + + json.dump(current_settings, open('csv/' + filename, 'w+')) + +# for images and GIFs +def save_image_settings(input_settings): + filename = 'image_settings.json' if input_settings['feature'] == 'Custom Images' else 'GIF_settings.json' + + current_settings = input_settings + + current_settings['speed'] = input_settings['speed'].lower() + current_settings['animation'] = input_settings['animation'].lower() + current_settings['title'] = input_settings['title'] + + del current_settings['feature'] + json.dump(current_settings, open('csv/' + filename, 'w+')) + + @app.route("/stop") def stop(): print('stop') diff --git a/static/app.js b/static/app.js index e8152b9..66de7e9 100644 --- a/static/app.js +++ b/static/app.js @@ -715,7 +715,7 @@ function getWeatherSettings(page) { let city_colour = getSelected(page.querySelectorAll(".city-colour-select")[0]); let title = page.querySelectorAll(".title-select")[0].checked; - settings = {'temp':temp, 'speed': speed, 'colour':colour, 'city_colour':city_colour, 'title': title} + settings = {'temp':temp, 'wind_speed': speed, 'colour':colour, 'city_colour':city_colour, 'title': title} //only for daily weather