A deckbuilder for the commander format of Magic: The Gathering
Find a file
2025-01-17 17:04:02 -08:00
.gitignore Fleshed out docstrings, added typings, cleaned up imports, and added a requirements.txt file 2025-01-14 09:06:59 -08:00
builder_utils.py Finished refactoring and adding docstrings functions. 2025-01-17 11:39:27 -08:00
card_info.py Started adding further logic for deck build 2024-12-19 12:02:26 -08:00
deck_builder.py 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
exceptions.py Finished refactoring and adding docstrings functions. 2025-01-17 11:39:27 -08:00
input_handler.py 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
main.py 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
main.spec 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
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
price_check.py Began work on overhauling the deck_builder 2025-01-14 12:07:49 -08:00
README.md 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
requirements.txt 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
settings.py Finished refactoring and adding docstrings functions. 2025-01-17 11:39:27 -08:00
setup.py 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
setup_utils.py Finished refactoring and adding docstrings functions. 2025-01-17 11:39:27 -08:00
tag_utils.py Fleshed out docstrings, added typings, cleaned up imports, and added a requirements.txt file 2025-01-14 09:06:59 -08:00
tagger.py 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
type_definitions.py Finished refactoring and adding docstrings functions. 2025-01-17 11:39:27 -08: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
  • Card Information: Look up detailed card information with fuzzy name matching
  • 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
  • Get Card Info: Look up detailed information about specific cards
  • 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.