HearthStats/HearthStats.net-Uploader — pull request #443 by shyos (2014-06-26 20:38:42+00:00)
Title: Deck Export Feature

Basically, what this does is that gets deck images as input and returns ```Deck``` Object with the all the information a deck has. Since OSx and Windows uses different image scrapping tools, you can put a code in front of this part to make it viable.

### How to use it?

To export a deck, one need to call ```ExtracterMain.exportDeck()``` function. Here is the pseudo-code:

1. Make sure users deck page in hearthstone is open and visible.
2. Get image of the window(img1)
3. Scroll deck with Robot class
4. Get image of the window(img2- scrolled image of the deck)
5. Call ExtracterMain.exportDeck(img1,img2)

I added a simple ```main()``` funtion to ```ExtracterMain.java``` which basically does above pseudo-code. Try and run it!

### How does it work?

In ```zulu.deckport.txt``` package you will see two txt files. ```cards.txt``` for trained data set for each card on Hearthstone([except these two](https://github.com/shyos/deckport/issues/3)) and ```cardcounts.txt``` for trained data set for card counts 2,3 and 4(above does not trained,yet).

Deck Export uses these information and finds most similar cards for each undefined ```Card``` in deck. Then builds ```Deck``` object with using these similarity ratings.

##### What needs to be done and my questions!

1. As I observed, uploader already have ```Deck.scala``` and ```Card.scala``` files, (and I didn't use scala before), deckexport object files can be merged with these one. I don't know is it possible to do it, but I guess it can be done for the clean code.

2. Afaik, Uploader don't have a UI for deck building, we need to implement this one. I can do this one, just need to decide on design(but not have very good skill on ui design i.e deckport :smile: ).

3. ```deckexport``` requires ```gson``` library. Added it to lib file. Also it should be added to pom.xml (didn't do it cuz I don't want to mess it up)

4. Do we need data training code? If yes, then I will convert it to more generic and easy-to-use version, which users(or at least developers) can train data with using uploader. If no, I can refresh txt files when blizzard add new cards.

###### Side notes
* I have a lot of questions but these are currently I remember.
* zulu means nothing, means Z on ICAO spelling alphabet. Feel free to change package name.