I play WoW under Linux using WINE, and it occurred to me to write a short cron script to automate the uploading of my census data. I figured I would post it here, in case anyone might find it useful. Note: it relies on the curl utility which should be available in most distros.
Code: Select all
#! /bin/bash
#
# Set the variables below to the appropriate values for your install.
#
DATA_FILE=/home/jo/.wine/drive_c/WoW/wtf/Account/XXXXXXX/SavedVariables/CensusPlus.lua
COOKIES_FILE=/home/jo/.mozilla/firefox/u3okhyic.default/cookies.txt
OUTPUT_FILE=/home/jo/censusplus_submit_result.html
LOG_FILE=/home/jo/censusplus_submit.log
/usr/bin/curl -v -b $COOKIES_FILE \
-F userfile=@$DATA_FILE \
http://www.warcraftrealms.com/receivefile.php \
> $OUTPUT_FILE 2>>$LOG_FILE