Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

MTG deck list decoder and encoder library and application

Project Description

MTG decklist decoder and encoder library and application

What is it?

mtgdeck is an application and library for decoding and encoding various decklist formats for Magic: The Gathering.

Usage

Automatically determine input format in standard input and encode using default encoder (text) to standard output:

mtgdeck < input.mws > output.txt

The same as above, but from Python:

import sys
import mtgdeck
mtgdeck.dump(mtgdeck.load(sys.stdin), sys.stdout)

Decode a Cockatrice decklist and encode to OCTGN, specifying files:

mtgdeck -d cod -e octgn -i input.cod -o output.o8d

And in Python:

import mtgdeck
src = open('input.cod')
target = open('output.o8d', 'w')
decklist = mtgdeck.load(src, cls=mtgdeck.CockatriceDecoder)
mtgdeck.dump(decklist, target, cls=mtgdeck.OCTGNEncoder)

Formats

mtgdeck currently supports the following formats:

Magic online:text (.txt and .dec)
Magic Workstation:
 mws (.mwDeck)
OCTGN:o8d (.o8d)
Cockatrice:cod (.cod)

The default decoder is auto: it tries to infer the correct decklist format. The default encoder is text.

Installation

pip install mtgdeck
mtgdeck --help  # or python -m mtgdeck --help

Contributing

See the Contribution guidelines file.

Release History

This version
History Node

0.2.0

History Node

0.1.0

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.1

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
mtgdeck-0.2.0-py3-none-any.whl
(11.6 kB) Copy SHA256 Hash SHA256
Wheel 3.6 Dec 30, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting