data from frontend saved to json files

This commit is contained in:
Neythen 2021-09-19 19:19:09 +01:00
parent 7f70594aaf
commit ec619563b1
23 changed files with 177 additions and 36 deletions

1
csv/GIF_settings.json Normal file
View File

@ -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"]}

View File

@ -1,4 +1,4 @@
symbol,name,base,current,24hr change symbol,name,base,current,24hr change
BTC,bitcoin,usd,47722,-0.7326547346313347 BTC,bitcoin,usd,47731,-1.6366277806338174
ETH,ethereum,gbp,2598.0,1.1392072549969245 ETH,ethereum,gbp,2452.22,-3.272526724697188
DOGE,dogecoin,usd,0.240296,-2.648548292305624 DOGE,dogecoin,usd,0.238755,-1.8543425846579291

1 symbol name base current 24hr change
2 BTC bitcoin usd 47722 47731 -0.7326547346313347 -1.6366277806338174
3 ETH ethereum gbp 2598.0 2452.22 1.1392072549969245 -3.272526724697188
4 DOGE dogecoin usd 0.240296 0.238755 -2.648548292305624 -1.8543425846579291

1
csv/crypto_settings.json Normal file
View File

@ -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}}

View File

@ -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}] {"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}}

View File

@ -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}]] {"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}

1
csv/forex_settings.json Normal file
View File

@ -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}}

1
csv/image_settings.json Normal file
View File

@ -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"]}

View File

@ -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"}

1
csv/live_games.json Normal file
View File

@ -0,0 +1 @@
{"feature": "Sports (Upcoming Games)", "speed": "medium", "animation": "continuous", "title": true, "leagues": {"NFL": -1, "NBA": -1, "NHA": -1, "Premier League": -1}}

View File

@ -1,21 +1,21 @@
headline,source,date,time 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 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
Fake Covid vaccination card market booms - NBC News,NBC News,2021-09-16,18:25:41Z SpaceX returns four private citizens from orbit in splashdown off Florida - The Irish Times,The Irish Times,2021-09-19,14:33:38Z
Labour fears Dominic Raab will target rights act in new justice post - The Guardian,The Guardian,2021-09-16,18:17:00Z 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
New bodycam video shows emotional Gabby Petito after reported fight with fiancé in Utah - NBC News,NBC News,2021-09-16,18:16:13Z Emmy Awards 2021: What to Watch For - The New York Times,New York Times,2021-09-19,14:22:31Z
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 Haitian migrants intend to remain at Texas border despite plan to expel them - The Guardian,The Guardian,2021-09-19,14:06:00Z
Plants evolved complexity in two bursts—with a 250-million-year hiatus - Phys.org,Phys.Org,2021-09-16,18:00:07Z Biden pitching partnership after tough stretch with allies - Associated Press,Associated Press,2021-09-19,14:04:27Z
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 Texas doctor says he violated the state's strict new abortion law - CNN,CNN,2021-09-19,14:03:00Z
The Impact Of Cyber Attackers Exploiting New iPhone Software Vulnerability - Newstalk,Newstalk,2021-09-16,17:51:26Z Seasonal variations are making flying on Mars harder for helicopter Ingenuity - Digital Trends,Digital Trends,2021-09-19,13:57:42Z
Government did not advise President Higgins against attending service^ it says - The Irish Times,The Irish Times,2021-09-16,17:48:47Z Obadiah Mailafia was hounded till death by DSS^ Buhari govt Sowore - Daily Post Nigeria,Daily Post Nigeria,2021-09-19,13:56:13Z
More than half of Manitoba's new COVID-19 cases unvaccinated - CTV News Winnipeg,Ctvnews.ca,2021-09-16,17:42:21Z Putins party set to retain parliament majority after polls - Punch Newspapers,The Punch,2021-09-19,13:54:38Z
Several Rockets Strike Kabul City District: Report - NDTV,NDTV News,2021-09-16,17:38:00Z Use of 10p statins in organ donation could save thousands of lives - The Guardian,The Guardian,2021-09-19,13:54:00Z
Freddie Combs dead: X Factor star dies aged 49 from kidney failure - The Mirror,Mirror Online,2021-09-16,17:36:42Z Boxer Manny Pacquiao to run for Philippines president - The Guardian,The Guardian,2021-09-19,13:53:00Z
Canada must 'learn from' the pandemic crisis in parts of the West^ Tam says - CBC.ca,CBC News,2021-09-16,17:36:08Z SpaceX returns with Atlantic splashdown - The Manila Times,The Manila Times,2021-09-19,13:51:23Z
Duque confirmó las fechas para los tres días sin IVA - El Tiempo,Google News,2021-09-16,17:33:15Z Breaking: Buhari Orders Incorporation of NNPC^ Appoints Board - THISDAY Newspapers,THISDAY Newspapers,2021-09-19,13:36:21Z
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 Australia and France intensify war of words over cancelled submarine deal - Financial Times,Financial Times,2021-09-19,13:25:49Z
Love triangle ends in bloodshed as taxi owner shoots lover and her alleged boyfriend - IOL,IOL,2021-09-16,17:31:20Z Only Fools And Horses actor John Challis dies aged 79 - The Guardian,The Guardian,2021-09-19,13:23:00Z
BBNaija S6: Nini^ Saga receive strikes for flouting house rules - Punch Newspapers,The Punch,2021-09-16,17:24:54Z Woman dragged into churchyard and raped as cops investigate horror sex attack - Mirror.co.uk,Mirror Online,2021-09-19,13:21:11Z
Alberta reverses hands-off approach to Covid to tackle crisis of unvaccinated - The Guardian,The Guardian,2021-09-16,17:24:00Z Elon Musk welcomes SpaceX crew home with $50m donation to charity - The Guardian,The Guardian,2021-09-19,13:19:00Z
House Democrats tax plan would increase marriage penalty for wealthy couples - CNBC,CNBC,2021-09-16,17:21:55Z Tom Cruise gets sneak preview from SpaceXs 1st private crew - Red Deer Advocate - Flipboard,Flipboard.com,2021-09-19,13:17:42Z
First Looks: Canon EOS R3 - Geek Culture,Geek Culture,2021-09-16,17:19:16Z 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

