How veekun/pokedex works
Pokedex is a Pokémon game-data library and CLI: source data is loaded into a relational database, then accessed through search and lookup tools. The graph also shows the translation, media, and save-structure interfaces advertised or evidenced by the repository. Sampled excerpts establish the CLI load/search paths and the database-backed operations; other library modules are included by their exact tree paths, but their internal wiring is not inferred.
Main entry points: main.py Command dispatcher · load.py CSV loader · __init__.py Save-file interface · search.py Search command
Components 16
CLI workflows
- Command dispatcher
pokedex/main.py - Search command
pokedex/cli/search.py
Data and schema
- CSV loader
pokedex/db/load.py - Translation handling
pokedex/db/translations.py - Game-data schema
pokedex/db/tables.py
Search and lookup
- Structured search
pokedex/search.py - Name lookup index
pokedex/lookup.py
Library interfaces
- Game formulae
pokedex/formulae.py - Game compatibility
pokedex/compatibility.py - Media accessors
pokedex/util/media.py - Pokémon save structures
pokedex/struct/_pokemon_struct.py - Save-file interface
pokedex/struct/__init__.py
Other components
- CLI user
- CSV data source
- Relational database
- Whoosh index
Connections 18
- CLI user → Command dispatcher: runs commands
- Command dispatcher → Search command: dispatches search
- Search command → Command dispatcher: gets session
- Command dispatcher → Relational database: opens session
- Command dispatcher → CSV loader: runs load
- CSV data source → CSV loader: reads CSV
- CSV loader → Translation handling: loads translations
- CSV loader → Game-data schema: uses tables
- CSV loader → Relational database: writes rows
- Search command → Structured search: runs query
- Structured search → Game-data schema: queries models
- Structured search → Relational database: reads records
- Command dispatcher → Name lookup index: opens lookup
- Name lookup index → Whoosh index: queries index
- Name lookup index → Relational database: resolves records
- Save-file interface → Pokémon save structures: parses structure
- Save-file interface → Game-data schema: loads game data
- Save-file interface → Relational database: queries records