Gruvbox Wallpapers
" >./index.html +Gruvbox Wallpapers
" > ./index.html color=1 -maxPerPage=8 +maxPerPage=8 declare -a sections -for subdir in ./wallpapers/*; do - section="${subdir##*/}" - sections+=("$section") - write_section_header $color "$section" ./index.html +for subdir in ./wallpapers/* +do + section="${subdir##*/}" + sections+=("$section") + write_section_header $color "$section" ./index.html - page=1 - img_count=0 - subhtml="${section}_page${page}.html" - touch ./$subhtml - echo "" >>./index.html
+ page=1
+ img_count=0
+ subhtml="${section}_page${page}.html"
+ touch ./$subhtml
- echo "
" >> ./index.html
+
+ color=$((color + 1))
+ if [ "$color" -eq 8 ]; then
+ color=1
+ fi
done
-echo "" >>./index.html
- countImgs=$(find "$subdir" -type f | wc -l)
- countImgs=$((countImgs - 1))
- for i in $(seq 1 $(((countImgs / maxPerPage) + 1))); do
- echo "" >>./index.html
- done
- echo "
" >>./index.html
- echo "" >>./index.html
- echo "
" >> ./index.html
+ echo "" >>./$subhtml
- for wallpaper in ${subdir}/*; do
- if [ "$img_count" -ge $maxPerPage ]; then
+ echo "
" >> ./$subhtml
+
+ echo "" >> ./index.html
- echo "
" >>./$subhtml
- page=$((page + 1))
- subhtml="${section}_page${page}.html"
- touch ./$subhtml
+ echo "" >> ./index.html
+ countImgs=$(find "$subdir" -type f | wc -l)
+ countImgs=$((countImgs - 1))
+ for i in $(seq 1 $((( $countImgs / $maxPerPage)+1))); do
+ echo "" >> ./index.html
+ done
+ echo "
" >> ./index.html
+ echo "" >> ./index.html
+ echo "
" >>./index.html
+ write_img $wallpaper ./$subhtml
+ img_count=$((img_count + 1))
+ done
- color=$((color + 1))
- if [ "$color" -eq 8 ]; then
- color=1
- fi
+ echo "" >> ./$subhtml
+ for wallpaper in ${subdir}/*
+ do
+ if [ "$img_count" -ge $maxPerPage ]; then
- echo "
" >>./$subhtml
+ echo "" >>./$subhtml
- img_count=0
- fi
+ echo "
" >> ./$subhtml
+ page=$((page + 1))
+ subhtml="${section}_page${page}.html"
+ touch ./$subhtml
- write_img $wallpaper ./$subhtml
- img_count=$((img_count + 1))
- done
- echo "" >> ./$subhtml
+ img_count=0
+ fi
- echo "
" >>./index.html
- echo "