1 headline source date time
2 Michael Gove faces calls to return £100k in donations from property developer - The Guardian West Ham vs Manchester United LIVE: Premier League latest score^ goals and updates from fixture today - The Independent The Guardian Independent 2021-09-16 2021-09-19 18:36:00Z 14:40:46Z
3 Fake Covid vaccination card market booms - NBC News SpaceX returns four private citizens from orbit in splashdown off Florida - The Irish Times NBC News The Irish Times 2021-09-16 2021-09-19 18:25:41Z 14:33:38Z
4 Labour fears Dominic Raab will target rights act in new justice post - The Guardian Punjab Congress crisis Live Updates: Charanjit Singh Channi chosen as next Punjab CM^ to take oath on Monday - The Indian Express The Guardian The Indian Express 2021-09-16 2021-09-19 18:17:00Z 14:32:46Z
5 New bodycam video shows emotional Gabby Petito after reported fight with fiancé in Utah - NBC News Emmy Awards 2021: What to Watch For - The New York Times NBC News New York Times 2021-09-16 2021-09-19 18:16:13Z 14:22:31Z
6 Brexit triumph as Crown Stamp returns to pint glasses after bonfire of EU rules - Telegraph.co.uk Haitian migrants intend to remain at Texas border despite plan to expel them - The Guardian Telegraph.co.uk The Guardian 2021-09-16 2021-09-19 18:08:00Z 14:06:00Z
7 Plants evolved complexity in two bursts—with a 250-million-year hiatus - Phys.org Biden pitching partnership after tough stretch with allies - Associated Press Phys.Org Associated Press 2021-09-16 2021-09-19 18:00:07Z 14:04:27Z
8 Apple's next big technology was absent at the iPhone 13 launch^ but Tim Cook says he's still a fan - CNBC Texas doctor says he violated the state's strict new abortion law - CNN CNBC CNN 2021-09-16 2021-09-19 17:58:12Z 14:03:00Z
9 The Impact Of Cyber Attackers Exploiting New iPhone Software Vulnerability - Newstalk Seasonal variations are making flying on Mars harder for helicopter Ingenuity - Digital Trends Newstalk Digital Trends 2021-09-16 2021-09-19 17:51:26Z 13:57:42Z
10 Government did not advise President Higgins against attending service^ it says - The Irish Times Obadiah Mailafia was hounded till death by DSS^ Buhari govt – Sowore - Daily Post Nigeria The Irish Times Daily Post Nigeria 2021-09-16 2021-09-19 17:48:47Z 13:56:13Z
11 More than half of Manitoba's new COVID-19 cases unvaccinated - CTV News Winnipeg Putin’s party set to retain parliament majority after polls - Punch Newspapers Ctvnews.ca The Punch 2021-09-16 2021-09-19 17:42:21Z 13:54:38Z
12 Several Rockets Strike Kabul City District: Report - NDTV Use of 10p statins in organ donation ‘could save thousands of lives’ - The Guardian NDTV News The Guardian 2021-09-16 2021-09-19 17:38:00Z 13:54:00Z
13 Freddie Combs dead: X Factor star dies aged 49 from kidney failure - The Mirror Boxer Manny Pacquiao to run for Philippines president - The Guardian Mirror Online The Guardian 2021-09-16 2021-09-19 17:36:42Z 13:53:00Z
14 Canada must 'learn from' the pandemic crisis in parts of the West^ Tam says - CBC.ca SpaceX returns with Atlantic splashdown - The Manila Times CBC News The Manila Times 2021-09-16 2021-09-19 17:36:08Z 13:51:23Z
15 Duque confirmó las fechas para los tres días sin IVA - El Tiempo Breaking: Buhari Orders Incorporation of NNPC^ Appoints Board - THISDAY Newspapers Google News THISDAY Newspapers 2021-09-16 2021-09-19 17:33:15Z 13:36:21Z
16 Police Arrested The South Carolina Lawyer Who They Said Planned His Own Killing For An Insurance Payout - BuzzFeed News Australia and France intensify war of words over cancelled submarine deal - Financial Times BuzzFeed News Financial Times 2021-09-16 2021-09-19 17:32:00Z 13:25:49Z
17 Love triangle ends in bloodshed as taxi owner shoots lover and her alleged boyfriend - IOL Only Fools And Horses actor John Challis dies aged 79 - The Guardian IOL The Guardian 2021-09-16 2021-09-19 17:31:20Z 13:23:00Z
18 BBNaija S6: Nini^ Saga receive strikes for flouting house rules - Punch Newspapers Woman dragged into churchyard and raped as cops investigate horror sex attack - Mirror.co.uk The Punch Mirror Online 2021-09-16 2021-09-19 17:24:54Z 13:21:11Z
19 Alberta reverses hands-off approach to Covid to tackle ‘crisis of unvaccinated’ - The Guardian Elon Musk welcomes SpaceX crew home with $50m donation to charity - The Guardian The Guardian 2021-09-16 2021-09-19 17:24:00Z 13:19:00Z
20 House Democrats’ tax plan would increase marriage penalty for wealthy couples - CNBC Tom Cruise gets sneak preview from SpaceX’s 1st private crew - Red Deer Advocate - Flipboard CNBC Flipboard.com 2021-09-16 2021-09-19 17:21:55Z 13:17:42Z
21 First Looks: Canon EOS R3 - Geek Culture Where the main party leaders are on the final day of the federal election campaign - CBC.ca Geek Culture CBC News 2021-09-16 2021-09-19 17:19:16Z 13:17:36Z

