sports_fixes

This commit is contained in:
Neythen Treloar 2022-03-05 10:37:22 +00:00
parent b325505b63
commit e8a315f59d
27 changed files with 48 additions and 210 deletions

BIN
csv/.DS_Store vendored

Binary file not shown.

BIN
csv/sports/.DS_Store vendored

Binary file not shown.

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1,31 +0,0 @@
Full Team Name,Team ID,3 Letter ID,Team Color,Logo File name
Atlanta Hawks,134880,ATL,Red,Atlanta.png
Boston Celtics,134860,BOS,Green,Boston.png
Brooklyn Nets,134861,BKN,White,Brooklyn.png
Charlotte Hornets,134881,CHA,Light blue,Charlotte.png
Chicago Bulls,134870,CHI,Red,Chicago.png
Cleveland Cavaliers,134871,CLE,Yellow,Cleveland.png
Dallas Mavericks,134875,DAL,Light blue,Dallas.png
Denver Nuggets,134885,DEN,Yellow,Denver.png
Detroit Pistons,134872,DET,Red,Detroit.png
Golden State Warriors,134865,GSW,Yellow,Golden State.png
Indiana Pacers,134873,IND,Yellow,Indiana.png
Houston Rockets,134876,HOU,Red,Houston.png
Los Angeles Clippers,134866,LAC,Red,LA.png
Los Angeles Lakers,134867,LAL,Purple,LA Lakers.png
Memphis Grizzlies,134877,MEM,Dark blue,Memphis.png
Miami Heat,134882,MIA,Red,Miami.png
Milwaukee Bucks,134874,MIL,Green,Milwaukee.png
Minnesota Timberwolves,134886,MIN,Blue,Minnesota.png
New Orleans Pelicans,134878,NOP,Gold,New Orleans.png
New York Knicks,134862,NYK,Orange,New York.png
Oklahoma City Thunder,134887,OKC,Orange,Oklahoma City.png
Orlando Magic,134883,ORL,Light blue,Orlando.png
Philadelphia 76ers,134863,PHI,Light blue,Philadelphia.png
Utah Jazz,134889,UTA,Yellow,Utah.png
Portland Trail Blazers,134888,POR,Red,Portland.png
Sacramento Kings,134869,SAC,Purple,Sacramento.png
San Antonio Spurs,134879,SAS,Gray,San Antonio.png
Toronto Raptors,134864,TOR,Gray,Toronto.png
Phoenix Suns,134868,PHX,Orange,Phoenix.png
Washington Wizards,134884,WAS,Red,Washington.png
1 Full Team Name Team ID 3 Letter ID Team Color Logo File name
2 Atlanta Hawks 134880 ATL Red Atlanta.png
3 Boston Celtics 134860 BOS Green Boston.png
4 Brooklyn Nets 134861 BKN White Brooklyn.png
5 Charlotte Hornets 134881 CHA Light blue Charlotte.png
6 Chicago Bulls 134870 CHI Red Chicago.png
7 Cleveland Cavaliers 134871 CLE Yellow Cleveland.png
8 Dallas Mavericks 134875 DAL Light blue Dallas.png
9 Denver Nuggets 134885 DEN Yellow Denver.png
10 Detroit Pistons 134872 DET Red Detroit.png
11 Golden State Warriors 134865 GSW Yellow Golden State.png
12 Indiana Pacers 134873 IND Yellow Indiana.png
13 Houston Rockets 134876 HOU Red Houston.png
14 Los Angeles Clippers 134866 LAC Red LA.png
15 Los Angeles Lakers 134867 LAL Purple LA Lakers.png
16 Memphis Grizzlies 134877 MEM Dark blue Memphis.png
17 Miami Heat 134882 MIA Red Miami.png
18 Milwaukee Bucks 134874 MIL Green Milwaukee.png
19 Minnesota Timberwolves 134886 MIN Blue Minnesota.png
20 New Orleans Pelicans 134878 NOP Gold New Orleans.png
21 New York Knicks 134862 NYK Orange New York.png
22 Oklahoma City Thunder 134887 OKC Orange Oklahoma City.png
23 Orlando Magic 134883 ORL Light blue Orlando.png
24 Philadelphia 76ers 134863 PHI Light blue Philadelphia.png
25 Utah Jazz 134889 UTA Yellow Utah.png
26 Portland Trail Blazers 134888 POR Red Portland.png
27 Sacramento Kings 134869 SAC Purple Sacramento.png
28 San Antonio Spurs 134879 SAS Gray San Antonio.png
29 Toronto Raptors 134864 TOR Gray Toronto.png
30 Phoenix Suns 134868 PHX Orange Phoenix.png
31 Washington Wizards 134884 WAS Red Washington.png

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1,33 +0,0 @@
Full Team Name,Team ID,3 Letter ID,Team Color,Logo File name
Arizona Cardinals,134946,ARI,Red,Arizona.png
Atlanta Falcons,134942,ATL,Red,Atlanta.png
Baltimore Ravens,134922,BAL,Purple,Baltimore.png
Buffalo Bills,134918,BUF,Blue,Buffalo.png
Carolina Panthers,134943,CAR,Blue,Carolina.png
Chicago Bears,134938,CHI,Orange,Chicago.png
Cincinnati Bengals,134923,CIN,Orange,Cincinnati.png
Cleveland Browns,134924,CLE,Orange,Cleveland.png
Dallas Cowboys,134934,DAL,Dark blue,Dallas.png
Denver Broncos,134930,DEN,Orange,Denver.png
Detroit Lions,134939,DET,Blue,Detroit.png
Green Bay Packers,134940,GB,Dark green,Green Bay.png
Houston Texans,134926,HOU,Dark blue,Houston.png
Indianapolis Colts,134927,IND,Dark blue,Indianapolis.png
Jacksonville Jaguars,134928,JAX,Gold,Jacksonville.png
Kansas City Chiefs,134931,KC,Red,Kansas City.png
Las Vegas Raiders,134932,OAK,White,Oakland.png
Los Angeles Chargers,135908,LAC,Yellow,Los Angeles Chargers.png
Los Angeles Rams,135907,LA,Blue,Los Angeles Rams.png
Miami Dolphins,134919,MIA,Light blue,Miami.png
Minnesota Vikings,134941,MIN,Purple,Minnesota.png
New England Patriots,134920,NE,Dark blue,New England.png
New Orleans Saints,134944,NO,Gold,New Orleans.png
New York Giants,134935,NYG,Dark blue,New York Giants.png
New York Jets,134921,NYJ,Green,New York Jets.png
Philadelphia Eagles,134936,PHI,Dark green,Philadelphia.png
Pittsburgh Steelers,134925,PIT,Yellow,Pittsburgh.png
San Francisco 49ers,134948,SF,Gold,San Francisco.png
Seattle Seahawks,134949,SEA,Dark blue,Seattle.png
Tampa Bay Buccaneers,134945,TB,Red,Tampa Bay.png
Tennessee Titans,134929,TEN,Light blue,Tennessee.png
Washington,134937,WAS,Dark red,Washington.png
1 Full Team Name Team ID 3 Letter ID Team Color Logo File name
2 Arizona Cardinals 134946 ARI Red Arizona.png
3 Atlanta Falcons 134942 ATL Red Atlanta.png
4 Baltimore Ravens 134922 BAL Purple Baltimore.png
5 Buffalo Bills 134918 BUF Blue Buffalo.png
6 Carolina Panthers 134943 CAR Blue Carolina.png
7 Chicago Bears 134938 CHI Orange Chicago.png
8 Cincinnati Bengals 134923 CIN Orange Cincinnati.png
9 Cleveland Browns 134924 CLE Orange Cleveland.png
10 Dallas Cowboys 134934 DAL Dark blue Dallas.png
11 Denver Broncos 134930 DEN Orange Denver.png
12 Detroit Lions 134939 DET Blue Detroit.png
13 Green Bay Packers 134940 GB Dark green Green Bay.png
14 Houston Texans 134926 HOU Dark blue Houston.png
15 Indianapolis Colts 134927 IND Dark blue Indianapolis.png
16 Jacksonville Jaguars 134928 JAX Gold Jacksonville.png
17 Kansas City Chiefs 134931 KC Red Kansas City.png
18 Las Vegas Raiders 134932 OAK White Oakland.png
19 Los Angeles Chargers 135908 LAC Yellow Los Angeles Chargers.png
20 Los Angeles Rams 135907 LA Blue Los Angeles Rams.png
21 Miami Dolphins 134919 MIA Light blue Miami.png
22 Minnesota Vikings 134941 MIN Purple Minnesota.png
23 New England Patriots 134920 NE Dark blue New England.png
24 New Orleans Saints 134944 NO Gold New Orleans.png
25 New York Giants 134935 NYG Dark blue New York Giants.png
26 New York Jets 134921 NYJ Green New York Jets.png
27 Philadelphia Eagles 134936 PHI Dark green Philadelphia.png
28 Pittsburgh Steelers 134925 PIT Yellow Pittsburgh.png
29 San Francisco 49ers 134948 SF Gold San Francisco.png
30 Seattle Seahawks 134949 SEA Dark blue Seattle.png
31 Tampa Bay Buccaneers 134945 TB Red Tampa Bay.png
32 Tennessee Titans 134929 TEN Light blue Tennessee.png
33 Washington 134937 WAS Dark red Washington.png

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1,33 +0,0 @@
Full Team Name,Team ID,3 Letter ID,Team Color,Logo File name,,Season
Arizona Coyotes,134847,ARI,Red,coyotes.png,,Off
Anaheim Ducks,134846,ANA,Gold,ducks.png,,Pre
Boston Bruins,134830,BOS,Yellow,bruins.png,,On
Colorado Avalanche,134855,COL,Red,avalanche.png,,Semi Finals
Chicago Blackhawks,134854,CHI,Orange,blackhawks.png,,Finals
Columbus Blue Jackets,134839,CBJ,Blue,blue-jackets.png,,
St. Louis Blues,134859,STL,Blue,blues.png,,
Montreal Canadiens,134834,MTL,Red,canadiens.png,,
Vancouver Canucks,134850,VAN,Blue,canucks.png,,
Washington Capitals,134845,WSH,Blue,capitals.png,,
New Jersey Devils,134840,NJD,Red,devils.png,,
Calgary Flames,134848,CGY,Orange,flames.png,,
Philadelphia Flyers,134843,PHI,White,flyers.png,,
Carolina Hurricanes,134838,CAR,Red,hurricanes.png,,
New York Islanders,134841,NYI,Orange,islanders.png,,
Winnipeg Jets,134851,WPG,Blue,jets.png,,
Los Angeles Kings,134852,LAK,Gray,kings.png,,
Vegas Golden Knights,135913,VGK,Gold,knights.png,,
Tampa Bay Lightning,134836,TBL,Blue,lightning.png,,
Toronto Maple Leafs,134837,TOR,Blue,maple-leafs.png,,
Edmonton Oilers,134849,EDM,Orange,oilers.png,,
Florida Panthers,134833,FLA,Red,panthers.png,,
Pittsburgh Penguins,134844,PIT,Yellow,penguins.png,,
Nashville Predators,134858,NSH,Yellow,predators.png,,
New York Rangers,134842,NYR,Blue,rangers.png,,
Detroit Red Wings,134832,DET,Red,red-wings.png,,
Buffalo Sabres,134831,BUF,Yellow,sabres.png,,
Ottawa Senators,134835,OTT,Gold,senators.png,,
San Jose Sharks,134853,SJS,Light blue,sharks.png,,
Dallas Stars,134856,DAL,Green,stars.png,,
Minnesota Wild,134857,MIN,Green,wild.png,,
Seattle Kraken,140082,SEA,Light blue,kraken.png,,
1 Full Team Name Team ID 3 Letter ID Team Color Logo File name Season
2 Arizona Coyotes 134847 ARI Red coyotes.png Off
3 Anaheim Ducks 134846 ANA Gold ducks.png Pre
4 Boston Bruins 134830 BOS Yellow bruins.png On
5 Colorado Avalanche 134855 COL Red avalanche.png Semi Finals
6 Chicago Blackhawks 134854 CHI Orange blackhawks.png Finals
7 Columbus Blue Jackets 134839 CBJ Blue blue-jackets.png
8 St. Louis Blues 134859 STL Blue blues.png
9 Montreal Canadiens 134834 MTL Red canadiens.png
10 Vancouver Canucks 134850 VAN Blue canucks.png
11 Washington Capitals 134845 WSH Blue capitals.png
12 New Jersey Devils 134840 NJD Red devils.png
13 Calgary Flames 134848 CGY Orange flames.png
14 Philadelphia Flyers 134843 PHI White flyers.png
15 Carolina Hurricanes 134838 CAR Red hurricanes.png
16 New York Islanders 134841 NYI Orange islanders.png
17 Winnipeg Jets 134851 WPG Blue jets.png
18 Los Angeles Kings 134852 LAK Gray kings.png
19 Vegas Golden Knights 135913 VGK Gold knights.png
20 Tampa Bay Lightning 134836 TBL Blue lightning.png
21 Toronto Maple Leafs 134837 TOR Blue maple-leafs.png
22 Edmonton Oilers 134849 EDM Orange oilers.png
23 Florida Panthers 134833 FLA Red panthers.png
24 Pittsburgh Penguins 134844 PIT Yellow penguins.png
25 Nashville Predators 134858 NSH Yellow predators.png
26 New York Rangers 134842 NYR Blue rangers.png
27 Detroit Red Wings 134832 DET Red red-wings.png
28 Buffalo Sabres 134831 BUF Yellow sabres.png
29 Ottawa Senators 134835 OTT Gold senators.png
30 San Jose Sharks 134853 SJS Light blue sharks.png
31 Dallas Stars 134856 DAL Green stars.png
32 Minnesota Wild 134857 MIN Green wild.png
33 Seattle Kraken 140082 SEA Light blue kraken.png

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1,21 +0,0 @@
Full Team Name,Team ID,3 Letter ID,Team Color,Logo File name
Arsenal,133604,ARS,Red,Arsenal.png
Aston Villa,133601,AVL,Light blue,AVFC.png
Brentford,134355,BRE,Red,Brentford.png
Brighton,133619,BRI,Blue,Brighton.png
Burnley,133623,BUR,Light blue,Burnley.png
Chelsea,133610,CHE,Dark blue,Chelsea.png
Crystal Palace,133632,CRY,Blue,Crystal Palace.png
Everton,133615,EVE,Blue,Everton.png
Leeds,133635,LEE,Yellow,Leeds.png
Leicester,133626,LEI,Blue,Leicester.png
Liverpool,133602,LIV,Red,Liverpool.png
Man City,133613,MCI,Blue,Manchester City.png
Man United,133612,MUN,Red,Man United.png
Newcastle,134777,NEW,Light blue,Newcastle.png
Norwich,133608,NOR,Green,Norwich.png
Southampton,134778,SOU,Red,Southampton.png
Tottenham,133616,TOT,Dark blue,Tottenham.png
Watford,133624,WAT,Red,Watford.png
West Ham,133636,WHU,Red,West Ham.png
Wolves,133599,WOL,Yellow,Wolves.png
1 Full Team Name Team ID 3 Letter ID Team Color Logo File name
2 Arsenal 133604 ARS Red Arsenal.png
3 Aston Villa 133601 AVL Light blue AVFC.png
4 Brentford 134355 BRE Red Brentford.png
5 Brighton 133619 BRI Blue Brighton.png
6 Burnley 133623 BUR Light blue Burnley.png
7 Chelsea 133610 CHE Dark blue Chelsea.png
8 Crystal Palace 133632 CRY Blue Crystal Palace.png
9 Everton 133615 EVE Blue Everton.png
10 Leeds 133635 LEE Yellow Leeds.png
11 Leicester 133626 LEI Blue Leicester.png
12 Liverpool 133602 LIV Red Liverpool.png
13 Man City 133613 MCI Blue Manchester City.png
14 Man United 133612 MUN Red Man United.png
15 Newcastle 134777 NEW Light blue Newcastle.png
16 Norwich 133608 NOR Green Norwich.png
17 Southampton 134778 SOU Red Southampton.png
18 Tottenham 133616 TOT Dark blue Tottenham.png
19 Watford 133624 WAT Red Watford.png
20 West Ham 133636 WHU Red West Ham.png
21 Wolves 133599 WOL Yellow Wolves.png

