#!/bin/bash
siteroot="../2minNoods_siteroot"
noodspp=40
mkdir -p "$siteroot/img/thumbs"
pageno=1
noodcount=1
# html and css stolen from https://perfectmotherfuckingwebsite.com/
pageheader='''
' >> "$siteroot/index.$page.html"
for ((link=1;link<=pageno;link++)); do
if [ $link -eq $page ]; then
echo -n "$link "
else
echo -n "
$link "
fi
done >> "$siteroot/index.$page.html"
echo '
' >> "$siteroot/index.$page.html"
done
echo "Searching for deleted images"
for i in $siteroot/img/*.jpg; do
pic="$(basename $i)"
if ! grep -Fxq "$pic" "$siteroot/photolist.txt"; then
rm -v "$siteroot/img/thumbs/$pic" "$siteroot/img/$pic"
fi
done
rm -v "$siteroot/photolist.txt"