# pyPhotoAlbum Examples This directory contains working examples demonstrating various features of pyPhotoAlbum. ## Available Examples ### basic_usage.py Demonstrates the fundamentals of creating a photo album project: - Creating a project - Adding pages with images - Working with text boxes - Saving and loading projects - Asset management Run: ```bash python basic_usage.py ``` ### template_example.py Shows how to work with the template system: - Creating custom templates - Applying templates to pages - Using built-in templates - Template scaling modes Run: ```bash python template_example.py ``` ### generate_screenshots.py Script to generate documentation screenshots programmatically: - Creates example projects - Captures screenshots for documentation - Demonstrates various layouts Run: ```bash python generate_screenshots.py ``` This creates screenshots in `examples/screenshots/` directory. ## Requirements Make sure you have pyPhotoAlbum installed: ```bash # From the project root pip install -e . ``` ## Sample Images The examples use placeholder images. To use your own: 1. Create an `images/` directory in the examples folder 2. Add your sample images 3. Update the image paths in the example scripts ## Output Examples will create: - `examples/output/` - Generated project files (.ppz) - `examples/screenshots/` - Documentation screenshots - `examples/pdfs/` - Exported PDFs These directories are created automatically when you run the examples. ## Notes - The examples use realistic page sizes (A4, square formats) - DPI settings match typical print requirements (300 DPI) - All examples include error handling and cleanup - Examples demonstrate both programmatic and template-based workflows ## Regenerating Documentation Screenshots To update screenshots for the documentation: 1. Run `python generate_screenshots.py` 2. Review generated images in `screenshots/` 3. Copy needed screenshots to documentation The script generates: - UI screenshots - Layout examples - Template demonstrations - Feature showcases