Skip to main content

Multi-source MTG deck converter for Cockatrice. Supports Moxfield, Archidekt, and more.

Project description

deck2trice

Multi-source MTG deck converter for Cockatrice. Import your Magic: The Gathering decks from Moxfield, Archidekt, and other online deck builders into Cockatrice format.* Please note this has been mostly tested with the Commander format.

License Python 3.12+

Features

  • Support for multiple deck sources (Moxfield, Archidekt)
  • Batch import all decks or select specific ones
  • Preserves deck metadata (commanders, formats, set codes, themes)
  • Simple configuration file or CLI arguments
  • Auto-sync workflow for keeping decks up-to-date

Installation

Pip (environment install)

pip install deck2trice

UV (single run)

uv run deck2trice (command)

Quick Start

Easy Setup (Recommended)

Run once with your preferences - they'll be saved automatically:

deck2trice --source (moxfield|archidekt) --username yourname --deckpath /path/to/decks --all_decks

The path to cockatrice decks is usually :

  • Linux : ~/.local/share/Cockatrice/Cockatrice/decks
  • Windows : "%LOCALAPPDATA%\Cockatrice\Cockatrice\decks

This will get all your public decks on run and parse them to cockatrice with ease!

From then on, just run:

deck2trice

Manual Setup

Or create ~/.deck2trice.yml manually:

username: your_username
source: moxfield  # or 'archidekt'
fetch_all: true
deckpath: /path/to/cockatrice/decks
decks: []

Usage

Basic Commands

# Use config file
deck2trice

# One-off import without config file
deck2trice --no_config --source archidekt --username yourname --all_decks

# Test run without saving
deck2trice --dryrun

Configuration File

Create ~/.deck2trice.yml with these options:

username: your_username        # Required: Your deck site username
source: archidekt              # Required: 'moxfield' or 'archidekt'
deckpath: /path/to/decks       # Optional: Where to save .cod files
fetch_all: true                # true = all decks, false = specific decks only
decks: []                      # Specific deck IDs (when fetch_all: false)

CLI Flags

All flags override config file values:

  • --source <source> - Deck source (moxfield or archidekt)
  • --username <name> - Your username
  • --deckpath <path> - Where to save decks
  • --all_decks - Fetch all decks
  • --no_config - Bypass config file
  • --dryrun - Test without writing files
  • --version - Show version

Supported Sources

Source Status Features
Moxfield Full Support Decks, commanders, sideboards, themes
Archidekt Full Support Decks, commanders, categories, tags

Want another source? Open an issue or submit a PR!

Output Format

Generates .cod files for Cockatrice with:

  • Deck name and description
  • Commander(s) as banner cards
  • Format tags
  • Set codes and collector numbers
  • Scryfall UUIDs
  • Themes/tags
  • Sideboard and maybeboard

Development

Setup

git clone https://github.com/liperium/deck2trice.git
cd deck2trice
uv sync

License

Apache License 2.0 - see LICENSE file for details

Credits

Inspired by moxtrice by Xie Zejian. This fork adds multi-source support and improved architecture.

Support

Project details


Download files

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

Source Distribution

deck2trice-1.0.0.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deck2trice-1.0.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file deck2trice-1.0.0.tar.gz.

File metadata

  • Download URL: deck2trice-1.0.0.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for deck2trice-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3f306d715f668e5d548f8879a01bfa006cf5339feeac6ef67e4ffdf8c03083d2
MD5 2f90135a972bbc5fd8a7b2ca90d596e5
BLAKE2b-256 3c8ca076ee29f1e20950cc4a0893d7e8a50ec3b96cddbc257cc44ed9cb1785d5

See more details on using hashes here.

File details

Details for the file deck2trice-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: deck2trice-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for deck2trice-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a92a6cd4d56096f4e06c321de1793cbcdd4a688d17ab764c832d37c40728d455
MD5 cd23a602a3798be9e2008a7c3a40859d
BLAKE2b-256 dd46907938a06385a1d497742a21a49d78ba207d22eec50378aea00d719524cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page