diff options
author | Michał M. Sapka <michal@sapka.me> | 2023-02-01 23:12:41 +0100 |
---|---|---|
committer | Michał M. Sapka <michal@sapka.me> | 2023-02-01 23:12:41 +0100 |
commit | 8525d00965630c8c886812d06dc852928fa88fc5 (patch) | |
tree | 356526969e1a91437720601159356d3d721e25ee | |
parent | ca414bd7f54f2a2d1bd85eaebe8746ea70c43465 (diff) |
chore: add yt covers extractor
-rw-r--r-- | assets/partials/play-button.png | bin | 0 -> 36785 bytes | |||
-rw-r--r-- | assets/ytcovers/ckiZf9X8GrY.jpg | bin | 0 -> 24143 bytes | |||
-rw-r--r-- | assets/ytcovers/qRNfeMaUBbo.jpg | bin | 0 -> 11708 bytes | |||
-rw-r--r-- | assets/ytcovers/uoDhH5QEfX0.jpg | bin | 0 -> 14442 bytes | |||
-rwxr-xr-x | extract_covers | 10 |
5 files changed, 10 insertions, 0 deletions
diff --git a/assets/partials/play-button.png b/assets/partials/play-button.png Binary files differnew file mode 100644 index 0000000..68dd5b5 --- /dev/null +++ b/assets/partials/play-button.png diff --git a/assets/ytcovers/ckiZf9X8GrY.jpg b/assets/ytcovers/ckiZf9X8GrY.jpg Binary files differnew file mode 100644 index 0000000..ae869f5 --- /dev/null +++ b/assets/ytcovers/ckiZf9X8GrY.jpg diff --git a/assets/ytcovers/qRNfeMaUBbo.jpg b/assets/ytcovers/qRNfeMaUBbo.jpg Binary files differnew file mode 100644 index 0000000..6fcfc02 --- /dev/null +++ b/assets/ytcovers/qRNfeMaUBbo.jpg diff --git a/assets/ytcovers/uoDhH5QEfX0.jpg b/assets/ytcovers/uoDhH5QEfX0.jpg Binary files differnew file mode 100644 index 0000000..aee4cea --- /dev/null +++ b/assets/ytcovers/uoDhH5QEfX0.jpg 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 |