#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")"

mkdir -p images/dionne_warwick

fetch() {
  local out="$1"
  local url="$2"
  echo "Downloading: $out"
  curl -L --fail --retry 3 --connect-timeout 10 --max-time 120 -o "$out" "$url"
}

fetch "images/dionne_warwick/dw01_apollo_2022.jpg" "https://commons.wikimedia.org/wiki/Special:FilePath/Dionne%20Warwick%20at%20the%20Apollo%20Theatre%2C%202022.jpg"
fetch "images/dionne_warwick/dw02_1969.jpg" "https://commons.wikimedia.org/wiki/Special:FilePath/Dionne%20Warwick%201969.JPG"
fetch "images/dionne_warwick/dw03_1970.jpg" "https://commons.wikimedia.org/wiki/Special:FilePath/Dionne%20Warwick%201970.JPG"
fetch "images/dionne_warwick/dw04_2011.jpg" "https://commons.wikimedia.org/wiki/Special:FilePath/Dionne%20Warwick%20in%202011.jpg"
fetch "images/dionne_warwick/dw05_1999.jpg" "https://commons.wikimedia.org/wiki/Special:FilePath/Dionne%20Warwick%201999.jpg"
fetch "images/dionne_warwick/dw06_2010.jpg" "https://commons.wikimedia.org/wiki/Special:FilePath/Dionne%20Warwick%202010.jpg"

echo "Done. Open Dione_Warrick.html and the page will use local images from images/dionne_warwick/."
