A Flask web application that processes tournament CSV files and automatically fetches current CFC (Chess Federation of Canada) ratings, membership status, and FIDE information for all players.
- Upload CSV files with tournament player data
- Automatic rating lookup from the official CFC API
- Membership validation with expiry date checking
- FIDE ID retrieval when available
- Automatic ranking by rating with updated positions
- Download processed CSV with all updated information
- Modern web interface with drag-and-drop file upload
- Python 3.7 or higher
- pip (Python package installer)
-
Clone or download this repository
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
-
Open your web browser and go to:
http://localhost:5000
Your CSV file should have at least these columns:
- Column 0: Starting rank/position
- Column 1: Player name
- Column 2: CFC ID (default location)
Example:
Rank,Player Name,CFC ID,Additional Info
1,John Smith,123456,Club Name
2,Jane Doe,789012,Another Club
3,Bob Wilson,NA,Unrated Player
NA
orN/A
- Player without CFC membership- Empty cell - Will be skipped
- Numeric ID - Will be looked up in CFC database
- Event Date: Set to your tournament date for membership validation
- CFC ID Column Index: Specify which column contains CFC IDs (0-based index)
The processed file will include these additional columns:
- CFC Rating: Current CFC quick rating
- CFC Membership: Valid/Expired/NA status
- FIDE ID: International rating system ID
- First Name: From CFC database
- Last Name: From CFC database
Players will be automatically sorted by rating (highest to lowest) and rankings updated.
To test the application immediately:
- Download the sample file: Visit the web app and click "Download Sample CSV" - choose either:
- Sample (10 players) -
sample_small.csv
with mixed sections - Full Sample (20 players) -
sample_tournament.csv
with Crown section players
- Sample (10 players) -
- Upload it: Use the sample file to test the web application
- See the results: The sample contains real CFC IDs that will demonstrate the rating lookup functionality
The sample files include:
- sample_small.csv: 10 players with Crown, U1800, and U1400 sections, including unrated players
- sample_tournament.csv: 20 tournament players from Crown section
- Examples of players with and without CFC memberships (marked as N/A)
- Real CFC IDs for testing the API integration
python app.py
# Build the Docker image
docker build -t cfc-status-ui .
# Run the container
docker run -d -p 5000:8080 --name cfc-app cfc-status-ui
# Access the application
open http://localhost:5000