" >> ./index.html
-
+
+ count=1;
for wallpaper in ${subdir}/*
do
- echo "
- " >> ./index.html
+ if [ "$count" -lt 11 ]; then #limit the amount of images per section in index
+ echo "
+ " >> ./index.html
+ count=$((count+1))
+ else #if the limit is exceeded then create a new html with all the images of the section
+ # TODO: make this part cleaner, this is really ugly.
+ subhtml="${subdir##*/}.html"
+ nimgs=$(ls "${subdir}" | wc -l)
+ echo "
+
This images are from random sites or contributions so I don't have a way to know who are their original artist.
+
I want to keep this site as simple as possible, but if you are the creator of any of these images and you want acknowledgment I will happily add a section with your name. Just open an issue here.