kihashi / mtg-irc

A module for the IRC Bot Phenny that allows users to query magic cards.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor Eprice

kihashi opened this issue · comments

  1. Use the database.
  2. Update the DB no more than once per day.

I don't think that you can link the mtgoprice table to CardRelease or Expansion because he abbreviations are not guaranteed to be standard as well as there being online only sets.

So the db table will look like:

card = Card(ManyToOne)
expansion = String
price = float

I am not going to implement foil pricing at this time.

I have added a parser for it. Each CardRelease has an associated MTGOPrice object. I was able to do this by adding edition searching by old code and gatherer code. The price list seems to use a mixture of both, so now edition searching searches code, then gatherer code, then old code.

I still need to figure out how to deal with promo cards and sets like vintage masters and theme decks.

Forgot to mention, it also does not deal with split cards at the moment.

I added the bot command for it. Also fixed a problem where the prices were not being committed to the DB.

I added a 4th MTGO Code for sets, so now you can search by that too. These had to be added manually in the build process from a dictionary file for the few sets that had odd codes.