parent
7e29db8e51
commit
59b298dc5b
@ -0,0 +1,12 @@
|
|||||||
|
cd static/img
|
||||||
|
ln -s ../../../thomasba.de-photos/ orig
|
||||||
|
find orig/ -type f -iname '*.jpg' | while read -r ORIGINAL ; do
|
||||||
|
FILENAME="photos/${ORIGINAL#orig/}"
|
||||||
|
THUMB="${FILENAME/%.jpg/-thumb.jpg}"
|
||||||
|
FOLDER="${FILENAME%$(basename "$FILENAME")}"
|
||||||
|
echo "Processing \"$ORIGINAL\"..."
|
||||||
|
[ -d "$FOLDER" ] || mkdir -p "$FOLDER"
|
||||||
|
[ -f "$THUMB" ] || convert "$ORIGINAL" -strip -quality 0.75 -resize 400x400\> "$THUMB"
|
||||||
|
[ -f "$FILENAME" ] || convert "$ORIGINAL" -quality 0.80 -resize 2560x2560\> "$FILENAME"
|
||||||
|
done
|
||||||
|
rm orig
|
Loading…
Reference in new issue