Documentation
¶
Overview ¶
Package main provides a demo image generator for testing the SFPG gallery application.
This program downloads images from LoremFlickr (https://loremflickr.com) and organizes them into a hierarchical folder structure suitable for testing a photo gallery application. It uses a worker pool pattern for concurrent downloads with retry logic and idempotency support to allow resuming interrupted downloads.
Usage:
go run cmd/gendemoimage/main.go
The program creates images in ./tmp/Images/ with the following structure:
./tmp/Images/ ├── landscapes/ │ └── batch_100/ │ ├── img_0000.jpg │ └── ... ├── architecture/ ├── mechanical/ └── wildlife/
Idempotency: The program can be safely re-run. Existing files with content are skipped, allowing for resume capability if the process is interrupted.
Click to show internal directories.
Click to hide internal directories.