4.0 KiB
4.0 KiB
CustomBingo Project Plan
Project Overview
CustomBingo is a Python application that reads a spreadsheet with 5 columns (B, I, N, G, O) and generates user-specified number of randomized BINGO cards in PDF format for easy printing. Each box in the grid will automatically size the font to fit and center the text.
Technical Specification
Core Requirements
- Read spreadsheet data (Excel/CSV format) with 5 columns (B, I, N, G, O)
- Generate randomized BINGO cards based on the input data
- Export cards in PDF format with proper formatting
- Auto-fit text in grid cells with horizontal and vertical centering
- Basic layout with title, column headers, and 5x5 grid
Technical Stack
- Python 3.9+
- Virtual environment managed with
uv - Supporting libraries: pandas (for spreadsheet reading), reportlab (for PDF generation)
- Git for version control
- Gitea repository hosted at https://gitea.conlon.fun/andy/CustomBingo.git
Project Structure
CustomBingo/
├── src/
│ └── custom_bingo/
│ ├── __init__.py
│ ├── main.py
│ ├── card_generator.py
│ ├── spreadsheet_reader.py
│ ├── pdf_generator.py
│ └── gui.py
├── tests/
├── data/
├── requirements.txt
├── pyproject.toml
├── ProjectPlan.md
└── README.md
Implementation Plan
Step 1: Initialize Project and Repository
- Create project directory structure
- Initialize virtual environment with
uv - Create and initialize git repository
- Connect to remote Gitea repository
- Set up basic configuration files
Step 2: Set Up Virtual Environment with UV
- Install
uvif not already installed - Initialize project with
uv init - Configure project dependencies in
pyproject.toml - Install required packages: pandas, reportlab, openpyxl
Step 3: Implement Spreadsheet Reader
- Create
spreadsheet_reader.pymodule - Implement function to read Excel/CSV files
- Validate that input has exactly 5 columns (B, I, N, G, O)
- Store data in appropriate data structure
Step 4: Implement Card Generator
- Create
card_generator.pymodule - Implement logic to generate random BINGO cards from input data
- Ensure each column uses data from the appropriate input column
- Handle free space in center (N3) if needed
Step 5: Implement PDF Generator
- Create
pdf_generator.pymodule - Use reportlab to create PDF with proper BINGO card layout
- Implement auto-sizing text and centering in grid cells
- Add basic styling: title, column headers, grid lines
Step 6: Integrate Components
- Create main application entry point
- Connect all modules together
- Implement command-line interface
- Add input validation and error handling
Step 7: Testing
- Write unit tests for individual components
- Write integration tests
- Test with various input spreadsheets
- Verify PDF output quality
Step 8: GUI Development
- Create
gui.pymodule with tkinter interface - Implement input fields for card title, column headers, spreadsheet path, and number of cards
- Add file dialogs for source spreadsheet and output PDF location
- Integrate with existing card generation functions
- Add validation, status updates, and error handling
Step 9: Documentation and Polish
- Update README.md to include GUI usage instructions
- Add command-line help
- Test on target platform (Windows PowerShell)
- Final review and debugging
Future Enhancements
- Add decoration, clip art, emoji, backgrounds
- Support different grid sizes
- Customizable column headers
- Multiple card layouts
- Web interface option
- Enhanced GUI features (theme customization, preview, etc.)
Dependencies
- pandas: For reading spreadsheet files
- reportlab: For PDF generation
- openpyxl: For Excel file support
- click: For command-line interface (optional)
Configuration
- pyproject.toml: Project metadata and dependencies
- README.md: Usage instructions
- .gitignore: Ignore files not to be committed