#!/bin/bash
# Generate construction-themed images for BECS website
# Valid sizes must be multiples of 32, between 512-2880px
set -u
OUT=/home/z/my-project/public/images
mkdir -p "$OUT"

run() {
  local name="$1"; local prompt="$2"; local size="$3"
  echo ">>> Generating $name ($size)..."
  if z-ai image -p "$prompt" -o "$OUT/$name" -s "$size" > /dev/null 2>&1; then
    echo "  OK: $name"
  else
    echo "  FAIL: $name"
  fi
}

run "hero.jpg" "Cinematic wide panoramic photograph of a large infrastructure construction site at golden hour, tower cranes, concrete bridge under construction, workers in safety helmets and high-visibility vests, dramatic sky, professional construction photography, high quality, detailed, warm amber lighting" "1344x768" &
run "about.jpg" "Professional photograph of civil engineers and construction managers in safety helmets reviewing blueprints at a construction site, teamwork, high-visibility vests, holding tablets, background of building under construction, warm natural light, professional corporate photography, high quality" "1344x768" &
run "sector-energy.jpg" "Photograph of a large hydropower dam and transmission lines in a mountainous landscape, renewable energy infrastructure, water flowing, electricity towers, professional industrial photography, golden hour, high quality, detailed" "1344x768" &
run "sector-roads.jpg" "Aerial photograph of a newly constructed highway with bridges through mountainous terrain, asphalt road, lane markings, heavy machinery, road construction project, professional photography, daylight, high quality" "1344x768" &
run "sector-buildings.jpg" "Photograph of a modern multi-story commercial building under construction with scaffolding and tower crane, steel structure, glass facade, urban setting, blue sky, professional architectural photography, high quality" "1344x768" &
run "sector-water.jpg" "Photograph of irrigation and drinking water infrastructure, water treatment plant, pipelines and reservoir in a green rural landscape, civil engineering water project, professional photography, daylight, high quality" "1344x768" &

wait
echo "ALL DONE"
ls -la "$OUT"
