Initial commit: Set up CustomBingo project structure

This commit is contained in:
2025-12-07 13:23:07 -05:00
commit e02a6c0bf3
7 changed files with 190 additions and 0 deletions

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info
# Virtual environments
.venv

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.12

9
ProjectBrief.md Normal file
View File

@@ -0,0 +1,9 @@
CustomBingo is an app that will read a spreadsheet with 5 columns (each corresponding to one of the columns on a BINGO card, B, I, N, G, or O), and use the data in the rows to randomly populate a user-specified number of BINGO cards, exported in PDF format for easy printing. Each box in the grid should automatically size the font to fit (as large as possible while still being able to read all text), with the text centered horizontally and vertically.
The program will be written in Python, using whatever supporting libraries are necessary to complete the specified tasks (i.e. read a spreadsheet, generate a PDF, randomize cards). A virtual environment should be used and managed with uv, and a gitea repository (https://gitea.conlon.fun/andy/CustomBingo.git) where the default branch is named main. Development will be done in Windows PowerShell using the qwen CLI code assistant.
Initially, the output BINGO cards can be very basic, with just a title, column headers, and a 5x5 grid.
Over time, additional features could include adding decoration, clip art, emoji, backgrounds, etc. for visual appeal. Other features to consider are different grid sizes, different column headers, etc.
This basic description should be used to generate a project plan with technical details stored in markdown format.

107
ProjectPlan.md Normal file
View File

@@ -0,0 +1,107 @@
# 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
1. Read spreadsheet data (Excel/CSV format) with 5 columns (B, I, N, G, O)
2. Generate randomized BINGO cards based on the input data
3. Export cards in PDF format with proper formatting
4. Auto-fit text in grid cells with horizontal and vertical centering
5. 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
├── tests/
├── data/
├── requirements.txt
├── pyproject.toml
├── ProjectPlan.md
└── README.md
```
## Implementation Plan
### Step 1: Initialize Project and Repository
1. Create project directory structure
2. Initialize virtual environment with `uv`
3. Create and initialize git repository
4. Connect to remote Gitea repository
5. Set up basic configuration files
### Step 2: Set Up Virtual Environment with UV
1. Install `uv` if not already installed
2. Initialize project with `uv init`
3. Configure project dependencies in `pyproject.toml`
4. Install required packages: pandas, reportlab, openpyxl
### Step 3: Implement Spreadsheet Reader
1. Create `spreadsheet_reader.py` module
2. Implement function to read Excel/CSV files
3. Validate that input has exactly 5 columns (B, I, N, G, O)
4. Store data in appropriate data structure
### Step 4: Implement Card Generator
1. Create `card_generator.py` module
2. Implement logic to generate random BINGO cards from input data
3. Ensure each column uses data from the appropriate input column
4. Handle free space in center (N3) if needed
### Step 5: Implement PDF Generator
1. Create `pdf_generator.py` module
2. Use reportlab to create PDF with proper BINGO card layout
3. Implement auto-sizing text and centering in grid cells
4. Add basic styling: title, column headers, grid lines
### Step 6: Integrate Components
1. Create main application entry point
2. Connect all modules together
3. Implement command-line interface
4. Add input validation and error handling
### Step 7: Testing
1. Write unit tests for individual components
2. Write integration tests
3. Test with various input spreadsheets
4. Verify PDF output quality
### Step 8: Documentation and Polish
1. Create README.md with usage instructions
2. Add command-line help
3. Test on target platform (Windows PowerShell)
4. Final review and debugging
## Future Enhancements
1. Add decoration, clip art, emoji, backgrounds
2. Support different grid sizes
3. Customizable column headers
4. Multiple card layouts
5. Web interface option
## 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

45
README.md Normal file
View File

@@ -0,0 +1,45 @@
# CustomBingo
A Python application that generates customized BINGO cards from spreadsheet data.
## Description
CustomBingo reads a spreadsheet with 5 columns (each corresponding to one of the columns on a BINGO card, B, I, N, G, or O), and uses the data in the rows to randomly populate a user-specified number of BINGO cards, exported in PDF format for easy printing. Each box in the grid automatically sizes the font to fit (as large as possible while still being able to read all text), with the text centered horizontally and vertically.
## Features
- Read Excel/CSV spreadsheets with B, I, N, G, O columns
- Generate randomized BINGO cards
- Export cards in PDF format with properly sized text
- Automatic text centering in grid cells
- Basic layout with title, column headers, and 5x5 grid
## Installation
1. Ensure you have Python 3.12+ installed
2. Install `uv` if not already installed: `pip install uv`
3. Clone the repository
4. Navigate to the project directory
5. Install dependencies: `uv pip install -r requirements.txt` or `uv venv` to create a virtual environment
## Usage
TODO: Add usage instructions after implementation
## Development
This project uses `uv` for dependency management. To set up the development environment:
```bash
# Create virtual environment
uv venv
# Activate virtual environment
# On Windows:
source .venv/Scripts/activate
# On macOS/Linux:
source .venv/bin/activate
# Install dependencies
uv pip install -e .
```

6
main.py Normal file
View File

@@ -0,0 +1,6 @@
def main():
print("Hello from custombingo!")
if __name__ == "__main__":
main()

12
pyproject.toml Normal file
View File

@@ -0,0 +1,12 @@
[project]
name = "custombingo"
version = "0.1.0"
description = "A Python application that generates customized BINGO cards from spreadsheet data"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"pandas>=2.0.0",
"reportlab>=4.0.0",
"openpyxl>=3.1.0",
"click>=8.0.0"
]