Git Product home page Git Product logo

mtg's People

Contributors

chigby avatar gitter-badger avatar jefperito avatar sethmilliken avatar spgar avatar tc01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mtg's Issues

Exact Name

Sometimes you're searching for a card and its name is part of another name, and you get both matches. E.g., "Fork".

Some kind of --exact flag could specify that you want only cards that match the name exactly. I was wondering how to do this, but Gatherer actually helps us out here by having build in regular expression support. Compare mtg fork to mtg "m/^fork$/".

Preceeding " ; " on some cards.

Reminder text on some cards (e.g. Godless shrine) gets its own line, which is replaced but not removed completely, thus there are floating semicolons.

Half mana support

Need better support for 1/2 mana symbols in text boxes and mana costs (viz. Little Girl, Mons's Goblin Waiters).

Add type "conspiracy" to TYPES set in constants.py

Now that Conspiracy is out and "Conspiracy" is listed as an official type on Gatherer, the TYPES set in constants.py should be updated so the --type option can list them (Currently, --type conspiracy tries to search for subtype conspiracy instead, which doesn't exist:

TYPES = set(['artifact', 'basic', 'creature', 'enchantment', 'instant', 'land',
             'legendary', 'ongoing', 'plane', 'planeswalker', 'scheme', 'snow',
             'sorcery', 'tribal', 'vanguard', 'world'])

I could submit a pull request for this, but it's such a simple change that I decided it probably wasn't worth it.

URL Display

Option to display only the Gatherer url for debugging purposes.

Uncaught exception when searching for all cards in unhinged.

[finnre@ruby ~]$ mtg --set='unhinged'
Traceback (most recent call last):
  File "/u/finnre/.local/bin/mtg", line 111, in <module>
    sys.exit(main())
  File "/u/finnre/.local/bin/mtg", line 87, in main
    cards = CardExtractor(url).cards
  File "/u/finnre/.local/lib/python2.7/site-packages/mtglib/card_extractor.py", line 54, in cards
    return self.extract_many()
  File "/u/finnre/.local/lib/python2.7/site-packages/mtglib/card_extractor.py", line 82, in extract_many
    card.power, card.toughness = number.split('/')
ValueError: too many values to unpack

--set=unglued doesn't produce the same error, nor does mtg --text='win the game' --set='unhinged'. Maybe there's a specific card formatted weirdly? I tried searching by individual card names in the set but couldn't reproduce it that way. (Did have fun reading through the results, though.)

Problem installing on bash on windows

Exactly what the title says. I have pip3 installed, and I'm getting an error when installing:

Command /usr/bin/python3 -c "import setuptools, tokenize;file='/tmp/pip_build_nick/mtg/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-gzcrrb4f-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_nick/mtg
Storing debug log for failure in /home/nick/.pip/pip.log

Searching for "--type Legendary --set AKH" throws exception unpacking power/toughness

I attempted to run mtg --type Legendary --set AKH to get a list of all legendary cards from Amonkhet. mtg threw the following exception:

Traceback (most recent call last):
  File "/usr/bin/mtg", line 117, in <module>
    sys.exit(main())
  File "/usr/bin/mtg", line 104, in main
    cards = CardExtractor(url).cards
  File "/usr/lib/python3.6/site-packages/mtglib/card_extractor.py", line 60, in cards
    return self.extract_many()
  File "/usr/lib/python3.6/site-packages/mtglib/card_extractor.py", line 90, in extract_many
    card.power, card.toughness = self.split_pow_tgh(number)
ValueError: not enough values to unpack (expected 2, got 1)

This is using Python 3.6, on Fedora 26, and the latest release (1.6.1).

I thought at first it might be because there is a mix of creature and non-creature legendaries in Amonkhet. However this appears not to be the case because running a similar search over e.g. --set KLD works just fine... so I'm not immediately sure what the issue is.

Card List Limit

Is it possible to get more than 25 cards in a search? I've revised the code for it, but it seemed to be a wizard of the coast's web limitation, as CardList.cards is always <= 25, Am I right?

Verbose mode

There should be a verbosity flag that toggles outputting all the available information about a card.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.