You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yacy_search_server/addon/thumbnail.sh

11 lines
205 B

#!/usr/bin/env sh
cd /tmp
FILE=`tempfile`.html
wget "$1" -O $FILE -k
convert $FILE -resize 168x128 "$2"
if [ -e "${2%.png}"-0.png ];then
mv "${2%.png}"-0.png "${2}"
rm "${2%.png}"-[0-9]*.png
fi
rm $FILE