feat: download and relink existing recipe images to roux.roo.lol
This commit is contained in:
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
while IFS='|' read -r file slug; do
|
||||
url=$(grep "^image:" "$file" | sed 's/^image:[[:space:]]*//')
|
||||
echo "[$slug] Downloading from $url"
|
||||
curl -sL -o "recipe-images/$slug.webp" "$url" || echo "[$slug] DOWNLOAD FAILED"
|
||||
done
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user