summaryrefslogtreecommitdiff
path: root/extract_covers.sh
blob: b83f731cda3f9654f0354db52684125c9803f57a (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

echo "Extracting used YT ids..."
for id in `grep -r "< yt" content/. | grep -o "\".*\"" | tr -d '"' | cut -d " " -f1 `
do
  echo "Processing $id"...

  wget --output-document "assets/ytcovers/$id.jpg" "https://i.ytimg.com/vi/$id/hqdefault.jpg"
  convert "assets/ytcovers/$id.jpg" "assets/partials/play-button.png"  -gravity center -geometry 150x150+5+5 -composite "assets/ytcovers/$id.jpg"
done