It is currently 25 Jun 2019, 12:00
Text Size

Gatherer Indexer

by Nate

Moderators: Snacko, CCGHQ Admins

Gatherer Indexer

Postby Snacko » 12 Feb 2009, 14:04

This doesn't really belong here but it doesn't fit into other forum sections either.

The attached scripts spider The Gatherer and build an SQLite database with all the cards and their revisions available from the gatherer.
It's a work in progress so the code quality is very low as it's mostly a slap together of my old crude scripts.
Might be useful for someone so I'm attaching it here

Sample usage:
php main.php SetSymbol
ex. php main.php DD2
this will get all the cards in all languages from the Jace vs Chandra set

php postprocess.php SetSymbol
ex. php postprocess.php DD2
will set the color / picture number for the cards in the given Set

The set names / symbols have to be set in "sets.txt".
They have to correspond to the ones used by The Gatherer.

Database structure
Code: Select all
CREATE TABLE carddata (
    "id" PK INTEGER,
    "set" TEXT,
    "color" TEXT,
    "pt" TEXT,
    "rarity" TEXT,
    "cost" TEXT,
    "pic" INTEGER,
    "artist" TEXT,
    "collectorNumber" INTEGER

    "id" PK INTEGER,
    "internalId" INTEGER,
    "title" TEXT,
    "type" TEXT,
    "flavor" TEXT,
    "legal" TEXT,
    "language" TEXT
The corresponds to cards.internalId. Also is the id used by the Gatherer and is unique for every card in every language.
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Return to Deck Builder and Excellent Rules Viewer

Who is online

Users browsing this forum: No registered users and 1 guest

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 1 guest

Login Form