I'm not even sure ANYONE ELSE will use this :)

Dec 09, 2008 14:15

...But nonetheless, I think it's nifty. If you're using a flavour of unix/linux that has bash and wget installed on it, feel free to use it.

#!/bin/bash
url=`echo ${1}`
charname=`echo ${url}|awk -F "=" '{print $3}'`
wget -q -e "header = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" -e "header = Keep-Alive: 300" -e "user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" -e "referer = http://www.google.com" ${url} -O ${charname}.xml
baseurl=http://www.wowhead.com/?compare=
items=`cat ${charname}.xml |grep "id="|awk '{print $7}'|cut -d '"' -f2`
for item in ${items}
do
string=${string}:${item}
done
echo "Armory (ARMOURY, AMERICANS!) XML Saved to file ${charname}.xml."
firefox `echo ${baseurl}${string}`

Pass in a full WoW Armoury url and you'll get a browser window pop up with a wowhead item comparison already populated with that character's equipment. I use it to see what other people's outfits look like on the Dren female model.

For example, pass it:
"http://eu.wowarmory.com/character-sheet.xml?r=Argent%20Dawn&n=Jessalynn"
and you'll get:
"http://www.wowhead.com/?compare=:25977:31727:31436:3428:23489:23484:23488:23487:31421:23482:25485:25926:25937:28041:25618:25825:31415:25256:5976:28056"

Compliments of my Tuesday lunchbreak. :D

Previous post Next post
Up