View File

@ -0,0 +1 @@
{"feature": "News", "speed": "medium", "animation": "continuous", "country": "USA", "category": "general", "title": true, "sources": {"Bloomberg": -1, "ABC News": -1, "Yahoo": -1}}

1
csv/past_games.json Normal file
View File

@ -0,0 +1 @@
{"feature": "Sports (Upcoming Games)", "speed": "medium", "animation": "continuous", "title": true, "leagues": {"NFL": -1, "NBA": -1, "NHA": -1, "Premier League": -1}}

View File

@ -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}] [{"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}]

View File

@ -1 +1 @@
[] [{"date": "2021-09-19", "time": "15:30:00", "progess": "37", "status": "1H", "home_team": "Tottenham", "home_score": "0", "away_team": "Chelsea", "away_score": "0"}]

View File

@ -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"}] [{"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"}]

1
csv/stocks_settings.json Normal file
View File

@ -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}}

1
csv/team_stats.json Normal file
View File

@ -0,0 +1 @@
{"feature": "Sports (Upcoming Games)", "speed": "medium", "animation": "continuous", "title": true, "leagues": {"NFL": -1, "NBA": -1, "NHA": -1, "Premier League": -1}}

View File

@ -1,4 +1,4 @@
name,current,opening name,current,opening
MSFT,304.21,303.88 MSFT,299.87,304.36
NFLX,586.72,583.95 NFLX,589.43,587.765
GOOG,2895.85,2902.95 GOOG,2828.02,2880.115

1 name current opening
2 MSFT 304.21 299.87 303.88 304.36
3 NFLX 586.72 589.43 583.95 587.765
4 GOOG 2895.85 2828.02 2902.95 2880.115

1
csv/upcoming_games.json Normal file
View File

@ -0,0 +1 @@
{"feature": "Sports (Upcoming Games)", "speed": "medium", "animation": "continuous", "title": true, "leagues": {"NFL": -1, "NBA": -1, "NHA": -1, "Premier League": -1}}

Binary file not shown.

Binary file not shown.

138
server.py
View File

@ -19,7 +19,8 @@ from multiprocessing import Process
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
import numpy as np import numpy as np
#stock_ticker = StockTicker() #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 command = 300
@ -321,12 +322,141 @@ def display_format():
@app.route("/feature_settings", methods = ['PUT', 'POST', 'GET']) @app.route("/feature_settings", methods = ['PUT', 'POST', 'GET'])
def feature_settings(): def feature_settings():
data = str(request.data) data = str(request.data.decode('utf-8'))
print('feature settings')
print(data) 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() 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") @app.route("/stop")
def stop(): def stop():
print('stop') print('stop')

View File

@ -715,7 +715,7 @@ function getWeatherSettings(page) {
let city_colour = getSelected(page.querySelectorAll(".city-colour-select")[0]); let city_colour = getSelected(page.querySelectorAll(".city-colour-select")[0]);
let title = page.querySelectorAll(".title-select")[0].checked; 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 //only for daily weather