1. John Louis del Rosario
  2. mtgcards

Source

mtgcards /

Filename Size Date modified Message
26 B
921 B
6.9 KB

Gathers data from AngelFire (used by LackeyCCG) to get Magic: The Gathering card/image info and store it in SQLite.

Usage

$ python mtgcards.py
$ python mtgcards.py --help

Requirements

Python 2.7 (works with 2.6 but argparse library needs to be installed)

Structure

Cards

  • Name TEXT
  • [Set] TEXT
  • Slug TEXT
  • ImageFile TEXT
  • Color TEXT
  • Cost TEXT
  • ConvertedCost TEXT
  • Type TEXT
  • Power TEXT
  • Toughness TEXT
  • Rarity TEXT
  • RulesText TEX

    SELECT * FROM Cards WHERE Slug = 'lightning-bolt'

CardImages

  • [Set] TEXT
  • Slug TEXT
  • ImageFile TEXT
  • ImageURL TEXT

    SELECT c.Name, ci.ImageURL FROM Cards c JOIN CardImages ON c.Slug = ci.Slug WHERE Slug = 'lightning-bolt'

Issues

Still has a few issues, but should be enough to get started.