View File

@ -1 +0,0 @@
[]

View File

@ -1 +1 @@
{"update_available": true, "first_boot": false} {"update_available": false, "first_boot": true}

View File

@ -77,7 +77,7 @@ def updateStocks(api_key):
if stock['symbol'] == symbol: if stock['symbol'] == symbol:
stock_info[stock['symbol']] = {'current': stock['price'], 'change': stock['change_since'], 'percent_change':stock['percent']} stock_info[stock['symbol']] = {'current': stock['price'], 'change': stock['change_since'], 'percent_change':stock['percent']}
print(stock_info)
all_stocks_settings['symbols'] = stock_info all_stocks_settings['symbols'] = stock_info
@ -373,6 +373,7 @@ def updateLeagueTables(api_key):
try: try:
f = open('csv/league_tables.json', 'r') f = open('csv/league_tables.json', 'r')
all_settings = json.load(f) all_settings = json.load(f)
print(all_settings['leagues'].keys())
f.close() f.close()
leagues = all_settings['leagues'].keys() leagues = all_settings['leagues'].keys()
@ -390,14 +391,18 @@ def updateLeagueTables(api_key):
all_data = r.json() all_data = r.json()
#print(all_data)
for league in all_data[0].keys():
print('key', [all_data[i].keys() for i in range(len(all_data))])
#print('key', all_data.keys())
for i,l in enumerate(all_data):
print(l)
league = list(l.keys())[0]
print('league', league, list(l.keys()))
teams = [] teams = []
for d in all_data[0][league]: for d in all_data[i][league]:
team = {} team = {}
@ -414,9 +419,10 @@ def updateLeagueTables(api_key):
leagues_info[league.upper()] = teams leagues_info[league.upper()] = teams
all_settings['leagues'] = leagues_info all_settings['leagues'] = leagues_info
print(all_settings['leagues'].keys())
json.dump(all_settings, open( "csv/league_tables.json".format(league), 'w+' )) json.dump(all_settings, open( "csv/league_tables.json".format(league), 'w+' ))
except Exception as e: except Exception as e:
raise e
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
logf.write(str(e)) logf.write(str(e))
@ -444,6 +450,7 @@ def updateLeagueEvents(api_key, time):
try: try:
all_settings = json.load(f) all_settings = json.load(f)
print(all_settings['leagues'].keys())
f.close() f.close()
leagues = all_settings['leagues'].keys() leagues = all_settings['leagues'].keys()
leagues_info = {} leagues_info = {}
@ -463,32 +470,34 @@ def updateLeagueEvents(api_key, time):
#print(all_data) #print(all_data)
#events = []
#for league in all_data.keys():
#for d in all_data[league]:
#event = {}
#event['date'] = d['dateEvent']
#if time == 'live': for league in all_data.keys():
events = []
for d in all_data[league]:
event = {}
event['date'] = d['dateEvent']
#event['progess'] = d['strProgress'] if time == 'live':
#event['status'] = d['strStatus']
#else:
#event['round'] = d['intRound'] event['progess'] = d['strProgress']
#event['time'] = d['strTime'] event['status'] = d['strStatus']
#event['home_team'] = d['strHomeTeam'] else:
#event['away_team'] = d['strAwayTeam'] event['round'] = d['intRound']
event['time'] = d['strTime']
event['home_team'] = d['strHomeTeam']
#if time != 'upcoming': event['away_team'] = d['strAwayTeam']
#event['away_score'] = d['intAwayScore']
#event['home_score'] = d['intHomeScore']
#events.append(event) if time != 'upcoming':
#leagues_info[league.upper()] = events event['away_score'] = d['intAwayScore']
all_settings['leagues'] = all_data event['home_score'] = d['intHomeScore']
events.append(event)
leagues_info[league.upper()] = events
all_settings['leagues'] = leagues_info
print(all_settings['leagues'].keys())
json.dump(all_settings, open( "csv/{}_games.json".format(time), 'w+' )) json.dump(all_settings, open( "csv/{}_games.json".format(time), 'w+' ))
except Exception as e: except Exception as e:
@ -749,7 +758,6 @@ if __name__ == '__main__':
except Exception as e: except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
logf.write(str(e)) logf.write(str(e))

