Release v1.1.0: headless runner + tagging updates (Discard Matters, Freerunning, Craft, Spree, Explore/Map, Rad, Energy/Resource Engine, Spawn/Scion)

This commit is contained in:
matt 2025-08-22 16:32:39 -07:00
parent 36abbaa1dd
commit 99005c19f8
23 changed files with 1330 additions and 420 deletions

View file

@ -1,47 +1,59 @@
# MTG Python Deckbuilder ${VERSION}
## Highlights
- Direct-to-builder launch with automatic initial setup and tagging
- Improved Type Summary (accurate Commander/Creature/etc. counts)
- Smarter export filenames: full commander name + ordered themes + date, with auto-increment
- TXT export duplication fixed
- Post-build prompt to build another deck or quit
- Headless mode with a submenu in the main menu (auto-runs single config; lists multiple as "Commander - Theme1, Theme2, Theme3"; `deck.json` labeled "Default")
- Config precedence: CLI > env > JSON > defaults; honors `ideal_counts` in JSON
- Exports: CSV/TXT always; JSON run-config only for interactive runs (headless skips it)
- Smarter filenames: commander + ordered themes + date, with auto-increment when exists
## Docker
- Multi-arch image (amd64, arm64) on Docker Hub
- Persistent volumes:
- Single service; persistent volumes:
- /app/deck_files
- /app/logs
- /app/csv_files
- Optional: /app/config (mount `./config` for JSON configs)
### Quick Start
```bash
mkdir mtg-decks && cd mtg-decks
docker run -it --rm \
-v "$(pwd)/deck_files":/app/deck_files \
-v "$(pwd)/logs":/app/logs \
-v "$(pwd)/csv_files":/app/csv_files \
```powershell
# From Docker Hub
docker run -it --rm `
-v "${PWD}/deck_files:/app/deck_files" `
-v "${PWD}/logs:/app/logs" `
-v "${PWD}/csv_files:/app/csv_files" `
mwisnowski/mtg-python-deckbuilder:latest
# From source with Compose
docker compose build
docker compose run --rm mtg-deckbuilder
# Headless (optional)
docker compose run --rm -e DECK_MODE=headless mtg-deckbuilder
# With JSON config
docker compose run --rm -e DECK_MODE=headless -e DECK_CONFIG=/app/config/deck.json mtg-deckbuilder
```
Windows PowerShell users: see WINDOWS_DOCKER_GUIDE.md or run:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/mwisnowski/mtg_python_deckbuilder/main/run-from-dockerhub.bat" -OutFile "run-from-dockerhub.bat" run-from-dockerhub.bat
## Changes
- Auto-setup/tagging when `csv_files/cards.csv` is missing (both main and builder)
- Main entrypoint now skips menu and launches the deck builder
- Type summary classification matches export categories; uses snapshot fallback
- Export filenames:
- Full commander name (punctuation removed)
- All themes in order
- Date suffix (YYYYMMDD)
- Auto-increment when file exists
- Removed duplicate TXT sidecar creation in CSV export
- Added headless runner and main menu headless submenu
- JSON export is suppressed in headless; interactive runs export replayable JSON to `config/`
- `ideal_counts` supported and honored by prompts; only `fetch_count` tracked for lands
- Documentation simplified and focused; Docker guide trimmed and PowerShell examples updated
### Tagging updates
- New: Discard Matters theme detects your discard effects and triggers; includes Madness and Blood creators; Loot/Connive/Cycling/Blood also add Discard Matters.
- New taggers:
- Freerunning → adds Freerunning and Cost Reduction.
- Craft → adds Transform; conditionally Artifacts Matter, Exile Matters, Graveyard Matters.
- Spree → adds Modal and Cost Scaling.
- Explore/Map → adds Card Selection; Explore may add +1/+1 Counters; Map adds Tokens Matter.
- Rad counters → adds Rad Counters.
- Exile Matters expanded to cover Warp and Time Counters/Time Travel/Vanishing.
- Energy enriched to also tag Resource Engine.
- Eldrazi Spawn/Scion creators now tag Aristocrats and Ramp (replacing prior Sacrifice Fodder mapping).
## Known Issues
- First run downloads card data; may take several minutes
- Ensure volume mounts are present to persist files outside the container
- First run downloads card data (takes a few minutes)
- Use `docker compose run --rm` (not `up`) for interactive sessions
- Ensure volumes are mounted to persist files outside the container
## Links
- Repo: https://github.com/mwisnowski/mtg_python_deckbuilder