summaryrefslogtreecommitdiff
path: root/extract_covers.sh
diff options
context:
space:
mode:
authorMichał M. Sapka <michal@sapka.me>2023-02-20 15:23:12 +0100
committerMichał M. Sapka <michal@sapka.me>2023-02-20 15:23:12 +0100
commit79c081ddc59014cd4eb56c78ca4d8ab8403048d1 (patch)
treea1b8be0b8a5c0c39b204c44e3ba1b6b08071ee2f /extract_covers.sh
parenta7ac07828e5ed4cd81e9ec52a7cab01f22fa5966 (diff)
fix: filename
Diffstat (limited to 'extract_covers.sh')
-rwxr-xr-xextract_covers.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/extract_covers.sh b/extract_covers.sh
new file mode 100755
index 0000000..8245ae0
--- /dev/null
+++ b/extract_covers.sh
@@ -0,0 +1,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