enrich_csv
Enrich a raw TCGPlayer Lorcana CSV export with full card data, adding ink color, cost, type, stats, and abilities. Outputs an enriched CSV and a dreamborn.ink-ready file.
Instructions
Enrich a raw TCGPlayer Lorcana CSV export with full card data.
Fetches card data from LorcanaJSON and lorcana-api.com and adds Ink color, Ink Cost, Card Type, Subtypes, Strength, Willpower, Lore Points, Inkable, Keywords, and Abilities to each row.
Writes two output files next to the input: enriched_{filename} — enriched collection CSV dreamborn_{filename} — import-ready CSV for dreamborn.ink
Args: input_path: Absolute path to the raw TCGPlayer CSV export. cache_path: Optional path to a previous enriched CSV to speed up re-runs by skipping API calls for cards already seen. refresh_prices: If True, overwrite each row's TCG Market Price with a live tcgcsv.com lookup for that exact printing, instead of leaving whatever the raw TCGPlayer export had at download time. Use this to bring an old enriched CSV's prices current without re-exporting from TCGPlayer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cache_path | No | ||
| input_path | Yes | ||
| refresh_prices | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |