summaryrefslogtreecommitdiff
path: root/extract_covers
diff options
context:
space:
mode:
Diffstat (limited to 'extract_covers')
-rwxr-xr-xextract_covers10
1 files changed, 10 insertions, 0 deletions
diff --git a/extract_covers b/extract_covers
new file mode 100755
index 0000000..f5f83a9
--- /dev/null
+++ b/extract_covers
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+echo "Extracting used YT ids..."
+for id in `grep -r "<youtube" content/. | grep -o "\".*\"" | tr -d '"' `
+do
+ echo "Processing $id"...
+
+ wget --output-document "assets/ytcovers/$id.jpg" "https://img.youtube.com/vi/$id/hqdefault.jpg"
+ magick convert "assets/ytcovers/$id.jpg" "assets/partials/play-button.png" -gravity center -geometry 150x150+5+5 -composite "assets/ytcovers/$id.jpg"
+done