mtg_python_deckbuilder/DECK_LIST_DISPLAY_FEATURE.md
2025-08-21 10:50:22 -07:00

1.8 KiB

Test: Deck List Display Feature

This demonstrates the new feature added for v1.0.0 that automatically displays the completed deck list at the end of the build process.

What's New

When a deck build completes successfully, the application will now:

  1. Export both CSV and TXT files (as before)
  2. Automatically display the TXT contents in a formatted box
  3. Show a user-friendly message indicating the list is ready for copy/paste
  4. Display the file path where the deck was saved

Example Output

============================================================
DECK LIST - Atraxa_Superfriends_20250821.txt
Ready for copy/paste to Moxfield, EDHREC, or other deck builders
============================================================
1 Atraxa, Praetors' Voice
1 Jace, the Mind Sculptor
1 Elspeth, Knight-Errant
1 Vraska the Unseen
1 Sol Ring
1 Command Tower
1 Breeding Pool
... (rest of deck)
============================================================
Deck list also saved to: deck_files/Atraxa_Superfriends_20250821.txt
============================================================

Benefits

  • No more hunting for files: Users see their deck immediately
  • Quick upload to online platforms: Perfect format for Moxfield, EDHREC, etc.
  • Still saves to file: Original file-based workflow unchanged
  • Clean formatting: Easy to read and copy

Technical Details

  • Uses the existing export_decklist_text() method
  • Adds new _display_txt_contents() method for pretty printing
  • Only displays on successful deck completion
  • Handles file errors gracefully with fallback messages
  • Preserves all existing functionality

This feature addresses the common user workflow of wanting to immediately share or upload their completed deck lists without navigating the file system.