-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_roster.py
executable file
·70 lines (67 loc) · 1.54 KB
/
add_roster.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
from database_connection import DbConnection
ROSTERS = {
"2021": ["Anna",
"Brad",
"Brandon",
"Carol",
"Greg",
"Isaac",
"Jake",
"Jamila",
"Katie",
"Lance",
"Nate La",
"Phil",
"Ruthie",
"Ryan",
"Ted",
"Walt"],
"2022": ["Brandon",
"Carol",
"Chad",
"Greg",
"Hunter",
"Ian",
"Josh",
"Lance",
"Luke",
"Matthew",
"Nate Lo",
"Phil",
"Ryan",
"Shane",
"Ted",
"Walt",
"Zach"],
"2023": ["Brandon",
"Cam",
"Carol",
"Chad",
"Greg",
"Hunter",
"Ian",
"Josh",
"Luke",
"Moises",
"Nate Lo",
"Nate Ly",
"Paul",
"Phil",
"Ryan",
"Ron",
"Shane",
"Steve",
"Ted",
"Zach"
]
}
def add_roster(year):
db = DbConnection('root', 'winnie2', False)
db.verify_players_exist_in_database(ROSTERS[str(year)])
for p in ROSTERS[str(year)]:
print(f'adding {p} to {year} roster')
db.insert_roster_item(year, p)
if __name__ == '__main__':
add_roster(2021)
add_roster(2022)
add_roster(2023)