BASH photo gallery
Revision as of 16:58, 15 July 2019 by Michael Murtaugh (talk | contribs)
cat << EOF > index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div.image {
float: left;
}
</style>
</head>
<body>
EOF
for i in *.JPG
do
t=${i%*.JPG}.thumb.jpg
if [ ! -f $t ]; then
echo convert -resize 360x360 $i $t
convert -resize 360x360 $i $t
fi
echo "<div class=\"image\"><a href=\"$i\"><img src=\"$t\" /></a></div>" >> index.html
done
cat << EOF >> index.html
</body>
</html>
EOF