Add detailed workflow runbook for building decks from collection
This commit is contained in:
154
README.md
154
README.md
@@ -71,11 +71,159 @@ python scripts/deck_report.py --collection collection_hydrated/deck.json --decks
|
||||
|
||||
## Workflow
|
||||
|
||||
### Quick Reference
|
||||
|
||||
1. **Import** - Place text decklists in `collection/`
|
||||
2. **Hydrate** - Run `hydrate.py` to fetch Scryfall data → `collection_hydrated/`
|
||||
3. **Define** - Create deck JSON files in `decks/`
|
||||
4. **Analyze** - Run `analyze_decks.py` to find upgrade options
|
||||
5. **Report** - Use `deck_report.py` for markdown summaries
|
||||
3. **Explore** - Find synergies and commanders in your collection
|
||||
4. **Define** - Create deck JSON files in `decks/`
|
||||
5. **Analyze** - Run `analyze_decks.py` to find upgrade options
|
||||
6. **Report** - Use `deck_report.py` for markdown summaries
|
||||
|
||||
---
|
||||
|
||||
## Runbook: Build a Deck From Your Collection
|
||||
|
||||
### Step 1: Import Your Collection
|
||||
|
||||
Create a text file in `collection/` with your cards (one per line):
|
||||
|
||||
```
|
||||
1 Sol Ring (CMA) 1
|
||||
3 Birds of Paradise (M12) 165
|
||||
1 Eternal Witness (EMA) 183
|
||||
```
|
||||
|
||||
Format: `<count> <Card Name> (<Set Code>) <Collector Number>`
|
||||
|
||||
The set code and collector number are optional but help with accuracy.
|
||||
|
||||
### Step 2: Hydrate Your Collection
|
||||
|
||||
Fetch card data from Scryfall:
|
||||
|
||||
```bash
|
||||
python hydrate.py hydrate collection/my_cards.txt -o collection_hydrated/ -c card_cache.json
|
||||
```
|
||||
|
||||
This creates:
|
||||
- `collection_hydrated/deck.json` - All cards with full data
|
||||
- `collection_hydrated/creatures.json` - Creatures only
|
||||
- `collection_hydrated/instants.json`, `sorceries.json`, etc.
|
||||
|
||||
### Step 3: Explore Your Collection
|
||||
|
||||
**View color distribution:**
|
||||
```bash
|
||||
python -c "
|
||||
import json
|
||||
from collections import Counter
|
||||
cards = json.load(open('collection_hydrated/deck.json'))
|
||||
colors = Counter(c for card in cards for c in card.get('color_identity', []))
|
||||
for c, n in colors.most_common(): print(f'{c}: {n}')
|
||||
"
|
||||
```
|
||||
|
||||
**Find creature types you own:**
|
||||
```bash
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --creature-type Elf
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --creature-type Elemental
|
||||
```
|
||||
|
||||
**Find cards by keyword/mechanic:**
|
||||
```bash
|
||||
# Find all landfall cards
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --keywords landfall
|
||||
|
||||
# Find lifegain synergies
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --keywords "gain life"
|
||||
|
||||
# Find -1/-1 counter cards
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --keywords "-1/-1 counter"
|
||||
```
|
||||
|
||||
**Find cards by color identity:**
|
||||
```bash
|
||||
# Simic (UG) cards
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --colors U G
|
||||
|
||||
# Esper (WUB) instants
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --colors W U B --type instant
|
||||
```
|
||||
|
||||
### Step 4: Choose a Commander
|
||||
|
||||
Based on your collection strengths, pick a commander that matches:
|
||||
- Your most abundant colors
|
||||
- Creature types you have many of
|
||||
- Mechanics with good support in your collection
|
||||
|
||||
### Step 5: Create the Deck File
|
||||
|
||||
Create `decks/<deck_name>.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "My Deck Name",
|
||||
"commander": "Commander Name",
|
||||
"colors": ["U", "G"],
|
||||
"archetype": "Simic Value",
|
||||
"cards": {
|
||||
"Sol Ring": 1,
|
||||
"Birds of Paradise": 1,
|
||||
"Eternal Witness": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Step 6: Analyze for Upgrades
|
||||
|
||||
Find cards in your collection that fit your deck:
|
||||
|
||||
```bash
|
||||
python scripts/analyze_decks.py --collection collection_hydrated/deck.json --deck-dir decks/
|
||||
```
|
||||
|
||||
This compares your deck against your collection and suggests:
|
||||
- Cards matching your commander's color identity
|
||||
- Cards with synergistic mechanics
|
||||
- Cards not yet in the deck
|
||||
|
||||
### Step 7: Generate a Report
|
||||
|
||||
```bash
|
||||
python scripts/deck_report.py --collection collection_hydrated/deck.json --decks-dir decks/ --output report.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Example: Building a Deck From Scratch
|
||||
|
||||
```bash
|
||||
# 1. Add your collection
|
||||
echo "1 Ashling, Rekindled // Ashling, Rimebound (ECL) 124" >> collection/my_cards.txt
|
||||
|
||||
# 2. Hydrate
|
||||
python hydrate.py hydrate collection/my_cards.txt -o collection_hydrated/ -c card_cache.json
|
||||
|
||||
# 3. Find red instants/sorceries (spellslinger support)
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --colors R --type instant
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --colors R --type sorcery
|
||||
|
||||
# 4. Create deck file
|
||||
cat > decks/ashling.json << 'EOF'
|
||||
{
|
||||
"name": "Ashling Spellslinger",
|
||||
"commander": "Ashling, Rekindled // Ashling, Rimebound",
|
||||
"colors": ["R"],
|
||||
"archetype": "Mono-Red Spellslinger",
|
||||
"cards": {}
|
||||
}
|
||||
EOF
|
||||
|
||||
# 5. Analyze and find synergies
|
||||
python scripts/analyze_decks.py --collection collection_hydrated/deck.json --deck-dir decks/
|
||||
```
|
||||
|
||||
## Collection Stats
|
||||
|
||||
|
||||
154
docs/templates/README.template.md
vendored
154
docs/templates/README.template.md
vendored
@@ -66,11 +66,159 @@ python scripts/deck_report.py --collection collection_hydrated/deck.json --decks
|
||||
|
||||
## Workflow
|
||||
|
||||
### Quick Reference
|
||||
|
||||
1. **Import** - Place text decklists in `collection/`
|
||||
2. **Hydrate** - Run `hydrate.py` to fetch Scryfall data → `collection_hydrated/`
|
||||
3. **Define** - Create deck JSON files in `decks/`
|
||||
4. **Analyze** - Run `analyze_decks.py` to find upgrade options
|
||||
5. **Report** - Use `deck_report.py` for markdown summaries
|
||||
3. **Explore** - Find synergies and commanders in your collection
|
||||
4. **Define** - Create deck JSON files in `decks/`
|
||||
5. **Analyze** - Run `analyze_decks.py` to find upgrade options
|
||||
6. **Report** - Use `deck_report.py` for markdown summaries
|
||||
|
||||
---
|
||||
|
||||
## Runbook: Build a Deck From Your Collection
|
||||
|
||||
### Step 1: Import Your Collection
|
||||
|
||||
Create a text file in `collection/` with your cards (one per line):
|
||||
|
||||
```
|
||||
1 Sol Ring (CMA) 1
|
||||
3 Birds of Paradise (M12) 165
|
||||
1 Eternal Witness (EMA) 183
|
||||
```
|
||||
|
||||
Format: `<count> <Card Name> (<Set Code>) <Collector Number>`
|
||||
|
||||
The set code and collector number are optional but help with accuracy.
|
||||
|
||||
### Step 2: Hydrate Your Collection
|
||||
|
||||
Fetch card data from Scryfall:
|
||||
|
||||
```bash
|
||||
python hydrate.py hydrate collection/my_cards.txt -o collection_hydrated/ -c card_cache.json
|
||||
```
|
||||
|
||||
This creates:
|
||||
- `collection_hydrated/deck.json` - All cards with full data
|
||||
- `collection_hydrated/creatures.json` - Creatures only
|
||||
- `collection_hydrated/instants.json`, `sorceries.json`, etc.
|
||||
|
||||
### Step 3: Explore Your Collection
|
||||
|
||||
**View color distribution:**
|
||||
```bash
|
||||
python -c "
|
||||
import json
|
||||
from collections import Counter
|
||||
cards = json.load(open('collection_hydrated/deck.json'))
|
||||
colors = Counter(c for card in cards for c in card.get('color_identity', []))
|
||||
for c, n in colors.most_common(): print(f'{c}: {n}')
|
||||
"
|
||||
```
|
||||
|
||||
**Find creature types you own:**
|
||||
```bash
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --creature-type Elf
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --creature-type Elemental
|
||||
```
|
||||
|
||||
**Find cards by keyword/mechanic:**
|
||||
```bash
|
||||
# Find all landfall cards
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --keywords landfall
|
||||
|
||||
# Find lifegain synergies
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --keywords "gain life"
|
||||
|
||||
# Find -1/-1 counter cards
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --keywords "-1/-1 counter"
|
||||
```
|
||||
|
||||
**Find cards by color identity:**
|
||||
```bash
|
||||
# Simic (UG) cards
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --colors U G
|
||||
|
||||
# Esper (WUB) instants
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --colors W U B --type instant
|
||||
```
|
||||
|
||||
### Step 4: Choose a Commander
|
||||
|
||||
Based on your collection strengths, pick a commander that matches:
|
||||
- Your most abundant colors
|
||||
- Creature types you have many of
|
||||
- Mechanics with good support in your collection
|
||||
|
||||
### Step 5: Create the Deck File
|
||||
|
||||
Create `decks/<deck_name>.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "My Deck Name",
|
||||
"commander": "Commander Name",
|
||||
"colors": ["U", "G"],
|
||||
"archetype": "Simic Value",
|
||||
"cards": {
|
||||
"Sol Ring": 1,
|
||||
"Birds of Paradise": 1,
|
||||
"Eternal Witness": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Step 6: Analyze for Upgrades
|
||||
|
||||
Find cards in your collection that fit your deck:
|
||||
|
||||
```bash
|
||||
python scripts/analyze_decks.py --collection collection_hydrated/deck.json --deck-dir decks/
|
||||
```
|
||||
|
||||
This compares your deck against your collection and suggests:
|
||||
- Cards matching your commander's color identity
|
||||
- Cards with synergistic mechanics
|
||||
- Cards not yet in the deck
|
||||
|
||||
### Step 7: Generate a Report
|
||||
|
||||
```bash
|
||||
python scripts/deck_report.py --collection collection_hydrated/deck.json --decks-dir decks/ --output report.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Example: Building a Deck From Scratch
|
||||
|
||||
```bash
|
||||
# 1. Add your collection
|
||||
echo "1 Ashling, Rekindled // Ashling, Rimebound (ECL) 124" >> collection/my_cards.txt
|
||||
|
||||
# 2. Hydrate
|
||||
python hydrate.py hydrate collection/my_cards.txt -o collection_hydrated/ -c card_cache.json
|
||||
|
||||
# 3. Find red instants/sorceries (spellslinger support)
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --colors R --type instant
|
||||
python scripts/find_synergies.py --collection collection_hydrated/deck.json --colors R --type sorcery
|
||||
|
||||
# 4. Create deck file
|
||||
cat > decks/ashling.json << 'EOF'
|
||||
{
|
||||
"name": "Ashling Spellslinger",
|
||||
"commander": "Ashling, Rekindled // Ashling, Rimebound",
|
||||
"colors": ["R"],
|
||||
"archetype": "Mono-Red Spellslinger",
|
||||
"cards": {}
|
||||
}
|
||||
EOF
|
||||
|
||||
# 5. Analyze and find synergies
|
||||
python scripts/analyze_decks.py --collection collection_hydrated/deck.json --deck-dir decks/
|
||||
```
|
||||
|
||||
## Collection Stats
|
||||
|
||||
|
||||
Reference in New Issue
Block a user