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

while IFS='|' read -r file slug; do
  new_url="https://roux.roo.lol/recipe-images/$slug.webp"
  sed -i "s|^image:.*|image: $new_url|" "$file"
  echo "[$slug] Updated image field"
done
