# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):


import re, sys, traceback
import pickle
from bs4 import BeautifulSoup
from MTG import cardtype
from MTG import static_abilities

# from lexer import lexer






def run():
    # switch to sm_cards and replace-all 'all_set', 'sm_set' to just parse a sample of cards
    with open('parser/data/cards.xml') as f:
        soup = BeautifulSoup(f, 'xml')

    card_list = soup.cockatrice_carddatabase.cards.find_all('card')
    cnt = 0
    fout = open("data/all_set_cards.py", "w")
    fout.write("from MTG import card\n"
        "from MTG import gameobject\n"

# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):


# Path: parser/parse_cockatrice.py
import re, sys, traceback
import pickle
from bs4 import BeautifulSoup
from MTG import cardtype
from MTG import static_abilities


# from lexer import lexer






def run():
    # switch to sm_cards and replace-all 'all_set', 'sm_set' to just parse a sample of cards
    with open('parser/data/cards.xml') as f:
        soup = BeautifulSoup(f, 'xml')

    card_list = soup.cockatrice_carddatabase.cards.find_all('card')
    cnt = 0
    fout = open("data/all_set_cards.py", "w")
    fout.write("from MTG import card\n"
        "from MTG import gameobject\n"

        "from MTG import cardtype\n"