#!/bin/bash
cd ~/public_html/gmb/archive
echo -e '<!DOCTYPE html>\n<html lang="en-US">\n<head>\n<title>gmb stats</title>\n</head>\n<body>' > ~/public_html/gmb/stats.html
echo "<p>gauntlet wrote $(ls */[0-9]*.html | wc -l) entries in $(ls -d */ | wc -l) active months.</p>" >> ~/public_html/gmb/stats.html
echo "<p>The blog entries take up $(du -h ~/public_html/gmb | tail -n 1 | awk '{print $1;}') of disk space.</p>" >> ~/public_html/gmb/stats.html
echo -e "<p>Stats were last updated on $(date --utc +%Y-%m-%d\ %H:%M\ UTC.)</p>\n</body>\n</html>" >> ~/public_html/gmb/stats.html