Skip to content

onearenaa-create/scoringfiller

Repository files navigation

πŸ“Š Scoreboard Auto-Fill Tool

A Python-based web application that automatically fills scoreboard CSV templates using fuzzy-matched team names from raw pasted standings data.

✨ Features

  • 🌐 Web Interface - Easy-to-use web UI for pasting data and uploading templates
  • πŸ“‹ Drag & Drop CSV Upload - Upload your scoreboard template with one click
  • 🎯 Smart Text Parser - Handles various formats (tab-separated, space-separated, multi-space)
  • πŸ” Fuzzy Matching - Handles spelling mistakes, spacing issues, and case differences using rapidfuzz
  • πŸ“Š Match Confidence Reporting - Visual feedback with color-coded confidence scores
  • ⬇️ Instant Download - Get your filled scoreboard immediately
  • πŸ”„ Real-time Preview - See match results before downloading

πŸ“¦ Requirements

  • Python 3.11+
  • pandas
  • rapidfuzz
  • streamlit

All dependencies are already installed in this Replit environment.

πŸš€ Quick Start

Option 1: Web Interface (Recommended)

The web app is already running! Just open the webview in Replit and:

  1. Paste your raw standings data in the left text area
  2. Upload your CSV template on the right
  3. Click "Process Scoreboard"
  4. Download your filled scoreboard with one click!

Option 2: Command Line Interface

python scoreboard_autofill.py

Interactive Workflow

  1. Paste Raw Standings Data

    • The tool will prompt you to paste your raw standings
    • Press Enter on an empty line to finish
  2. Provide Template CSV Path

    • Enter the path to your template CSV file
    • Example: example_template.csv
  3. Review Results

    • The tool shows fuzzy match confidence scores
    • Green (🟒) = >90% confidence
    • Yellow (🟑) = 75-90% confidence
    • Orange (🟠) = <75% confidence
  4. Get Output

    • Filled scoreboard saved as filled_scoreboard.csv

πŸ“ Input Format

The tool accepts raw standings in various formats:

Tab-Separated (Recommended)

Rank    Participant     Total Points    Placement Points        Kill Points
1st     GlitchXReborn   15      10      5
2nd     Sinewy Esports  9       6       3

Space-Separated

1st GlitchXReborn 15 10 5
2nd Sinewy Esports 9 6 3

Multi-Space (Copy from Tables)

1st    GlitchXReborn    15    10    5
2nd    Sinewy Esports    9     6    3

πŸ“„ CSV Template Structure

Your template CSV should have at least these columns:

  • A team name column (automatically detected: "Team Name", "Team", "Participant", or "Name")
  • Columns for placement and kill points (will be created if not present)

Example Template

Rank,Team Name,Placement Points,Finishes
1,GlitchXReborn,,,
2,Sinewy Esports,,,

🎯 Example Usage

Step 1: Prepare Your Template

Create a CSV file with your team names:

Rank,Team Name,Placement Points,Finishes
1,GlitchXReborn,,,
2,Sinewy Esports,,,
3,Team Velocity,,,

Save as my_scoreboard.csv

Step 2: Copy Raw Standings

Copy your standings data from any source (spreadsheet, website, document)

Step 3: Run the Tool

python scoreboard_autofill.py

When prompted:

  1. Paste your raw standings
  2. Enter template path: my_scoreboard.csv
  3. Review the match summary
  4. Check filled_scoreboard.csv for results

πŸ”§ Testing with Provided Examples

This project includes example files for testing:

python scoreboard_autofill.py

When prompted:

  • Paste the contents of sample_input.txt
  • Enter template path: example_template.csv

🎨 Fuzzy Matching

The tool uses rapidfuzz to handle:

  • Spelling mistakes: "Glitch Reborn" β†’ "GlitchXReborn"
  • Different spacing: "TeamVelocity" β†’ "Team Velocity"
  • Case differences: "SINEWY ESPORTS" β†’ "Sinewy Esports"
  • Missing characters: "Phoenix Gamng" β†’ "Phoenix Gaming"
  • Extra characters: "Noova Squad" β†’ "Nova Squad"

Match Threshold

Default threshold: 75% similarity required for a match

Teams below this threshold will be reported as unmatched.

πŸ“Š Output

The tool generates:

  1. filled_scoreboard.csv - Your template with data filled in
  2. Console Summary - Shows:
    • Successfully matched teams
    • Fuzzy match confidence scores
    • Unmatched teams (if any)
    • Placement points and kill points filled

πŸ’‘ Best Practices

1. Team Name Cleanup

For best results, ensure template team names are:

  • Spelled correctly
  • Consistent with source data
  • Free of extra whitespace

2. Handling Unmatched Teams

If teams don't match:

  • Check spelling in template
  • Verify team name in raw data
  • Lower the match threshold if needed (edit line 145 in script)

3. Column Names

The tool automatically detects these column name variations:

  • Team names: "Team Name", "Team", "Participant", "Name"
  • Placement: "Placement Points", "Placement", "Place Points"
  • Kills: "Finishes", "Kill Points", "Kills", "Finish Points"

πŸ› οΈ Customization

Adjust Match Threshold

Edit scoreboard_autofill.py line 145:

matcher = FuzzyMatcher(match_threshold=75)  # Change 75 to your preference

Lower = more lenient matching (more false positives) Higher = stricter matching (more misses)

Change Output Filename

Edit scoreboard_autofill.py line 374:

output_path = "filled_scoreboard.csv"  # Change to your preference

πŸ“ Project Structure

.
β”œβ”€β”€ scoreboard_autofill.py      # Main script
β”œβ”€β”€ example_template.csv        # Sample template
β”œβ”€β”€ sample_input.txt            # Sample raw standings
└── README.md                   # This file

πŸ› Troubleshooting

"Could not parse any standings data"

  • Ensure your data has at least 5 columns
  • Check that numbers are in the last 3 columns
  • Verify rank is in the first column

"Could not identify team name column"

  • Rename your team column to "Team Name", "Team", "Participant", or "Name"
  • Or, the tool will use the second column by default

Low Match Confidence

  • Check for typos in template
  • Ensure team names in raw data match template
  • Consider lowering the match threshold

πŸ“ Notes

  • The tool skips header rows automatically
  • Empty lines in input are ignored
  • Output always saves as filled_scoreboard.csv (customize if needed)
  • Original template is never modified

πŸŽ‰ Success!

Once complete, you'll have:

  • βœ… Filled scoreboard CSV ready to use
  • βœ… Match confidence report for verification
  • βœ… Summary of all matched and unmatched teams

Made for easy scoreboard management! πŸ†

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages