Long transcribed box titles that defeat search now retry with shorter heads (pre-separator, pre-"Game ..." descriptor, first-two-words from the pre-subtitle part) matched exact-only against the head — fuzzy thresholds stay untouched. Tie-breaks gain a publisher pick: when the box showed a publisher and exactly one exact-named candidate is from that publisher, it wins (SPI's Sorcerer 1975 now beats the more-owned White Wizard Sorcerer 2019). The extract prompt excludes thematic/ subject years from year_hint; re-extracting Flat Top's photo drops the bogus 1942, and a regression test pins that a wrong year can never drive version selection. Re-extraction also drifted two transcriptions (DUNGEON!, and Herbaceous misread as "Hebarceos") — fixtures added; the misread demos review's re-search rescue in the end-to-end run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
bggpipe — Shelf-to-BoardGameGeek Collection Pipeline
Photograph your board game shelves. End up with your whole collection — including which edition of each game you own — cataloged on BoardGameGeek.
photos/ → [1 extract] → titles.json → [2 resolve] → matches.csv
→ [3 review] → matches.csv (approved) → [4 diff] → to_add.csv
→ [5 upload] → upload_log.csv
→ [6 enrich] → games.json
Status: pre-release. The design is complete (full spec); the code is being built. Nothing below works yet.
Why this exists
BGG has no bulk import and no write API. Cataloging a few hundred games by hand means hours of searching, clicking, and second-guessing which of five editions you own. This pipeline replaces that with: take photos, run a command, resolve a handful of ambiguous matches in a review step, done.
How it works
- extract — Shelf photos go to the Anthropic API (Claude vision), which reads game titles off spines and boxes along with edition cues: publisher, edition wording, print year, language.
- resolve — Titles are matched to BGG game IDs via the XML API2 (exact + fuzzy matching, popularity tiebreaks), then edition cues are matched against BGG's version list for each game. Anything uncertain is flagged rather than guessed.
- review — A local review step for ambiguous matches: pick the right game/version, or leave the version blank. Wrong guesses never reach your collection.
- diff — Your existing BGG collection is fetched and compared, per copy (owning one edition of a game doesn't hide a second edition you also own).
- upload — A Playwright browser session logs into your BGG account and adds each game — with its version, when known — politely and slowly, with dry-run mode, per-game logging, and resumability.
- enrich — Full metadata for every game (designers, player counts, weight, rank, mechanics, artwork URLs, version details) lands in
data/games.json, ready to power whatever you build next.
Every stage is idempotent and resumable: kill it mid-run, restart, lose nothing. All artifacts are flat CSV/JSON files you can inspect and edit.
Requirements
- macOS or Linux, Python 3.12+, uv
- An Anthropic API key (vision extraction)
- A BoardGameGeek account and a registered BGG application — as of BGG's 2025 API policy, the XML API requires a Bearer token from a registered app. Register a free non-commercial application at boardgamegeek.com/applications (approval can take a week or more — apply early), then create a token. Each user needs their own — tokens must not be shared.
- Playwright Chromium:
uv run playwright install chromium
Secrets come from environment variables only — ANTHROPIC_API_KEY, BGG_USERNAME, BGG_PASSWORD, BGG_API_TOKEN — and are never written to disk or logs.
A note on being a good BGG citizen
This tool is not affiliated with or supported by BoardGameGeek. It uses only the sanctioned XML API2 for reads (with your own registered application token, per BGG's current policy) and drives the regular website for writes, deliberately slowly (one request every couple of seconds, slower for uploads). Please keep it that way: BGG is a community resource running on community goodwill. You are responsible for your own account — review the dry-run output before a real upload.
License
MIT — see LICENSE.