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.
Metadata
Release files for mtgdeck 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mtgdeck-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / mtgdeck-0.2.0-py3-none-any.whl
| Download URL | mtgdeck-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d2e4f8bb572d400023e018a86dc545914471a72ffb2361a5f6c17c1d8228b70
|
|
BLAKE2b-256 checksum How to use checksums |
bd67f38bd07815d595d7acf81ba0fbf0d673ba8b898a49d904b254089638402d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mtgdeck 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.