#! /bin/bash

began=$(date +%Y%m%d%H%M%S)

cd wp_temp/
wget -r http://fedora.library.northwestern.edu/inu-afrmaps/
cd fedora.library.northwestern.edu/
cd inu-afrmaps/
mogrify -format png *.tif
cd ../../../
python upload.py -log -noverify -keep -putthrottle:15 wp_temp/fedora.library.northwestern.edu/inu-afrmaps/*.png "taken from http://fedora.library.northwestern.edu/inu-afrmaps/ and converted to png with mogrify"

ended=$(date +%Y%m%d%H%M%S)
time=$($ended - $began)
echo "Runtime: $time" > stats

exit 0