new frontend basic functionality working

This commit is contained in:
Neythen 2021-08-18 20:50:02 +01:00
parent cdf2906ad9
commit aebc39c459
20 changed files with 179 additions and 88 deletions

View File

@ -1,4 +1,4 @@
symbol,name,base,current,24hr change
BTC,bitcoin,usd,46362,1.8691205900650751
ETH,ethereum,gbp,2339.29,3.3388729475852204
DOGE,dogecoin,usd,0.278677,9.96397119802603
BTC,bitcoin,usd,44853,-1.3387863974192384
ETH,ethereum,gbp,2200.08,-3.096695901831838
DOGE,dogecoin,usd,0.299933,-4.44177217118751

1 symbol name base current 24hr change
2 BTC bitcoin usd 46362 44853 1.8691205900650751 -1.3387863974192384
3 ETH ethereum gbp 2339.29 2200.08 3.3388729475852204 -3.096695901831838
4 DOGE dogecoin usd 0.278677 0.299933 9.96397119802603 -4.44177217118751

View File

@ -1 +1 @@
["USD", {"AUD": [1.3618, 1.362], "CAD": [1.2525, 1.2565], "CHF": [0.9232, 0.92245], "EUR": [0.85339, 0.8531], "GBP": [0.7228, 0.72145], "JPY": [110.67, 110.46], "NZD": [1.4255, 1.4296]}]
["USD", {"AUD": [1.3793, 1.3715], "CAD": [1.2619, 1.261], "CHF": [0.91495, 0.91043], "EUR": [0.85302, 0.84983], "GBP": [0.72663, 0.7251], "JPY": [109.76, 109.26], "NZD": [1.4484, 1.4433]}]

View File

@ -1 +1 @@
[{"main_weather": "Clouds", "description": "overcast clouds", "temp": 27.3, "min_temp": 27.3, "max_temp": 29.42, "feels_like": 31.86, "humidity": 92, "clouds": 100, "wind_speed": 0.45, "wind_direction": 8, "visibility": 10000, "uv": 0, "rain_chance": 0.65}, {"main_weather": "Clouds", "description": "overcast clouds", "temp": 18.32, "min_temp": 14.58, "max_temp": 23.64, "feels_like": 17.96, "humidity": 67, "clouds": 98, "wind_speed": 4.63, "wind_direction": 210, "visibility": 10000, "uv": 0, "rain_chance": 0}]
[{"main_weather": "Clouds", "description": "broken clouds", "temp": 27.85, "min_temp": 27.43, "max_temp": 29.18, "feels_like": 32.32, "humidity": 84, "clouds": 71, "wind_speed": 0.45, "wind_direction": 22, "visibility": 10000, "uv": 0, "rain_chance": 0.39}, {"main_weather": "Clouds", "description": "overcast clouds", "temp": 19.09, "min_temp": 15.63, "max_temp": 20.92, "feels_like": 18.93, "humidity": 72, "clouds": 90, "wind_speed": 6.17, "wind_direction": 240, "visibility": 10000, "uv": 0, "rain_chance": 0}]

View File

