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

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

  wget --output-document "assets/ytcovers/$id.jpg" "https://img.youtube.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