Page 1 of 1

Automated File Submission for Linux Users

Posted: Fri Dec 14, 2007 5:11 pm
by Jorudencia
Hi everyone,

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


Posted: Sat Dec 15, 2007 9:47 am
by Tartara
That would probably work for Mac users, too. I'll try it out later today.

Posted: Sat Dec 15, 2007 4:01 pm
by Jorudencia
Cool. Let me know how it works out.