@ -1 +1 @@
[[{"main_weather": "Rain", "description": "light rain", "min_temp": 27.3, "max_temp": 29.42}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.36, "max_temp": 29.08}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 25.87, "max_temp": 27.79}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 25.96, "max_temp": 27.5}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.6, "max_temp": 28.27}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.12, "max_temp": 28.64}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.75, "max_temp": 27.57}, {"main_weather": "Rain", "description": "light rain", "min_temp": 26.33, "max_temp": 27.22}], [{"main_weather": "Clouds", "description": "broken clouds", "min_temp": 14.58, "max_temp": 23.64}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 15.41, "max_temp": 23.1}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 14.49, "max_temp": 21.73}, {"main_weather": "Rain", "description": "light rain", "min_temp": 15.51, "max_temp": 23.53}, {"main_weather": "Rain", "description": "light rain", "min_temp": 16.91, "max_temp": 23.62}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 14.19, "max_temp": 17.08}, {"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 13.11, "max_temp": 22.04}, {"main_weather": "Rain", "description": "light rain", "min_temp": 15.32, "max_temp": 18.95}]]
[[{"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.43, "max_temp": 29.18}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.34, "max_temp": 29.15}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.34, "max_temp": 29.2}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.37, "max_temp": 29.2}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.4, "max_temp": 29.18}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.23, "max_temp": 28.96}, {"main_weather": "Rain", "description": "light rain", "min_temp": 26.9, "max_temp": 29.16}, {"main_weather": "Rain", "description": "light rain", "min_temp": 26.98, "max_temp": 29}], [{"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 15.63, "max_temp": 20.92}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.31, "max_temp": 21.54}, {"main_weather": "Clouds", "description": "few clouds", "min_temp": 13.65, "max_temp": 24.72}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 16.1, "max_temp": 25.02}, {"main_weather": "Rain", "description": "light rain", "min_temp": 15.67, "max_temp": 23.79}, {"main_weather": "Rain", "description": "light rain", "min_temp": 16.75, "max_temp": 22.96}, {"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 14.97, "max_temp": 23.48}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 14.44, "max_temp": 22.67}]]

View File

@ -1 +1 @@
["Forex", "Crypto", "Custom Messages", "Stocks"]
["Crypto Prof", "Forex Prof", "Stocks Prof"]

View File

@ -1 +0,0 @@
{"stocks": "11/08/2021 15:55:17", "crypto": "11/08/2021 15:55:21", "news": "11/08/2021 15:55:23", "weather": "11/08/2021 15:55:22", "forex": "11/08/2021 21:55:27", "sports": "11/08/2021 15:55:24"}

View File

@ -1,21 +1,21 @@
headline,source,date,time
Magnitude 7.3 earthquake jolts Davao Oriental town - CNN Philippines,CNN Philippines,2021-08-11,18:38:58Z
Kathy Hochul vows to change toxic environment as New Yorks next governor live - The Guardian,The Guardian,2021-08-11,18:36:25Z
Chelsea vs Villarreal LIVE: Uefa Super Cup team news^ line-ups and more tonight - The Independent,Independent,2021-08-11,18:36:23Z
Admiral Art McDonald plans to return to his job as chief of defence staff following sexual misconduct probe - CBC.ca,CBC News,2021-08-11,18:30:10Z
Samsung did Pixel owners dirty on trade-in values for the Z Fold3 and Flip3 - Android Police,Android Police,2021-08-11,18:05:00Z
Gavin Williamson should be sacked over exam failures^ says Keir Starmer - The Guardian,The Guardian,2021-08-11,18:03:00Z
C.D.C. Endorses Covid Vaccinations for Pregnant People - The New York Times,New York Times,2021-08-11,18:02:06Z
Global warming begets more warming^ new paleoclimate study finds - Phys.org,Phys.Org,2021-08-11,18:00:05Z
Oregon indoor mask mandate will go into effect Friday - KATU,KATU,2021-08-11,18:00:00Z
ISRO's Chandrayaan-2 instrument detects hydroxyl^ water molecules on the Moon - Deccan Herald,Deccan Herald,2021-08-11,17:53:07Z
Federal judge says Trumps accountants must turn over tax records to House panel - POLITICO,Politico,2021-08-11,17:42:45Z
Hackers Return Nearly Half Of $600 Million Stolen In Biggest Crypto Heist - NDTV Profit,NDTV News,2021-08-11,17:42:08Z
'Jeopardy' will replace Alex Trebek with not one^ but two hosts - CNN,CNN,2021-08-11,17:30:00Z
Razers Fantastic New Wireless Earbuds Put a Light Show in Your Earholes - Gizmodo,Gizmodo.com,2021-08-11,17:30:00Z
Tokyo Olympics 2020: Aussie Olympians face 28 days of quarantine - New Zealand Herald,New Zealand Herald,2021-08-11,17:29:56Z
Instagram says sorry for removing Pedro Almodovar film poster - BBC News,BBC News,2021-08-11,17:27:49Z
'More pepper^ please': New study analyzes role of scent compounds in the coevolution of bats and pepper plants - UW News,UW News,2021-08-11,17:26:08Z
1 man dead^ another injured in Lowertown shooting - CBC.ca,CBC News,2021-08-11,17:23:37Z
Mike Richards to replace Alex Trebek as 'Jeopardy!' host; Mayim Bialik gets role too - CTV News,Ctvnews.ca,2021-08-11,17:23:00Z
Judge rejects acquittal of soldier accused of feeding troops cannabis-laced cupcakes - CBC.ca,CBC News,2021-08-11,17:21:49Z
US recommends Pfizer and Moderna Covid vaccine boosters live - The Guardian,The Guardian,2021-08-18,18:32:47Z
Surprising health benefits of turmeric you should know about - Times of India,The Times of India,2021-08-18,18:30:00Z
Vaccine stockpiling by nations could lead to increase in COVID-19 cases^ novel variant emergence - Princeton University,Princeton University,2021-08-18,18:21:30Z
Covid-19 Live: New mask rules in place as NZ wakes to day two of lockdown - Stuff.co.nz,Stuff.co.nz,2021-08-18,18:20:00Z
'Shadow waveguide' casts complex acoustic patterns to control particles - Phys.org,Phys.Org,2021-08-18,18:00:15Z
Mystery of the seadragon solved - Phys.org,Phys.Org,2021-08-18,18:00:07Z
Deaths of serving policeman and his three year old son investigated as a murder-suicide - Daily Mail,Daily Mail,2021-08-18,17:53:56Z
Healthcare workers in the third wave: 'We are living in the shadows of death' | Health24 - News24,News24,2021-08-18,17:53:52Z
Sleep deprivation impacting Irish surgeons at work^ study finds - The Irish Times,The Irish Times,2021-08-18,17:51:04Z
Porter Airlines^ other companies to require COVID-19 vaccine or negative test for all staff - CBC.ca,CBC News,2021-08-18,17:45:48Z
40 million T-Mobile customers hit by US data breach - BBC News,BBC News,2021-08-18,17:44:59Z
For the Afghans who make it through Taliban checkpoints^ Kabul airport is a gateway to a new world - CNN,CNN,2021-08-18,17:39:00Z
Estudiante desaparecido en el nevado del Tolima fue encontrado sin vida - El Tiempo,Google News,2021-08-18,17:26:27Z
Founder of homeless charity dies in tragic circumstances - Irish Examiner,Irish Examiner,2021-08-18,17:26:00Z
ENG vs IND: Virat Kohli "The Most Foul Mouthed Individual"^ Says Nick Compton; Gets Hammered On Twitter | Cricket News - NDTVSports.com,NDTV News,2021-08-18,17:25:00Z
Lonely flies^ like many humans^ eat more and sleep less - Science Daily,Science Daily,2021-08-18,17:23:37Z
Garth Brooks cancels stadium tour in Baltimore due to Delta variant surge - WBAL TV Baltimore,WBAL TV Baltimore,2021-08-18,17:15:00Z
Vaccines protection against virus infection is waning^ C.D.C. studies suggest. - The New York Times,New York Times,2021-08-18,17:13:34Z
Red Sox's epic collapse is 'frustrating' Alex Cora - New York Post ,New York Post,2021-08-18,17:11:17Z
Irish banker earned more than €16m in 2019 - The Irish Times,The Irish Times,2021-08-18,17:07:14Z

Can't render this file because it contains an unexpected character in line 16 and column 25.

View File

@ -1 +1 @@
[{"date": "2021-08-13", "time": "19:00:00", "round": "1", "home_team": "Brentford", "home_score": null, "away_team": "Arsenal", "away_score": null}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Burnley", "home_score": null, "away_team": "Brighton", "away_score": null}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Chelsea", "home_score": null, "away_team": "Crystal Palace", "away_score": null}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Everton", "home_score": null, "away_team": "Southampton", "away_score": null}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Leicester", "home_score": null, "away_team": "Wolves", "away_score": null}, {"date": "2021-08-14", "time": "11:30:00", "round": "1", "home_team": "Man United", "home_score": null, "away_team": "Leeds", "away_score": null}, {"date": "2021-08-14", "time": "16:30:00", "round": "1", "home_team": "Norwich", "home_score": null, "away_team": "Liverpool", "away_score": null}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Watford", "home_score": null, "away_team": "Aston Villa", "away_score": null}, {"date": "2021-08-15", "time": "13:00:00", "round": "1", "home_team": "Newcastle", "home_score": null, "away_team": "West Ham", "away_score": null}, {"date": "2021-08-15", "time": "15:30:00", "round": "1", "home_team": "Tottenham", "home_score": null, "away_team": "Man City", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Aston Villa", "home_score": null, "away_team": "Newcastle", "away_score": null}, {"date": "2021-08-21", "time": "16:30:00", "round": "2", "home_team": "Brighton", "home_score": null, "away_team": "Watford", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Crystal Palace", "home_score": null, "away_team": "Brentford", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Leeds", "home_score": null, "away_team": "Everton", "away_score": null}, {"date": "2021-08-21", "time": "11:30:00", "round": "2", "home_team": "Liverpool", "home_score": null, "away_team": "Burnley", "away_score": null}]
[{"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Aston Villa", "home_score": null, "away_team": "Newcastle", "away_score": null}, {"date": "2021-08-21", "time": "16:30:00", "round": "2", "home_team": "Brighton", "home_score": null, "away_team": "Watford", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Crystal Palace", "home_score": null, "away_team": "Brentford", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Leeds", "home_score": null, "away_team": "Everton", "away_score": null}, {"date": "2021-08-21", "time": "11:30:00", "round": "2", "home_team": "Liverpool", "home_score": null, "away_team": "Burnley", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Man City", "home_score": null, "away_team": "Norwich", "away_score": null}, {"date": "2021-08-22", "time": "15:30:00", "round": "2", "home_team": "Arsenal", "home_score": null, "away_team": "Chelsea", "away_score": null}, {"date": "2021-08-22", "time": "13:00:00", "round": "2", "home_team": "Southampton", "home_score": null, "away_team": "Man United", "away_score": null}, {"date": "2021-08-22", "time": "13:00:00", "round": "2", "home_team": "Wolves", "home_score": null, "away_team": "Tottenham", "away_score": null}, {"date": "2021-08-23", "time": "19:00:00", "round": "2", "home_team": "West Ham", "home_score": null, "away_team": "Leicester", "away_score": null}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "Aston Villa", "home_score": null, "away_team": "Brentford", "away_score": null}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "Brighton", "home_score": null, "away_team": "Everton", "away_score": null}, {"date": "2021-08-28", "time": "16:30:00", "round": "3", "home_team": "Liverpool", "home_score": null, "away_team": "Chelsea", "away_score": null}, {"date": "2021-08-28", "time": "11:30:00", "round": "3", "home_team": "Man City", "home_score": null, "away_team": "Arsenal", "away_score": null}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "Newcastle", "home_score": null, "away_team": "Southampton", "away_score": null}]

View File

@ -1 +1 @@
[{"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Wolves", "home_score": "1", "away_team": "Man United", "away_score": "2"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "West Ham", "home_score": "3", "away_team": "Southampton", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Sheffield United", "home_score": "1", "away_team": "Burnley", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Man City", "home_score": "5", "away_team": "Everton", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Liverpool", "home_score": "2", "away_team": "Crystal Palace", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Leicester", "home_score": "2", "away_team": "Tottenham", "away_score": "4"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Leeds", "home_score": "3", "away_team": "West Brom", "away_score": "1"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Fulham", "home_score": "0", "away_team": "Newcastle", "away_score": "2"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Aston Villa", "home_score": "2", "away_team": "Chelsea", "away_score": "1"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Arsenal", "home_score": "2", "away_team": "Brighton", "away_score": "0"}, {"date": "2021-05-19", "time": "19:15:00", "round": "37", "home_team": "West Brom", "home_score": "1", "away_team": "West Ham", "away_score": "3"}, {"date": "2021-05-19", "time": "17:00:00", "round": "37", "home_team": "Tottenham", "home_score": "1", "away_team": "Aston Villa", "away_score": "2"}, {"date": "2021-05-19", "time": "17:00:00", "round": "37", "home_team": "Newcastle", "home_score": "1", "away_team": "Sheffield United", "away_score": "0"}, {"date": "2021-05-19", "time": "17:00:00", "round": "37", "home_team": "Everton", "home_score": "1", "away_team": "Wolves", "away_score": "0"}, {"date": "2021-05-19", "time": "18:00:00", "round": "37", "home_team": "Crystal Palace", "home_score": "1", "away_team": "Arsenal", "away_score": "3"}]
[{"date": "2021-08-15", "time": "15:30:00", "round": "1", "home_team": "Tottenham", "home_score": "1", "away_team": "Man City", "away_score": "0"}, {"date": "2021-08-15", "time": "13:00:00", "round": "1", "home_team": "Newcastle", "home_score": "2", "away_team": "West Ham", "away_score": "4"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Watford", "home_score": "3", "away_team": "Aston Villa", "away_score": "2"}, {"date": "2021-08-14", "time": "16:30:00", "round": "1", "home_team": "Norwich", "home_score": "0", "away_team": "Liverpool", "away_score": "3"}, {"date": "2021-08-14", "time": "11:30:00", "round": "1", "home_team": "Man United", "home_score": "5", "away_team": "Leeds", "away_score": "1"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Leicester", "home_score": "1", "away_team": "Wolves", "away_score": "0"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Everton", "home_score": "3", "away_team": "Southampton", "away_score": "1"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Chelsea", "home_score": "3", "away_team": "Crystal Palace", "away_score": "0"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Burnley", "home_score": "1", "away_team": "Brighton", "away_score": "2"}, {"date": "2021-08-13", "time": "19:00:00", "round": "1", "home_team": "Brentford", "home_score": "2", "away_team": "Arsenal", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Wolves", "home_score": "1", "away_team": "Man United", "away_score": "2"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "West Ham", "home_score": "3", "away_team": "Southampton", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Sheffield United", "home_score": "1", "away_team": "Burnley", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Man City", "home_score": "5", "away_team": "Everton", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Liverpool", "home_score": "2", "away_team": "Crystal Palace", "away_score": "0"}]

View File

@ -1,4 +1,4 @@
name,current,opening
MSFT,286.91,287.17
NFLX,512.04,516.025
GOOG,2756.21,2768.665
MSFT,292.24,291.83
NFLX,523.04,519.94
GOOG,2748.74,2742.12

1 name current opening
2 MSFT 286.91 292.24 287.17 291.83
3 NFLX 512.04 523.04 516.025 519.94
4 GOOG 2756.21 2748.74 2768.665 2742.12

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -51,7 +51,7 @@ def process_file(path, filename):
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello():
def index():
global command
@ -78,7 +78,7 @@ def Runtime():
LastCommand = 'Change runtime'
return hello()
return index()
@app.route("/Delay", methods=['POST'])
def Delay():
@ -87,7 +87,7 @@ def Delay():
global LastCommand
LastCommand = 'Change Delay'
return hello()
return index()
@app.route("/Speed", methods=['POST'])
def Speed():
@ -109,7 +109,7 @@ def Speed():
f.close()
global LastCommand
LastCommand = 'Change Speed'
return hello()
return index()
@app.route("/Brightness", methods=['POST'])
def Brightness():
@ -132,7 +132,7 @@ def Brightness():
global LastCommand
LastCommand = 'Change Brightness'
return hello()
return index()
@app.route("/DisplayText", methods=['POST'])
def DisplayText():
@ -142,7 +142,7 @@ def DisplayText():
f.close()
ticker.sendline('K')
ticker.sendline('T')
return hello()
return index()
@app.route("/SetNews", methods=['POST'])
def SetNews():
@ -171,7 +171,7 @@ def SetNews():
api_caller.sendline('R')
return hello()
return index()
@app.route("/SetWeather", methods=['POST'])
def SetWeather():
@ -184,7 +184,7 @@ def SetWeather():
f.close()
api_caller.sendline('R')
return hello()
return index()
@app.route("/DisplayGIF", methods=['POST'])
def DisplayGIF():
@ -206,7 +206,7 @@ def DisplayGIF():
ticker.sendline('K')
ticker.sendline('G')
return hello()
return hello()
return index()
@app.route("/DisplayImage", methods=['POST'])
def DisplayImage():
@ -228,7 +228,7 @@ def DisplayImage():
ticker.sendline('K')
ticker.sendline('I')
return hello()
return hello()
return index()
@app.route("/Ticker", methods=['POST'])
@ -248,7 +248,7 @@ def Ticker():
global LastCommand
LastCommand = 'Change CSV file'
return hello()
return hello()
return index()
@app.route("/AddLogo", methods=['POST'])
def AddLogo():
@ -266,23 +266,31 @@ def AddLogo():
global LastCommand
LastCommand = 'Add a new logo file'
return hello()
return hello()
return index()
professional = False
@app.route("/start", methods = ['PUT', 'POST'])
def start():
print(professional)
data = str(request.data)
all_settings = ['Stocks', 'Crypto', 'Forex', 'Current Weather', 'Daily Forecast', 'News', 'Sports (Upcoming Games)', 'Sports (Past Games)',
'Sports (Live Games)', 'Sports (Team Stats)', 'Custom Images', 'Custom GIFs', 'Custom Messages']
if professional:
all_settings = ['Stocks', 'Crypto', 'Forex', 'Current Weather', 'News']
positions = []
display_settings = []
for setting in all_settings:
pos = data.find(setting)
if pos != -1:
if professional:
setting += ' Prof'
display_settings.append(setting)
positions.append(pos)
@ -294,18 +302,32 @@ def start():
json.dump(list(display_settings), f)
ticker.sendline('K')
ticker.sendline('A')
return hello()
return index()
@app.route("/display_format", methods = ['PUT', 'POST', 'GET'])
def display_format():
global professional
data = str(request.data)
if "Standard" in data:
professional = False
elif "Professional" in data:
professional = True
print(professional)
return index()
@app.route("/stop")
def stop():
print('stop')
ticker.sendline('K')
return hello()
return index()
@app.route("/shutdown")
def shutdown():
os.system("sudo shutdown now")
return hello()
return index()
@app.route("/matrix")
def matrix():
@ -381,7 +403,7 @@ def matrix():
os.system("sudo shutdown now")
except:
print("couldn't shutdown")
return hello()
return index()
if __name__ == "__main__":

View File

@ -560,10 +560,10 @@ allFeaturesTextAddBtn.map((value, index) => {
var startButton = document.getElementById("start-btn");
// start the display
startButton.addEventListener("click", () => {
var HTML = document.getElementById('display-format').innerHTML;
console.log('pressed');
@ -577,3 +577,70 @@ startButton.addEventListener("click", () => {
body:JSON.stringify(HTML)
});
});
var shutdownButton = document.getElementById("shutdown-btn");
shutdownButton.addEventListener("click", () => {
fetch("/shutdown", {
method:"GET",
});
});
var stopButton = document.getElementById("stop-btn");
stopButton.addEventListener("click", () => {
fetch("/stop", {
method:"GET",
});
});
var dispFormatButton = document.getElementById("dispformat-btn");
var displayFormats = document.getElementById("inputDisplayFormat");
function getSelected(selector) {
var opt;
for ( var i = 0, len = selector.options.length; i < len; i++ ) {
opt = selector.options[i];
if ( opt.selected === true ) {
break;
}
}
return opt.innerHTML;
}
// start the display
dispFormatButton.addEventListener("click", () => {
opt = getSelected(displayFormats);
fetch("/display_format", {
method:"PUT",
body:JSON.stringify(opt)
});
});
function saveSettings() {
let featureSelector = document.getElementById("drop");
feature = getSelected(featureSelector);
let features = ["Stocks", "Crypto", "Forex", "Current Weather", "Daily Forecast", "News", "Sports (Upcoming Games)", "Sports (Past Games)", "Sports (Live Games)", "Sports (Team Stats)", "Custom Images", "Custom GIFs", "Custom Messages"];
let pageNum = features.indexOf(feature) + 1;
let pageSelector = "Page" + pageNum.toString();
let page = document.getElementById(pageSelector);
let speed = getSelected(page.querySelectorAll(".speed-select")[0]);
let animation = getSelected(page.querySelectorAll(".animation-select")[0]);
console.log(speed);
console.log(animation);
}
let saveSettingsButtons = document.querySelectorAll(".save-btn-div").forEach(button =>
button.addEventListener("click", saveSettings)
)

View File

@ -65,8 +65,8 @@ class StockTicker():
'News':self.getNewsImage, 'Custom Messages': self.getUserText, 'Custom Images': self.getUserImage, 'Custom GIFs':self.getUserGIF,
'stocks_prof': self.getStockProfessional, 'crypto_prof': self.getCryptoProfessional, 'forex_prof': self.getForexProfessional,
'today_weather_prof': self.getTodayWeatherProfessional, 'news_prof':self.getNewsProfessional}
'Stocks Prof': self.getStockProfessional, 'Crypto Prof': self.getCryptoProfessional, 'Forex Prof': self.getForexProfessional,
'Current Weather Prof': self.getTodayWeatherProfessional, 'News Prof':self.getNewsProfessional}
@ -2115,10 +2115,13 @@ class StockTicker():
#userSettings = ['crypto', 'stocks'] # these wil be read from csv, just for demo
#userSettings = [ 'display_image', 'news'] # these wil be read from csv, just for demo
userSettings = json.load(open('csv/display_settings.json'))
if 'Prof' in userSettings[0]: #if professional display
self.scrollProfessionalAnimated(userSettings)
else:
self.scrollFunctionsAnimated(userSettings, animation = 'down')
elif msg == 'b':
userSettings = ['stocks_prof', 'forex_prof', 'crypto_prof', 'today_weather_prof']
userSettings = json.load(open('csv/display_settings.json'))
self.scrollProfessionalAnimated(userSettings)
#self.displayProfessional()
@ -2137,7 +2140,7 @@ if __name__ == '__main__':
start_image = Image.open('./logos/startup_logo.png')
stock_ticker.setImage(start_image)
time.sleep(10)
time.sleep(1)
stock_ticker.resetMatrix()

View File

@ -51,11 +51,11 @@
<ul class="buttons-list">
<!--<li><a href="/start" class="btn btn-success">Start Display</a></li>-->
<li><a id="start-btn" class="btn btn-success">Start Display</a></li>
<li><a href="/stop" class="btn btn-stop-display">Stop Display</a></li>
<li><a id="stop-btn" class="btn btn-stop-display">Stop Display</a></li>
<li>
<a href="#" class="btn btn-warning text-white">Screensaver</a>
</li>
<li><a href="/shutdown" class="btn btn-danger">Shut Down</a></li>
<li><a id="shutdown-btn" class="btn btn-danger">Shut Down</a></li>
</ul>
@ -146,7 +146,7 @@
</select>
</div>
<div class="col-auto">
<a href="#" class="btn set-btn">Set</a>
<a href="#" id="dispformat-btn" class="btn set-btn">Set</a>
</div>
</div>
</div>
@ -271,7 +271,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed" class="form-select">
<select id="inputScrollSpeed" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -286,7 +286,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition" class="form-select">
<select id="inputTransition" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -477,7 +477,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed2" class="form-select">
<select id="inputScrollSpeed2" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -492,7 +492,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition2" class="form-select">
<select id="inputTransition2" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -678,7 +678,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed3" class="form-select">
<select id="inputScrollSpeed3" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -693,7 +693,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition3" class="form-select">
<select id="inputTransition3" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -881,7 +881,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed4" class="form-select">
<select id="inputScrollSpeed4" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -896,7 +896,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition4" class="form-select">
<select id="inputTransition4" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -1077,7 +1077,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed5" class="form-select">
<select id="inputScrollSpeed5" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -1092,7 +1092,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition5" class="form-select">
<select id="inputTransition5" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -1291,7 +1291,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed6" class="form-select">
<select id="inputScrollSpeed6" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -1306,7 +1306,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition6" class="form-select">
<select id="inputTransition6" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -1468,7 +1468,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed7" class="form-select">
<select id="inputScrollSpeed7" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -1483,7 +1483,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition7" class="form-select">
<select id="inputTransition7" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -1595,7 +1595,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed8" class="form-select">
<select id="inputScrollSpeed8" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -1610,7 +1610,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition8" class="form-select">
<select id="inputTransition8" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -1722,7 +1722,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed9" class="form-select">
<select id="inputScrollSpeed9" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -1737,7 +1737,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition9" class="form-select">
<select id="inputTransition9" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -1848,7 +1848,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed10" class="form-select">
<select id="inputScrollSpeed10" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -1863,7 +1863,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition10" class="form-select">
<select id="inputTransition10" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -1995,7 +1995,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed11" class="form-select">
<select id="inputScrollSpeed11" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -2010,7 +2010,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition11" class="form-select">
<select id="inputTransition11" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -2158,7 +2158,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed12" class="form-select">
<select id="inputScrollSpeed12" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -2173,7 +2173,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition12" class="form-select">
<select id="inputTransition12" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>
@ -2320,7 +2320,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed13" class="form-select">
<select id="inputScrollSpeed13" class="form-select speed-select">
<option>Medium</option>
<option>Slow</option>
<option>Fast</option>
@ -2335,7 +2335,7 @@
</label>
</div>
<div class="col-auto">
<select id="inputTransition13" class="form-select">
<select id="inputTransition13" class="form-select animation-select">
<option>Continuous</option>
<option>None</option>
<option>Top to bottom</option>