MTG deck list decoder and encoder library and application
Project description
mtgdeck
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.MtgDeckCockatriceDecoder) mtgdeck.dump(decklist, target, cls=mtgdeck.MtgDeckOCTGNEncoder)
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.
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
File details
Details for the file mtgdeck-0.0.5.tar.gz
.
File metadata
- Download URL: mtgdeck-0.0.5.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e6d269f296e2db0e02fc61f9fb582c3fc8278af944760bbf256f4ef2199f081 |
|
MD5 | c5185992508a34414e4c57c9996dc1ba |
|
BLAKE2b-256 | 717812d786a202e010b21c01e27bc6a62d393e84a937520ff25c51ffbb86a4db |