diff --git a/assets/sports/all_team_abbreviations.txt b/assets/sports/all_team_abbreviations.txt index 146b3da2..4397af35 100644 --- a/assets/sports/all_team_abbreviations.txt +++ b/assets/sports/all_team_abbreviations.txt @@ -1,404 +1,53 @@ NCAAF - AAMU => Alabama A&M Bulldogs - ACU => Abilene Christian Wildcats - ADA => Adams State Grizzlies - ADR => Adrian Bulldogs - AFA => Air Force Falcons - AIC => American International Yellow Jackets - AKR => Akron Zips - ALA => Alabama Crimson Tide - ALB => Albright Lions - ALBS => Albany State (GA) Golden Rams - ALCN => Alcorn State Braves - ALD => Alderson Broaddus Battlers - ALF => Alfred Saxons - ALL => Allegheny Gators - ALST => Alabama State Hornets - AMH => Amherst College Mammoths - AND => Anderson (IN) Ravens - ANG => Angelo State Rams + AMH => Amherst Mammoths ANN => Anna Maria College Amcats - APP => Appalachian State Mountaineers - APSU => Austin Peay Governors ARIZ => Arizona Wildcats - ARK => Arkansas-Monticello Boll Weevils - ARMY => Army Black Knights - ARST => Arkansas State Red Wolves - ASH => Ashland Eagles - ASP => Assumption Greyhounds + ARK => Arkansas Razorbacks ASU => Arizona State Sun Devils AUB => Auburn Tigers - AUG => St. Augustine's Falcons - AUR => Aurora Spartans - AUS => Austin College 'Roos - AVE => Averett Cougars - AVI => Avila College Eagles - AZU => Azusa Pacific Cougars - BAK => Baker University Wildcats - BAL => Baldwin Wallace Yellow Jackets - BALL => Ball State Cardinals - BAT => Bates College Bobcats - BAY => Baylor Bears - BC => Boston College Eagles - BEC => Becker College Hawks - BEL => Beloit College Buccaneers - BEN => Benedictine University (IL) Eagles - BENT => Bentley Falcons - BET => Bethel (TN) Wildcats - BGSU => Bowling Green Falcons - BHS => Black Hills State Yellow Jackets - BIR => Birmingham-Southern Panthers - BKN => Bacone College Warriors - BLA => Blackburn Beavers - BLOM => Bloomsburg Huskies - BLU => Bluffton Beavers - BOW => Bowdoin Polar Bears - BRI => British Columbia Thunderbirds - BRWN => Brown Bears - BST => Bemidji State Beavers - BSU => Bowie State Bulldogs - BUCK => Bucknell Bison - BUE => Buena Vista Beavers - BUF => Buffalo State Bengals - BUFF => Buffalo Bulls - BUT => Butler Bulldogs - BYU => BYU Cougars - CAL => California Lutheran Kingsmen - CAM => Campbell Fighting Camels - CAP => Capital University Crusaders - CAR => Carthage College Red Men - CARK => Central Arkansas Bears - CAS => Castleton Spartans - CAT => Catholic University Cardinals - CCSU => Central Connecticut Blue Devils - CCU => Coastal Carolina Chanticleers - CEN => Centre College Colonels - CHA => Chapman University Panthers - CHI => Chicago Maroons - CHSO => Charleston Southern Buccaneers - CIN => Cincinnati Bearcats - CLA => Clarion Golden Eagles - CLEM => Clemson Tigers - CLMB => Columbia Lions - CLT => Charlotte 49ers - CMU => Central Michigan Chippewas - COE => Coe College Kohawks - COL => Colorado School of Mines Orediggers - COLC => Colorado College Tigers - COLG => Colgate Raiders + BOIS => Boise State Broncos + BRST => Bridgewater State Bears + BUENA => Buena Vista Beavers + CAL => California Golden Bears + CAR => Carroll University (WI) Pioneers + CLA => Claremont-Mudd-Scripps College Stags + COLBY => Colby College White Mules COLO => Colorado Buffaloes - CON => Concordia-Minnesota Cobbers - COR => Cornell College (IA) Rams + CONN => UConn Huskies CP => Cal Poly Mustangs - CRO => Crown Storm CSU => Colorado State Rams - CUL => Culver-Stockton Wildcats - CUM => Cumberland College Indians CUR => Curry College Colonels - DAK => Dakota Wesleyan Tigers - DART => Dartmouth Big Green - DAV => Davidson Wildcats - DAY => Dayton Flyers - DEF => Defiance Yellow Jackets - DEL => Delta State Statesmen - DEN => Denison Big Red - DEP => DePauw Tigers - DIC => Dickinson State Blue Hawks - DRKE => Drake Bulldogs - DSU => Delaware State Hornets + DEL => Delaware Blue Hens DUB => Dubuque Spartans - DUKE => Duke Blue Devils - DUQ => Duquesne Dukes - EAS => Eastern New Mexico Greyhounds - ECU => East Carolina Pirates - EDI => Edinboro Fighting Scots - EIU => Eastern Illinois Panthers - EKU => Eastern Kentucky Colonels - ELI => Elizabeth City State Vikings - ELM => Elmhurst Blue Jays - ELON => Elon Phoenix - EMO => Emory & Henry Wasps - EMP => Emporia State Hornets - EMU => Eastern Michigan Eagles - END => Endicott College Gulls - EOR => Eastern Oregon Mountaineers - ETSU => East Tennessee State Buccaneers - EUR => Eureka College Red Devils - EWU => Eastern Washington Eagles - FAU => Florida Atlantic Owls - FAY => Fayetteville State Broncos - FDU => FDU-Florham Devils - FER => Ferrum Panthers - FIN => Findlay Oilers - FIT => Fitchburg State Falcons - FIU => Florida International Panthers + ELM => Elmhurst Bluejays + FAMU => Florida A&M Rattlers FLA => Florida Gators - FOR => Fort Valley State Wildcats - FRA => Franklin Grizzlies - FRES => Fresno State Bulldogs - FRO => Frostburg State Bobcats - FRST => Ferris State Bulldogs FSU => Florida State Seminoles - FTLW => Fort Lewis Skyhawks - FUR => Furman Paladins - GAL => Gallaudet Bison - GAN => Gannon Golden Knights - GASO => Georgia Southern Eagles - GAST => Georgia State Panthers - GEN => Geneva College Golden Tornadoes - GEO => George Fox University Bruins - GET => Gettysburg Bullets - GLE => Glenville State Pioneers - GMU => George Mason Patriots - GRA => Grand Valley State Lakers - GRE => Greenville Panthers GRI => Grinnell Pioneers - GRO => Grove City College Wolverines GT => Georgia Tech Yellow Jackets - GUI => Guilford Quakers - GWEB => Gardner-Webb Bulldogs - HAM => Hampden-Sydney Tigers - HAMP => Hampton Pirates - HAN => Hanover Panthers - HAR => Hartwick Hawks - HARV => Harvard Crimson - HAS => Haskell Indian Nations Jayhawks + GTWN => Georgetown Hoyas HAW => Hawai'i Rainbow Warriors - HBU => Houston Baptist Huskies - HC => Holy Cross Crusaders - HEI => Heidelberg Student Princes - HEN => Hendrix College Warriors - HIL => Hillsdale Chargers - HIR => Hiram College Terriers - HOB => Hobart Statesmen - HOU => Houston Cougars HOW => Howard Bison - HUS => Husson Eagles IDHO => Idaho Vandals - IDST => Idaho State Bengals - ILL => Illinois Fighting Illini - ILST => Illinois State Redbirds - ILW => Illinois Wesleyan Titans - IND => Indianapolis - INST => Indiana State Sycamores - IOW => Iowa Wesleyan Tigers - IOWA => Iowa Hawkeyes ISU => Iowa State Cyclones - ITH => Ithaca Bombers - IU => Indiana Hoosiers - JKST => Jackson State Tigers - JMU => James Madison Dukes - JOH => Johnson C Smith Golden Bulls - JUN => Juniata Eagles - JVST => Jacksonville State Gamecocks - KAL => Kalamazoo Hornets - KAN => Kansas Wesleyan University Coyotes - KEN => Kenyon Lords - KENN => Kennesaw State Owls - KENT => Kent State Golden Flashes - KIN => King's College (PA) Monarchs - KNO => Knox College Prairie Fire - KSU => Kansas State Wildcats - KU => Kansas Jayhawks - KUT => Kutztown Golden Bears - KYST => Kentucky State Thorobreds - KYW => Kentucky Wesleyan Panthers - LA => La Verne Leopards - LAC => Lane Dragons - LAF => Lafayette Leopards - LAG => LaGrange College Panthers - LAK => Lake Forest Foresters - LAM => Lambuth Eagles - LAN => Langston Lions - LAW => Lawrence Vikings - LEB => Lebanon Valley Flying Dutchmen - LEH => Lehigh Mountain Hawks - LEN => Lenoir-Rhyne Bears - LEW => Lewis & Clark Pioneers - LIB => Liberty Flames - LIM => Limestone Saints - LIN => Linfield Wildcats - LOC => Lock Haven Bald Eagles - LOR => Loras College Duhawks - LOU => Louisville Cardinals - LSU => LSU Tigers - LT => Louisiana Tech Bulldogs + JXST => Jacksonville State Gamecocks LUT => Luther Norse - LYC => Lycoming Warriors - M-OH => Miami (OH) RedHawks - MAC => Macalester Scots - MAI => Maine Maritime Mariners - MAN => Mansfield Mountaineers - MAR => Maryville College Fighting Scots - MAS => Mass Maritime Buccaneers - MASS => UMass Minutemen - MAY => Mayville State Comets - MCM => McMurry War Hawks - MCN => McNeese Cowboys - MD => Maryland Terrapins - MEM => Memphis Tigers - MEN => Menlo College Oaks - MER => Merchant Marine Mariners - MERC => Mercyhurst Lakers - MES => Colorado Mesa Mavericks - MET => Methodist Monarchs - MH => Mars Hill Mountain Lions - MIAMI => Miami Hurricanes - MICH => Michigan Wolverines - MID => Midwestern State Mustangs - MIL => Millsaps Majors - MIN => Minot State Beavers - MINN => Minnesota Golden Gophers - MIS => Missouri Western Griffons - MISS => Ole Miss Rebels - MIZ => Missouri Tigers - MNST => Minnesota State Mavericks - MONM => Monmouth Hawks - MONT => Montana Grizzlies - MOR => Morningside Chiefs - MORE => Morehead State Eagles - MORG => Morgan State Bears - MOU => Mount Union Raiders - MRSH => Marshall Thundering Herd - MRST => Marist Red Foxes - MSST => Mississippi State Bulldogs - MSU => Michigan State Spartans - MTST => Montana State Bobcats - MTSU => Middle Tennessee Blue Raiders - MTU => Michigan Tech Huskies - MUH => Muhlenberg Mules - MUR => Murray State Racers - MUS => Muskingum Fighting Muskies - MVSU => Mississippi Valley State Delta Devils - NAU => Northern Arizona Lumberjacks - NAVY => Navy Midshipmen - NBY => Newberry Wolves - NCAT => North Carolina A&T Aggies - NCCU => North Carolina Central Eagles - NCST => NC State Wolfpack - ND => Notre Dame Fighting Irish - NDOH => Notre Dame College Falcons - NDSU => North Dakota State Bison - NEB => Nebraska-Kearney Lopers - NEV => Nevada Wolf Pack - NH => New Haven Chargers - NICH => Nicholls Colonels - NIU => Northern Illinois Huskies - NMH => New Mexico Highlands Cowboys - NMI => Northern Michigan Wildcats - NMSU => New Mexico State Aggies - NOR => Univ. of Northwestern-St. Paul Eagles - NORF => Norfolk State Spartans - NW => Northwestern Wildcats - OBE => Oberlin Yeomen - ODU => Old Dominion Monarchs - OHI => Ohio Northern Polar Bears - OHIO => Ohio Bobcats - OKL => Oklahoma Baptist Bison - OKST => Oklahoma State Cowboys - OLI => Olivet College Comets - OMA => Omaha Mavericks - ORST => Oregon State Beavers - OSU => Ohio State Buckeyes - OTT => Otterbein Cardinals - OU => Oklahoma Sooners - PAC => Pacific (OR) Boxers - PENN => Pennsylvania Quakers - PIKE => Pikeville Bears - PITT => Pittsburgh Panthers - PRE => Presentation College Saints - PRI => Principia College Panthers - PRIN => Princeton Tigers - PST => Pittsburg State Gorillas - PSU => Penn State Nittany Lions + MESA => Colorado Mesa Mavericks + MIL => Millikin Big Blue + MOR => Morehouse College Maroon Tigers + NOR => North Park Vikings RED => Redlands Bulldogs - RICE => Rice Owls - RICH => Richmond Spiders - RIT => Rochester Yellow Jackets - ROB => Robert Morris (IL) Eagles - ROS => Rose-Hulman Engineers - RUTG => Rutgers Scarlet Knights SAC => Sacramento State Hornets - SAG => Saginaw Valley Cardinals - SDAK => South Dakota Coyotes SDSU => San Diego State Aztecs - SET => Seton Hill Griffins - SIU => Southern Illinois Salukis SJSU => San José State Spartans - SLI => Slippery Rock The Rock - SOU => Southwestern College Moundbuilders - SPR => Springfield College Pride - ST => St. Scholastica Saints STAN => Stanford Cardinal - STE => Stevenson University Mustangs STET => Stetson Hatters - STO => Stonehill College Skyhawks - SUS => Susquehanna University River Hawks - SUU => Southern Utah Thunderbirds - SYR => Syracuse Orange - TA&M => Texas A&M Aggies - TAY => Taylor Trojans - TEM => Temple Owls - TEX => Texas Longhorns - TIF => Tiffin University Dragons - TLSA => Tulsa Golden Hurricane - TRI => Trinity University (TX) Tigers - TUF => Tufts University Jumbos - TXST => Texas State Bobcats UAB => UAB Blazers - UAPB => Arkansas-Pine Bluff Golden Lions - UCD => UC Davis Aggies - UCF => UCF Knights UCLA => UCLA Bruins - UCONN => UConn Huskies UGA => Georgia Bulldogs - UK => Kentucky Wildcats - UL => Louisiana Ragin' Cajuns - ULM => UL Monroe Warhawks - UMD => Minnesota-Duluth Bulldogs - UMDA => UMASS Dartmouth Corsairs - UML => UMass Lowell River Hawks - UNA => North Alabama Lions - UNC => North Carolina Tar Heels - UNCO => Northern Colorado Bears - UND => North Dakota Fighting Hawks - UNH => New Hampshire Wildcats - UNI => University of Mary Marauders - UNLV => UNLV Rebels - UNM => New Mexico Lobos - UNNY => Union Dutchmen - UNT => North Texas Mean Green - UPP => Upper Iowa Peacocks - URI => Rhode Island Rams USA => South Alabama Jaguars USC => USC Trojans - USD => San Diego Toreros USF => South Florida Bulls - USU => Utah State Aggies - UTAH => Utah Utes - UTC => Chattanooga Mocs - UTI => Utica College Pioneers - UVA => Virginia Cavaliers - VAL => Valley City State Vikings - VAN => Vanderbilt Commodores - VILL => Villanova Wildcats - VIR => Virginia State Trojans - VT => Virginia Tech Hokies - WAB => Wabash College Little Giants - WAKE => Wake Forest Demon Deacons - WAS => Washington-Missouri Bears - WASH => Washington Huskies - WAY => Wayne State (MI) Warriors - WES => Westminster College (MO) Blue Jays - WHE => Wheaton College Illinois Thunder - WIL => Wilkes University Colonels - WIN => Wingate Bulldogs - WIS => Wisconsin-Platteville Pioneers - WISC => Wisconsin Badgers - WKU => Western Kentucky Hilltoppers - WOR => Worcester State College Lancers - WSU => Washington State Cougars - WVU => West Virginia Mountaineers YALE => Yale Bulldogs NBA diff --git a/assets/sports/ncaa_fbs_logos/ARIZ.png b/assets/sports/ncaa_fbs_logos/ARIZ.png index 39d3ec2b..bd17bbc3 100644 Binary files a/assets/sports/ncaa_fbs_logos/ARIZ.png and b/assets/sports/ncaa_fbs_logos/ARIZ.png differ diff --git a/assets/sports/ncaa_fbs_logos/ARK.png b/assets/sports/ncaa_fbs_logos/ARK.png index f5818113..870c0e1c 100644 Binary files a/assets/sports/ncaa_fbs_logos/ARK.png and b/assets/sports/ncaa_fbs_logos/ARK.png differ diff --git a/assets/sports/ncaa_fbs_logos/AUB.png b/assets/sports/ncaa_fbs_logos/AUB.png index bb46c898..fcd97fab 100644 Binary files a/assets/sports/ncaa_fbs_logos/AUB.png and b/assets/sports/ncaa_fbs_logos/AUB.png differ diff --git a/assets/sports/ncaa_fbs_logos/CAL.png b/assets/sports/ncaa_fbs_logos/CAL.png index a1ec63a5..ebc43156 100644 Binary files a/assets/sports/ncaa_fbs_logos/CAL.png and b/assets/sports/ncaa_fbs_logos/CAL.png differ diff --git a/assets/sports/ncaa_fbs_logos/COLO.png b/assets/sports/ncaa_fbs_logos/COLO.png index 1860844e..42ba2d55 100644 Binary files a/assets/sports/ncaa_fbs_logos/COLO.png and b/assets/sports/ncaa_fbs_logos/COLO.png differ diff --git a/assets/sports/ncaa_fbs_logos/CONN.png b/assets/sports/ncaa_fbs_logos/CONN.png index fe85a48f..1114466e 100644 Binary files a/assets/sports/ncaa_fbs_logos/CONN.png and b/assets/sports/ncaa_fbs_logos/CONN.png differ diff --git a/assets/sports/ncaa_fbs_logos/FSU.png b/assets/sports/ncaa_fbs_logos/FSU.png index 289d1c2e..9a3be669 100644 Binary files a/assets/sports/ncaa_fbs_logos/FSU.png and b/assets/sports/ncaa_fbs_logos/FSU.png differ diff --git a/assets/sports/ncaa_fbs_logos/GT.png b/assets/sports/ncaa_fbs_logos/GT.png index 36c0ca88..228b8fdb 100644 Binary files a/assets/sports/ncaa_fbs_logos/GT.png and b/assets/sports/ncaa_fbs_logos/GT.png differ diff --git a/assets/sports/ncaa_fbs_logos/ISU.png b/assets/sports/ncaa_fbs_logos/ISU.png index 59ffd882..c59e3753 100644 Binary files a/assets/sports/ncaa_fbs_logos/ISU.png and b/assets/sports/ncaa_fbs_logos/ISU.png differ diff --git a/assets/sports/ncaa_fbs_logos/SDSU.png b/assets/sports/ncaa_fbs_logos/SDSU.png index f22e4720..f73ee988 100644 Binary files a/assets/sports/ncaa_fbs_logos/SDSU.png and b/assets/sports/ncaa_fbs_logos/SDSU.png differ diff --git a/assets/sports/ncaa_fbs_logos/SJSU.png b/assets/sports/ncaa_fbs_logos/SJSU.png index 8aa897f7..dbffbcc7 100644 Binary files a/assets/sports/ncaa_fbs_logos/SJSU.png and b/assets/sports/ncaa_fbs_logos/SJSU.png differ diff --git a/assets/sports/ncaa_fbs_logos/STAN.png b/assets/sports/ncaa_fbs_logos/STAN.png index 9db08295..36dc600f 100644 Binary files a/assets/sports/ncaa_fbs_logos/STAN.png and b/assets/sports/ncaa_fbs_logos/STAN.png differ diff --git a/assets/sports/ncaa_fbs_logos/UAB.png b/assets/sports/ncaa_fbs_logos/UAB.png index 05884167..854220a7 100644 Binary files a/assets/sports/ncaa_fbs_logos/UAB.png and b/assets/sports/ncaa_fbs_logos/UAB.png differ diff --git a/assets/sports/ncaa_fbs_logos/UCLA.png b/assets/sports/ncaa_fbs_logos/UCLA.png index b9dd253e..216f392c 100644 Binary files a/assets/sports/ncaa_fbs_logos/UCLA.png and b/assets/sports/ncaa_fbs_logos/UCLA.png differ diff --git a/assets/sports/ncaa_fbs_logos/UGA.png b/assets/sports/ncaa_fbs_logos/UGA.png index e7eddbd8..53175cff 100644 Binary files a/assets/sports/ncaa_fbs_logos/UGA.png and b/assets/sports/ncaa_fbs_logos/UGA.png differ diff --git a/assets/sports/ncaa_fbs_logos/USC.png b/assets/sports/ncaa_fbs_logos/USC.png index 2fb2c5d5..84c2711e 100644 Binary files a/assets/sports/ncaa_fbs_logos/USC.png and b/assets/sports/ncaa_fbs_logos/USC.png differ diff --git a/assets/sports/ncaa_fbs_logos/USF.png b/assets/sports/ncaa_fbs_logos/USF.png index 2aaf3858..c1b4c5b6 100644 Binary files a/assets/sports/ncaa_fbs_logos/USF.png and b/assets/sports/ncaa_fbs_logos/USF.png differ diff --git a/test/download_espn_ncaa_fb_logos.py b/test/download_espn_ncaa_fb_logos.py new file mode 100644 index 00000000..54afc90c --- /dev/null +++ b/test/download_espn_ncaa_fb_logos.py @@ -0,0 +1,192 @@ +#!/usr/bin/env python3 +""" +Script to download all NCAA Football team logos from ESPN API +and update the all_team_abbreviations.txt file with current ESPN abbreviations. +""" + +import os +import requests +import json +from pathlib import Path +import time + +def create_logo_directory(): + """Create the ncaaFBlogos directory if it doesn't exist.""" + logo_dir = Path("test/ncaaFBlogos") + logo_dir.mkdir(parents=True, exist_ok=True) + return logo_dir + +def fetch_teams_data(): + """Fetch team data from ESPN API.""" + url = "https://site.api.espn.com/apis/site/v2/sports/football/college-football/teams" + + try: + response = requests.get(url, timeout=30) + response.raise_for_status() + return response.json() + except requests.exceptions.RequestException as e: + print(f"Error fetching teams data: {e}") + return None + +def download_logo(url, filepath, team_name): + """Download a logo from URL and save to filepath.""" + try: + response = requests.get(url, timeout=30) + response.raise_for_status() + + with open(filepath, 'wb') as f: + f.write(response.content) + + print(f"✓ Downloaded: {team_name} -> {filepath.name}") + return True + + except requests.exceptions.RequestException as e: + print(f"✗ Failed to download {team_name}: {e}") + return False + +def normalize_abbreviation(abbreviation): + """Normalize team abbreviation to lowercase for filename.""" + return abbreviation.lower() + +def update_abbreviations_file(teams_data, abbreviations_file_path): + """Update the all_team_abbreviations.txt file with current ESPN abbreviations.""" + print(f"\nUpdating abbreviations file: {abbreviations_file_path}") + + # Read existing file + existing_content = [] + if os.path.exists(abbreviations_file_path): + with open(abbreviations_file_path, 'r', encoding='utf-8') as f: + existing_content = f.readlines() + + # Find the NCAAF section + ncaaf_start = -1 + ncaaf_end = -1 + + for i, line in enumerate(existing_content): + if line.strip() == "NCAAF": + ncaaf_start = i + elif ncaaf_start != -1 and line.strip() and not line.startswith(" "): + ncaaf_end = i + break + + if ncaaf_start == -1: + print("Warning: Could not find NCAAF section in abbreviations file") + return + + if ncaaf_end == -1: + ncaaf_end = len(existing_content) + + # Extract teams from ESPN data + espn_teams = [] + for team_data in teams_data: + team = team_data.get('team', {}) + abbreviation = team.get('abbreviation', '') + display_name = team.get('displayName', '') + + if abbreviation and display_name: + espn_teams.append((abbreviation, display_name)) + + # Sort teams by abbreviation + espn_teams.sort(key=lambda x: x[0]) + + # Create new NCAAF section + new_ncaaf_section = ["NCAAF\n"] + for abbreviation, display_name in espn_teams: + new_ncaaf_section.append(f" {abbreviation} => {display_name}\n") + new_ncaaf_section.append("\n") + + # Reconstruct the file + new_content = ( + existing_content[:ncaaf_start] + + new_ncaaf_section + + existing_content[ncaaf_end:] + ) + + # Write updated file + with open(abbreviations_file_path, 'w', encoding='utf-8') as f: + f.writelines(new_content) + + print(f"✓ Updated abbreviations file with {len(espn_teams)} NCAAF teams") + +def main(): + """Main function to download all NCAA FB team logos and update abbreviations.""" + print("Starting NCAA Football logo download and abbreviations update...") + + # Create directory + logo_dir = create_logo_directory() + print(f"Created/verified directory: {logo_dir}") + + # Fetch teams data + print("Fetching teams data from ESPN API...") + data = fetch_teams_data() + + if not data: + print("Failed to fetch teams data. Exiting.") + return + + # Extract teams + teams = [] + try: + sports = data.get('sports', []) + for sport in sports: + leagues = sport.get('leagues', []) + for league in leagues: + teams = league.get('teams', []) + break + except (KeyError, IndexError) as e: + print(f"Error parsing teams data: {e}") + return + + print(f"Found {len(teams)} teams") + + # Download logos + downloaded_count = 0 + failed_count = 0 + + for team_data in teams: + team = team_data.get('team', {}) + + # Extract team information + abbreviation = team.get('abbreviation', '') + display_name = team.get('displayName', 'Unknown') + logos = team.get('logos', []) + + if not abbreviation or not logos: + print(f"⚠ Skipping {display_name}: missing abbreviation or logos") + continue + + # Get the default logo (first one is usually default) + logo_url = logos[0].get('href', '') + if not logo_url: + print(f"⚠ Skipping {display_name}: no logo URL") + continue + + # Create filename + filename = f"{normalize_abbreviation(abbreviation)}.png" + filepath = logo_dir / filename + + # Skip if already exists + if filepath.exists(): + print(f"⏭ Skipping {display_name}: {filename} already exists") + continue + + # Download logo + if download_logo(logo_url, filepath, display_name): + downloaded_count += 1 + else: + failed_count += 1 + + # Small delay to be respectful to the API + time.sleep(0.1) + + print(f"\nDownload complete!") + print(f"✓ Successfully downloaded: {downloaded_count} logos") + print(f"✗ Failed downloads: {failed_count}") + print(f"📁 Logos saved in: {logo_dir}") + + # Update abbreviations file + abbreviations_file_path = "assets/sports/all_team_abbreviations.txt" + update_abbreviations_file(teams, abbreviations_file_path) + +if __name__ == "__main__": + main() diff --git a/test/ncaaFBlogos/amh.png b/test/ncaaFBlogos/amh.png new file mode 100644 index 00000000..c9f3ca86 Binary files /dev/null and b/test/ncaaFBlogos/amh.png differ diff --git a/test/ncaaFBlogos/ann.png b/test/ncaaFBlogos/ann.png new file mode 100644 index 00000000..6c61e18b Binary files /dev/null and b/test/ncaaFBlogos/ann.png differ diff --git a/test/ncaaFBlogos/ariz.png b/test/ncaaFBlogos/ariz.png new file mode 100644 index 00000000..bd17bbc3 Binary files /dev/null and b/test/ncaaFBlogos/ariz.png differ diff --git a/test/ncaaFBlogos/ark.png b/test/ncaaFBlogos/ark.png new file mode 100644 index 00000000..870c0e1c Binary files /dev/null and b/test/ncaaFBlogos/ark.png differ diff --git a/test/ncaaFBlogos/asu.png b/test/ncaaFBlogos/asu.png new file mode 100644 index 00000000..ec9e1162 Binary files /dev/null and b/test/ncaaFBlogos/asu.png differ diff --git a/test/ncaaFBlogos/aub.png b/test/ncaaFBlogos/aub.png new file mode 100644 index 00000000..fcd97fab Binary files /dev/null and b/test/ncaaFBlogos/aub.png differ diff --git a/test/ncaaFBlogos/bois.png b/test/ncaaFBlogos/bois.png new file mode 100644 index 00000000..ccbd604e Binary files /dev/null and b/test/ncaaFBlogos/bois.png differ diff --git a/test/ncaaFBlogos/brst.png b/test/ncaaFBlogos/brst.png new file mode 100644 index 00000000..e6bba244 Binary files /dev/null and b/test/ncaaFBlogos/brst.png differ diff --git a/test/ncaaFBlogos/buena.png b/test/ncaaFBlogos/buena.png new file mode 100644 index 00000000..88c443b3 Binary files /dev/null and b/test/ncaaFBlogos/buena.png differ diff --git a/test/ncaaFBlogos/cal.png b/test/ncaaFBlogos/cal.png new file mode 100644 index 00000000..ebc43156 Binary files /dev/null and b/test/ncaaFBlogos/cal.png differ diff --git a/test/ncaaFBlogos/car.png b/test/ncaaFBlogos/car.png new file mode 100644 index 00000000..dff64804 Binary files /dev/null and b/test/ncaaFBlogos/car.png differ diff --git a/test/ncaaFBlogos/cla.png b/test/ncaaFBlogos/cla.png new file mode 100644 index 00000000..30eefb63 Binary files /dev/null and b/test/ncaaFBlogos/cla.png differ diff --git a/test/ncaaFBlogos/colby.png b/test/ncaaFBlogos/colby.png new file mode 100644 index 00000000..5df6982f Binary files /dev/null and b/test/ncaaFBlogos/colby.png differ diff --git a/test/ncaaFBlogos/colo.png b/test/ncaaFBlogos/colo.png new file mode 100644 index 00000000..42ba2d55 Binary files /dev/null and b/test/ncaaFBlogos/colo.png differ diff --git a/test/ncaaFBlogos/conn.png b/test/ncaaFBlogos/conn.png new file mode 100644 index 00000000..1114466e Binary files /dev/null and b/test/ncaaFBlogos/conn.png differ diff --git a/test/ncaaFBlogos/cp.png b/test/ncaaFBlogos/cp.png new file mode 100644 index 00000000..80ac8ba5 Binary files /dev/null and b/test/ncaaFBlogos/cp.png differ diff --git a/test/ncaaFBlogos/csu.png b/test/ncaaFBlogos/csu.png new file mode 100644 index 00000000..5ade1fc8 Binary files /dev/null and b/test/ncaaFBlogos/csu.png differ diff --git a/test/ncaaFBlogos/cur.png b/test/ncaaFBlogos/cur.png new file mode 100644 index 00000000..4c71f0be Binary files /dev/null and b/test/ncaaFBlogos/cur.png differ diff --git a/test/ncaaFBlogos/del.png b/test/ncaaFBlogos/del.png new file mode 100644 index 00000000..52d230ba Binary files /dev/null and b/test/ncaaFBlogos/del.png differ diff --git a/test/ncaaFBlogos/dub.png b/test/ncaaFBlogos/dub.png new file mode 100644 index 00000000..cefe34e5 Binary files /dev/null and b/test/ncaaFBlogos/dub.png differ diff --git a/test/ncaaFBlogos/elm.png b/test/ncaaFBlogos/elm.png new file mode 100644 index 00000000..19601cf7 Binary files /dev/null and b/test/ncaaFBlogos/elm.png differ diff --git a/test/ncaaFBlogos/famu.png b/test/ncaaFBlogos/famu.png new file mode 100644 index 00000000..cbd35117 Binary files /dev/null and b/test/ncaaFBlogos/famu.png differ diff --git a/test/ncaaFBlogos/fla.png b/test/ncaaFBlogos/fla.png new file mode 100644 index 00000000..2383ea78 Binary files /dev/null and b/test/ncaaFBlogos/fla.png differ diff --git a/test/ncaaFBlogos/fsu.png b/test/ncaaFBlogos/fsu.png new file mode 100644 index 00000000..9a3be669 Binary files /dev/null and b/test/ncaaFBlogos/fsu.png differ diff --git a/test/ncaaFBlogos/gri.png b/test/ncaaFBlogos/gri.png new file mode 100644 index 00000000..1924fa7a Binary files /dev/null and b/test/ncaaFBlogos/gri.png differ diff --git a/test/ncaaFBlogos/gt.png b/test/ncaaFBlogos/gt.png new file mode 100644 index 00000000..228b8fdb Binary files /dev/null and b/test/ncaaFBlogos/gt.png differ diff --git a/test/ncaaFBlogos/gtwn.png b/test/ncaaFBlogos/gtwn.png new file mode 100644 index 00000000..9990feee Binary files /dev/null and b/test/ncaaFBlogos/gtwn.png differ diff --git a/test/ncaaFBlogos/haw.png b/test/ncaaFBlogos/haw.png new file mode 100644 index 00000000..cd5856dc Binary files /dev/null and b/test/ncaaFBlogos/haw.png differ diff --git a/test/ncaaFBlogos/how.png b/test/ncaaFBlogos/how.png new file mode 100644 index 00000000..a4b902a9 Binary files /dev/null and b/test/ncaaFBlogos/how.png differ diff --git a/test/ncaaFBlogos/idho.png b/test/ncaaFBlogos/idho.png new file mode 100644 index 00000000..1cfcdfff Binary files /dev/null and b/test/ncaaFBlogos/idho.png differ diff --git a/test/ncaaFBlogos/isu.png b/test/ncaaFBlogos/isu.png new file mode 100644 index 00000000..c59e3753 Binary files /dev/null and b/test/ncaaFBlogos/isu.png differ diff --git a/test/ncaaFBlogos/jxst.png b/test/ncaaFBlogos/jxst.png new file mode 100644 index 00000000..d507ee89 Binary files /dev/null and b/test/ncaaFBlogos/jxst.png differ diff --git a/test/ncaaFBlogos/lut.png b/test/ncaaFBlogos/lut.png new file mode 100644 index 00000000..684e10f2 Binary files /dev/null and b/test/ncaaFBlogos/lut.png differ diff --git a/test/ncaaFBlogos/mesa.png b/test/ncaaFBlogos/mesa.png new file mode 100644 index 00000000..66159848 Binary files /dev/null and b/test/ncaaFBlogos/mesa.png differ diff --git a/test/ncaaFBlogos/mil.png b/test/ncaaFBlogos/mil.png new file mode 100644 index 00000000..adc29c39 Binary files /dev/null and b/test/ncaaFBlogos/mil.png differ diff --git a/test/ncaaFBlogos/mor.png b/test/ncaaFBlogos/mor.png new file mode 100644 index 00000000..b701025e Binary files /dev/null and b/test/ncaaFBlogos/mor.png differ diff --git a/test/ncaaFBlogos/nor.png b/test/ncaaFBlogos/nor.png new file mode 100644 index 00000000..2b62fead Binary files /dev/null and b/test/ncaaFBlogos/nor.png differ diff --git a/test/ncaaFBlogos/red.png b/test/ncaaFBlogos/red.png new file mode 100644 index 00000000..196b387d Binary files /dev/null and b/test/ncaaFBlogos/red.png differ diff --git a/test/ncaaFBlogos/sac.png b/test/ncaaFBlogos/sac.png new file mode 100644 index 00000000..5ef0343f Binary files /dev/null and b/test/ncaaFBlogos/sac.png differ diff --git a/test/ncaaFBlogos/sdsu.png b/test/ncaaFBlogos/sdsu.png new file mode 100644 index 00000000..f73ee988 Binary files /dev/null and b/test/ncaaFBlogos/sdsu.png differ diff --git a/test/ncaaFBlogos/sjsu.png b/test/ncaaFBlogos/sjsu.png new file mode 100644 index 00000000..dbffbcc7 Binary files /dev/null and b/test/ncaaFBlogos/sjsu.png differ diff --git a/test/ncaaFBlogos/stan.png b/test/ncaaFBlogos/stan.png new file mode 100644 index 00000000..36dc600f Binary files /dev/null and b/test/ncaaFBlogos/stan.png differ diff --git a/test/ncaaFBlogos/stet.png b/test/ncaaFBlogos/stet.png new file mode 100644 index 00000000..d31e923b Binary files /dev/null and b/test/ncaaFBlogos/stet.png differ diff --git a/test/ncaaFBlogos/uab.png b/test/ncaaFBlogos/uab.png new file mode 100644 index 00000000..854220a7 Binary files /dev/null and b/test/ncaaFBlogos/uab.png differ diff --git a/test/ncaaFBlogos/ucla.png b/test/ncaaFBlogos/ucla.png new file mode 100644 index 00000000..216f392c Binary files /dev/null and b/test/ncaaFBlogos/ucla.png differ diff --git a/test/ncaaFBlogos/uga.png b/test/ncaaFBlogos/uga.png new file mode 100644 index 00000000..53175cff Binary files /dev/null and b/test/ncaaFBlogos/uga.png differ diff --git a/test/ncaaFBlogos/usa.png b/test/ncaaFBlogos/usa.png new file mode 100644 index 00000000..3083699d Binary files /dev/null and b/test/ncaaFBlogos/usa.png differ diff --git a/test/ncaaFBlogos/usc.png b/test/ncaaFBlogos/usc.png new file mode 100644 index 00000000..84c2711e Binary files /dev/null and b/test/ncaaFBlogos/usc.png differ diff --git a/test/ncaaFBlogos/usf.png b/test/ncaaFBlogos/usf.png new file mode 100644 index 00000000..c1b4c5b6 Binary files /dev/null and b/test/ncaaFBlogos/usf.png differ diff --git a/test/ncaaFBlogos/yale.png b/test/ncaaFBlogos/yale.png new file mode 100644 index 00000000..fa375049 Binary files /dev/null and b/test/ncaaFBlogos/yale.png differ