mantimon-tcg/backend
Cal Corum adb55dec12 Fix scraper to preserve energy types in effect text
The source website uses <span class='energy-text energy-text--type-fire'>
to render inline energy icons. BeautifulSoup's get_text() was stripping
these spans, losing the energy type information and causing merged text
like 'Discard aEnergy' instead of 'Discard a Fire Energy'.

Changes:
- Add ENERGY_TEXT_TYPES mapping for inline energy references
- Add replace_energy_text_spans() to convert spans to text before extraction
- Add extract_effect_text() helper with proper text joining (separator=' ')
- Update parse_attack(), parse_ability(), _parse_trainer_details() to use it
- Fix JSON encoding in convert_cards.py to use UTF-8 (ensure_ascii=False)

Before: 'Discard an Energy from this Pokémon'
After:  'Discard a Fire Energy from this Pokémon'

Re-scraped all 372 cards and regenerated 382 definitions.
2026-01-27 15:10:02 -06:00
..
app Add CardService and card data conversion pipeline 2026-01-27 14:16:40 -06:00
data Fix scraper to preserve energy types in effect text 2026-01-27 15:10:02 -06:00
project_plans Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
references Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
scripts Fix scraper to preserve energy types in effect text 2026-01-27 15:10:02 -06:00
tests Add CardService and card data conversion pipeline 2026-01-27 14:16:40 -06:00
.env.example Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
.gitignore Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
.python-version Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
alembic.ini Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
docker-compose.yml Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
PROJECT_PLAN_MASTER.json Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
PROJECT_PLAN.json Complete LOW-001: Verify comprehensive docstring coverage 2026-01-26 14:55:03 -06:00
pyproject.toml Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
uv.lock Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00