#!/bin/bash # nettoyage rm -f index.html # entête echo "" >> index.html echo "Mes Photos" >> index.html echo "

Photos

" >> index.html # images for i in `ls *.JPG *.jpg *.JPEG *.jpeg *.PNG *.png *.GIF *.gif` do identify $i >/dev/null if [ $? -eq 0 ] then echo "conversion de $i" # créaation de la vignette convert "$i" -quality 35 -resize 120x120 "small-$i" # échappement HTML j=`echo "$i" | sed -e 's/&/\\&/g' -e 's/"/\\"/g' -e 's//\\>/g'` # génération HTML echo "" >> index.html fi done # fin de page echo "" >> index.html