chigby / mtg Goto Github PK
View Code? Open in Web Editor NEWConsole-based access to the Gatherer Magic Card Database.
License: MIT License
Console-based access to the Gatherer Magic Card Database.
License: MIT License
Rocket-Powered Turbo Slug has nested reminder text, which is not properly removed.
https://bugzilla.redhat.com/show_bug.cgi?id=1792972
mtg/mtglib/gatherer_request.py
Line 3 in c12976d
Thanks for the library!
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$/"
.
As of yesterday mtg
was working for me, but this morning I get "No results found" for every query I can think of.
I'm running Python 3.6.4 on Arch Linux
Fix results/result text.
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.
Need better support for 1/2 mana symbols in text boxes and mana costs (viz. Little Girl, Mons's Goblin Waiters).
Whim of Volrath's reminder text isn't being removed.
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.
Option to display only the Gatherer url for debugging purposes.
[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.)
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
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.
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?
There should be a verbosity flag that toggles outputting all the available information about a card.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.