Magic: the Gathering decklist parser
Project description
mtg-parser
How to install
pip install mtg-parser
Run tests
This project uses poetry
, please refer to their website on how to install it.
Then, clone the repository and:
$ make install lint test
How to publish a new version
Test version
$ poetry version (premajor|preminor|prepatch|prerelease)
$ make test lint build clean test-publish
Release version
$ poetry version (major|minor|patch)
$ make test lint build clean publish
How to use
import mtg_parser
decklist = """
1 Atraxa, Praetors' Voice
1 Imperial Seal
1 Lim-Dûl's Vault
1 Jeweled Lotus (CMR) 319
1 Llanowar Elves (M12) 182
3 Brainstorm #Card Advantage #Draw
"""
cards = mtg_parser.parse_deck(decklist)
for card in cards:
print(card['quantity'], card['card_name'])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mtg_parser-0.0.1a2.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for mtg_parser-0.0.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92fba025e76d82292a87cec0332ccd940dfc8b8a99e57faa612dfce46ae6489e |
|
MD5 | 097063b7e7954834b02d5f62c98e50f6 |
|
BLAKE2b-256 | bf041ae2c57c59570ecb658f2c899939438d5cc2d1f95b6f491b4862c2951cae |