Python code to generate shopping lists based on a number of meals to be cooked.
- Python 3.8+
- uv package manager
-
Clone the repository:
git clone <repository-url> cd brittamat
-
Install dependencies using uv:
uv sync
uv run python main.pyThe application generates the following output files:
shopping.html- HTML shopping list with stylingall-ingredients.html- Complete list of all ingredientsshopping.css- CSS stylesheet for the HTML output
Format your code using Black:
uv run black .Check if code needs formatting without making changes:
uv run black --check .Run type checking with mypy:
uv run mypy .Update all dependencies to their latest versions:
uv lock --upgradeAdd a new dependency:
uv add <package-name>Add a development dependency:
uv add --dev <package-name>Remove a dependency:
uv remove <package-name>This project includes VS Code configuration for improved development experience:
- Open the project folder in VS Code
- Install recommended extensions when prompted
- Press F5 to run the application
- Press Ctrl+Shift+B (or Cmd+Shift+B on Mac) for quick build
Access via Ctrl+Shift+P → "Tasks: Run Task":
- Run Application - Execute the main program
- Format Code - Format code with Black
- Type Check - Run mypy type checking
- Install Dependencies - Install project dependencies
- Update Dependencies - Update to latest versions
- Press F5 to start debugging with breakpoints
- Two configurations available: "Run Brittamat" and "Debug Brittamat"
- Automatic code formatting on save
- Real-time type checking
- Import organization
- Problem highlighting with clickable error navigation
main.py- Main application entry pointdata.py- Menu and ingredient data definitionsalg.py- Core algorithms for shopping list generationclasses.py- Data classes and type definitionshtml5.py- HTML output generationlatex.py- LaTeX output generationpyproject.toml- Project configuration and dependenciesuv.lock- Locked dependency versions.vscode/- VS Code configuration files