예제 #1
0
def cmd_link(arg):
    """Display a Gatherer link for a card.

    Required: The card name.
    """
    if not arg:
        raise UsageError('CARD')
    print(cards.url(arg))
예제 #2
0
def cmd_link(arg):
    """Display a Gatherer link for a card.

    Required: The card name.
    """
    if not arg:
        raise UsageError('CARD')
    print(cards.url(arg))
예제 #3
0
def cmd_web(arg):
    """Open default web browser to a card or mtgdeckbuilder deck.

    Required: The card name or mtgdeckbuilder deck ID number.
    """
    if not arg:
        raise UsageError("CARD|DECK_ID")
    elif re.match("\d+$", arg):
        webbrowser.open_new_tab("http://www.mtgdeckbuilder.net/Decks/ViewDeck/" + arg)
    else:
        webbrowser.open_new_tab(cards.url(arg))
예제 #4
0
def cmd_web(arg):
    """Open default web browser to a card or mtgdeckbuilder deck.

    Required: The card name or mtgdeckbuilder deck ID number.
    """
    if not arg:
        raise UsageError('CARD|DECK_ID')
    elif re.match('\d+$', arg):
        webbrowser.open_new_tab(
            'http://www.mtgdeckbuilder.net/Decks/ViewDeck/' + arg)
    else:
        webbrowser.open_new_tab(cards.url(arg))