View File

@ -6,24 +6,25 @@ rm -rf user_uploads
mkdir user_uploads mkdir user_uploads
rm -rf csv
mkdir csv mkdir csv
cd csv cd csv
touch coin_list.json last_update.csv scroll_text.csv crypto_settings.json last_updates.json settings.csv system_info.json rm *.json
touch currency.json league_tables.json touch coin_list.json crypto_settings.json last_updates.json system_info.json
touch league_tables.json
mkdir sports mkdir sports
touch current_weather.json stocks_settings.json daily_weather.json live_games.json touch current_weather.json stocks_settings.json daily_weather.json live_games.json
touch display_settings.json message_settings.json upcoming_games.json forex_settings.json multiple.csv touch display_settings.json message_settings.json upcoming_games.json forex_settings.json
touch GIF_settings.json news_settings.json image_settings.json past_games.json general_settings.json touch GIF_settings.json news_settings.json image_settings.json past_games.json general_settings.json
filenames="coin_list.json last_update.csv scroll_text.csv crypto_settings.json last_updates.json settings.csv league_tables.json current_weather.json stocks_settings.json daily_weather.json live_games.json display_settings.json message_settings.json upcoming_games.json forex_settings.json multiple.csv GIF_settings.json news_settings.json image_settings.json past_games.json" filenames="crypto_settings.json last_updates.json league_tables.json current_weather.json stocks_settings.json daily_weather.json live_games.json display_settings.json message_settings.json upcoming_games.json forex_settings.json GIF_settings.json news_settings.json image_settings.json past_games.json"
echo '{"update_available": false, "first_boot": true}' >> system_info.json echo '{"update_available": false, "first_boot": true}' >> system_info.json
echo [\"Standard\", [[\"Stocks\", \"Crypto\", \"Forex\"]]] >> display_settings.json echo [\"Standard\", [[\"Stocks\", \"Crypto\", \"Forex\"]]] >> display_settings.json
echo hello world!,255,255,0 >> scroll_text.csv
echo '{"feature": "Stocks", "speed": "medium", "animation": "down", "percent": false, "point": true, "logos": true, "chart": false, "title": true, "symbols": {"ETH,USD": {"current": "2629.32", "24hr_change": "-27.6432", "percent_change": "-1.04"}, "BTC,USD": {"current": "38161.00", "24hr_change": "-50.8386", "percent_change": "-0.13"}, "BNB,USD": {"current": "372.57", "24hr_change": "0.4140", "percent_change": "0.11"}, "ADA,BTC": {"current": "0.0000", "24hr_change": "-0.0000", "percent_change": "-3.74"}}}' >> crypto_settings.json echo '{"feature": "Stocks", "speed": "medium", "animation": "down", "percent": false, "point": true, "logos": true, "chart": false, "title": true, "symbols": {"ETH,USD": {"current": "2629.32", "24hr_change": "-27.6432", "percent_change": "-1.04"}, "BTC,USD": {"current": "38161.00", "24hr_change": "-50.8386", "percent_change": "-0.13"}, "BNB,USD": {"current": "372.57", "24hr_change": "0.4140", "percent_change": "0.11"}, "ADA,BTC": {"current": "0.0000", "24hr_change": "-0.0000", "percent_change": "-3.74"}}}' >> crypto_settings.json
echo -e "speed,brightness\nf,3" >> settings.csv
echo '{"feature": "Sports (Team Stats)", "speed": "medium", "animation": "down", "title": true, "leagues": {}}' >> league_tables.json echo '{"feature": "Sports (Team Stats)", "speed": "medium", "animation": "down", "title": true, "leagues": {}}' >> league_tables.json
echo {\"feature\": \"Current Weather\", \"speed\": \"medium\", \"animation\": \"down\", \"temp\": \"celsius\", \"wind_speed\": \"miles/sec\", \"colour\": \"white\", \"city_colour\": \"yellow\", \"title\": true, \"locations\": {}, \"current_weather\": true} >> current_weather.json echo {\"feature\": \"Current Weather\", \"speed\": \"medium\", \"animation\": \"down\", \"temp\": \"celsius\", \"wind_speed\": \"miles/sec\", \"colour\": \"white\", \"city_colour\": \"yellow\", \"title\": true, \"locations\": {}, \"current_weather\": true} >> current_weather.json
@ -39,46 +40,9 @@ echo '{"speed": "slow", "animation": "down", "title": true, "pause": "/", "image
echo '{"feature": "Sports (Past Games)", "speed": "medium", "animation": "down", "title": true, "leagues": {}}' >> past_games.json echo '{"feature": "Sports (Past Games)", "speed": "medium", "animation": "down", "title": true, "leagues": {}}' >> past_games.json
echo '{"brightness": 10, "country_code": "GB", "hostname": "fintic"}' >> general_settings.json echo '{"brightness": 10, "country_code": "GB", "hostname": "fintic"}' >> general_settings.json
cd sports
mkdir NBA
mkdir NFL
mkdir NHL
mkdir 'Premier League'
cd NBA
touch future_games.json live_games.json past_games.json team_info.csv team_stats.json
echo [] >> future_games.json
echo [] >> live_games.json
echo [] >> past_games.json
echo [] >> team_info.csv
echo [] >> team_stats.json
cd ..
cd NFL
touch future_games.json live_games.json past_games.json team_info.csv team_stats.json
echo [] >> future_games.json
echo [] >> live_games.json
echo [] >> past_games.json
echo [] >> team_info.csv
echo [] >> team_stats.json
cd ..
cd NHL
touch future_games.json live_games.json past_games.json team_info.csv team_stats.json
echo [] >> future_games.json
echo [] >> live_games.json
echo [] >> past_games.json
echo [] >> team_info.csv
echo [] >> team_stats.json
cd ..
cd 'Premier League'
touch future_games.json live_games.json past_games.json team_info.csv team_stats.json
echo [] >> future_games.json
echo [] >> live_games.json
echo [] >> past_games.json
echo [] >> team_info.csv
echo [] >> team_stats.json
cd ../../.. cd ../../..
sudo chmod -R ugo+rwx csv sudo chmod -R ugo+rwx csv

View File

@ -1591,14 +1591,14 @@ class StockTicker():
buff_size = 25 buff_size = 25
for match in league_info: for match in league_info:
strHomeTeam = match['strHomeTeam'] strHomeTeam = match['home_team']
strAwayTeam = match['strAwayTeam'] strAwayTeam = match['away_team']
if time != 'future': if time != 'future':
intHomeScore = str(match['intHomeScore']) intHomeScore = str(match['home_score'])
intAwayScore = str(match['intAwayScore']) intAwayScore = str(match['away_score'])
dateEvent = match['dateEvent'].replace('-', '.') dateEvent = match['date'].replace('-', '.')
#rond = match['round'] #rond = match['round']

0
version.txt Normal file → Executable file
View File