Refreshes PokéJisho's jisho.json dictionary from PokéAPI,
preserving the hand-curated canonical data. Intended to be run roughly once a year
when a new game adds Pokémon / items / moves.
See DESIGN.md for how it works and why.
npm installBuild the merged dataset (fetches from PokéAPI as needed, then merges):
npm run build-dataset- Output:
dist/jisho.json— the deliverable. Copy it into the iOS and web repos. data/jisho.jsonis the hand-curated canonical layer and is never modified. On any collision (same type + name), the canonical entry wins.- Entries already present in
data/jisho.jsonare skipped before fetching (a slug is derived from each canonical name), so only genuinely new resources hit the network. A cold run is ~1 hour (~2,550 requests at 1.5 s each); re-runs reuse the.cache/and are near-instant. Delete.cache/to force a fresh fetch. - The run is resumable: if it stops, just run it again — cached resources are skipped.
Deploy the result:
cp dist/jisho.json ../pokejisho_ios/PokeJishoKit/Sources/PokeJishoKit/Resources/jisho.json
cp dist/jisho.json ../pokejisho_web/js/... # wherever the web dataset livesChecks the katakana→romaji converter against every existing entry (round-trip diff):
npm run validate-romajiCurrently ~99.3% exact match; the residual is a set of Gen 9 entries the original hand-romanized with a looser convention. Those are preserved via canonical precedence, so the converter only affects genuinely new entries.
Flags entries whose Japanese name matches a PokéAPI resource but whose English
differs — i.e. a misspelled English name in data/jisho.json (e.g. canonical
Ninetails vs. PokéAPI Ninetales):
npm run find-typos # full scan, every category (~1h cold)
npm run find-typos -- pokemon-species # quick scan of one categoryThe full scan fetches the same details build-dataset needs, so it also warms
the cache — running build-dataset afterward is near-instant. Fix any reported
typos in data/jisho.json, then re-run.
After running, review the + ... lines in the build output (the new entries).
Spot-check their romaji, since new entries use the converter rather than hand
curation. If any need correcting, edit data/jisho.json (the canonical layer)
and re-run — canonical always wins.