This page will walk you through creating a new mineral parser for EVEMon and hopefully demystify the whole process. Get your Corporation's minerals listed today!

Setting Up

First, you'll need to get a fresh copy of EVEMon. Refer to the EvemonRepository guide for help.

We'll be focusing our efforts in the EVEMon.Sales module. First, create a new class for your parser in EVEMon.Sales. I'll be creating a parser for EVE-Central.

http://evemon.battleclinic.com/images/parser-walkthrough/newClass.png

Feel free to reference the other parsers as you go. For xml-based feeds, the BattleclinicParser? is an excellent reference. For non-xml feeds, the CXI feed is a good, simple reference.

Once you've created your parser, give it whatever name you want and make sure it implements IMineralParser.

http://evemon.battleclinic.com/images/parser-walkthrough/classBlock.png

Now you're going to have to write a regular expression to parse the data. I suggest using a regular expression tool like The Regulator to create and test your regular expression.

http://evemon.battleclinic.com/images/parser-walkthrough/regulator.png

Now drop your regular expression into your class:

http://evemon.battleclinic.com/images/parser-walkthrough/tokenizerCode.png

EVEMon will display your parser info and a link to your site using data from your class

http://evemon.battleclinic.com/images/parser-walkthrough/parserInfo.png

This is the hard part. Ultimately, your class needs to provide an IEnumerable of Pair objects containing the name and price for your minerals. This is done using the yield return statement. I like making screenshots:

http://evemon.battleclinic.com/images/parser-walkthrough/meat.png

And now you're done!