A deckbuilder for the commander format of Magic: The Gathering
Find a file
2025-08-21 09:53:55 -07:00
code REstoring accidentally removed functions fro mtag_utils 2025-08-21 09:19:58 -07:00
.dockerignore Added basic docker configuration for test 2025-08-21 09:03:48 -07:00
.gitignore Added basic docker configuration for test 2025-08-21 09:03:48 -07:00
diagnose-volumes.sh Docker troubleshooting ocntinued 2025-08-21 09:44:16 -07:00
docker-compose.interactive.yml Continued testing 2025-08-21 09:53:55 -07:00
docker-compose.yml Continued testing 2025-08-21 09:53:55 -07:00
DOCKER.md docker test 3 2025-08-21 09:35:32 -07:00
Dockerfile Docker troubleshooting ocntinued 2025-08-21 09:44:16 -07:00
LICENSE Removed references to an old card_info script I had originally thought to include. 2025-01-21 09:26:36 -08:00
mypy.ini Finished v2 of deck_builder, should be largely functional, but could use refinements. WIll continue to work on it, but largely satisfied with how it works. 2025-01-17 17:04:02 -08:00
pyproject.toml Added basic docker configuration for test 2025-08-21 09:03:48 -07:00
quick-start.sh docker test 3 2025-08-21 09:35:32 -07:00
README.md Removed references to an old card_info script I had originally thought to include. 2025-01-21 09:26:36 -08:00
requirements.txt Enacted some cleanup of builder.py. moved Imports to the top and cut out duplicate code/moved it to builder_utils.py 2025-08-19 15:00:28 -07:00
run-docker.ps1 SEcond docker test 2025-08-21 09:19:20 -07:00
run-docker.sh Continued testing 2025-08-21 09:53:55 -07:00

# MTG Python Deckbuilder

A command-line tool for building and analyzing Magic: The Gathering decks with advanced features for the Commander/EDH format.

Features

  • Deck Building: Create and manage Commander/EDH decks with intelligent card suggestions and theme detection
  • CSV File Tagging: Automatically tag cards with themes and strategies
  • Commander Support: Comprehensive support for Commander/EDH format rules and restrictions
  • Theme Detection: Identify and suggest cards based on deck themes and strategies
  • Color Identity: Filter cards based on Commander color identity rules
  • Price Checking: Check card prices and stay within budget constraints
  • Data Management: Efficient storage and retrieval of card data using CSV files

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/mtg_python_deckbuilder.git
    cd mtg_python_deckbuilder
    
  2. Install dependencies using pip:

    pip install -r requirements.txt
    

Usage

Run the application using:

python main.py

The main menu provides the following options:

  • Setup: Initialize the card database and perform initial configuration
  • Build a Deck: Create a new Commander deck with theme detection
  • Tag CSV Files: Process and tag card data files

Dependencies

Core dependencies:

  • pandas >= 1.5.0
  • inquirer >= 3.1.3
  • typing-extensions >= 4.5.0
  • fuzzywuzzy
  • python-Levenshtein
  • ipython

Development dependencies:

  • mypy >= 1.3.0
  • pandas-stubs >= 2.0.0
  • types-inquirer >= 3.1.3

Development Setup

  1. Install development dependencies:

    pip install -r requirements.txt
    
  2. Run type checks with mypy:

    mypy .
    

Project Structure

  • main.py: Entry point and CLI interface
  • card_info.py: Card information lookup functionality
  • tagger.py: Card tagging and theme detection
  • setup.py: Database setup and initialization
  • settings.py: Configuration and constants
  • type_definitions.py: Custom type definitions

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.