mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-09-22 04:50:46 +02:00
A deckbuilder for the commander format of Magic: The Gathering
code | ||
.dockerignore | ||
.gitignore | ||
diagnose-volumes.sh | ||
docker-compose.interactive.yml | ||
docker-compose.yml | ||
DOCKER.md | ||
Dockerfile | ||
LICENSE | ||
mypy.ini | ||
pyproject.toml | ||
quick-start.sh | ||
README.md | ||
requirements.txt | ||
run-docker-linux.sh | ||
run-docker.ps1 | ||
run-docker.sh | ||
test-docker-volumes.sh | ||
test-symlinks.sh |
# 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
-
Clone the repository:
git clone https://github.com/yourusername/mtg_python_deckbuilder.git cd mtg_python_deckbuilder
-
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
-
Install development dependencies:
pip install -r requirements.txt
-
Run type checks with mypy:
mypy .
Project Structure
main.py
: Entry point and CLI interfacecard_info.py
: Card information lookup functionalitytagger.py
: Card tagging and theme detectionsetup.py
: Database setup and initializationsettings.py
: Configuration and constantstype_definitions.py
: Custom type definitions
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.