EOF
# EXIF
if [[ $exifinfo ]]; then
cat >> "$imagehtmlfile" << EOF
$exifinfo
EOF
fi
# Footer
cat >> "$imagehtmlfile" << EOF
EOF
let file++
done
fi
### Movies (MOV or MP4)
if [[ $(find . -type f -name \*.mov -o -name '*.mp4' -maxdepth 1 | wc -l) -gt 0 ]]; then
cat >> "$htmlfile" << EOF
Movies
EOF
if [[ $(find . -type f -name \*.mov -maxdepth 1 | wc -l) -gt 0 ]]; then
for filename in *.[mM][oO][vV]; do
filesize=$(wc -c < "$filename" | awk '{$1/=1000000;printf "%.2fMB\n",$1}')
cat >> "$htmlfile" << EOF
$movieicon $filename ($filesize)
EOF
done
fi
if [[ $(find . -type f -name \*.mp4 -maxdepth 1 | wc -l) -gt 0 ]]; then
for filename in *.[mM][pP]4; do
filesize=$(wc -c < "$filename" | awk '{$1/=1000000;printf "%.2fMB\n",$1}')
cat >> "$htmlfile" << EOF
$movieicon $filename ($filesize)
EOF
done
fi
echo '
' >> "$htmlfile"
fi
### Downloads (ZIP)
if [[ $(find . -type f -name \*.zip -maxdepth 1 | wc -l) -gt 0 ]]; then
cat >> "$htmlfile" << EOF
Downloads
EOF
for filename in *.[zZ][iI][pP]; do
filesize=$(wc -c < "$filename" | awk '{$1/=1000000;printf "%.2fMB\n",$1}')
cat >> "$htmlfile" << EOF
$downloadicon $filename ($filesize)
EOF
done
echo '