add:media

This commit is contained in:
kokopi-dev
2026-04-05 00:36:32 +09:00
parent 04ab0cd4e9
commit 9141f3bc0a
5 changed files with 19 additions and 1 deletions

13
media/webpconvert.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
# TODO add resource options like ogcard, yt-thumbnail, etc
# convert to golang or rust probably for better ux on cli
DEFAULT_WIDTH=1200
if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then
echo "Usage: $0 <input> <output> [width]"
exit 1
fi
WIDTH="${3:-$DEFAULT_WIDTH}"
magick "$1" -resize "${WIDTH}x>" -quality 85 "$2"