Monday, February 23, 2009

Calculating a gear score by scraping the Armory

I am very impressed by the content of the Armory pages: they're 100% XML. No HTML, no CSS, no Javascript. An XSL spreadsheet does all the magic and a request just returns your full model in XML.

As an experiment, I wrote a quick Ruby script that calculates a gear score for a character. Here is a sample output:
Valorous Bonescythe Helmet:213
Icy Blast Amulet:213
Valorous Bonescythe Pauldrons:213
Valorous Bonescythe Breastplate:213
Belt of the Tortured:213
Valorous Bonescythe Legplates:213
Boots of Captain Ellis:213
Thrusting Bands:213
Dislocating Handguards:213
Strong-Handed Ring:213
Ring of Invincibility:213
Mirror of Truth:200
Fury of the Five Flights:213
Hammerhead Sharkskin Cloak:213
Webbed Death:213
Sinister Revenge:226
Spinning Fate:213
=====
Gear score for Rozz: 3595
Reference: Blue (Superior):2992 Heroic:3096 Naxx10:3200 Naxx25 (Epic):3408 Max:3616
The script is about forty lines of Ruby and you can download it here.

No comments: