gendemoimage

command
v0.1.149 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL