How veirt/weathr works
weathr is a terminal weather app whose main workflow is to load settings, resolve a location, obtain weather data, and render an animated ASCII scene with a weather HUD. The graph includes the documented provider, location, theme, and animation capabilities. Some wiring is based on README or SOURCE INDEX references because the corresponding implementations were not excerpted; those limits are reflected in the edges.
Main entry points: app.rs App loop · main.rs CLI entry · client.rs Weather client · mod.rs Scene registry
Components 23
Application
- CLI entry
src/main.rs - Configuration
src/config.rs - App loop
src/app.rs - Weather state
src/app_state.rs
Weather and Location
- Weather cache
src/cache.rs - Auto location
src/geolocation.rs - Weather client
src/weather/client.rs - Weather providers
src/weather/provider - Open-Meteo
src/weather/provider/open_meteo.rs - Met Office
src/weather/provider/met_office.rs - Weather normalization
src/weather/normalizer.rs - Weather model
src/weather/types.rs - Nominatim geocoding
- IP location service
Scene and Rendering
- Theme registry
src/theme/mod.rs - World scene
src/scene/world - Scene registry
src/scene/mod.rs - Scene overlay
src/scene/overlay.rs - World styling
src/scene/world/style.rs - Terminal renderer
src/render/mod.rs
Animation Systems
- Animation manager
src/animation_manager.rs - Weather animations
src/animation
Other components
- Terminal user
Connections 25
- Terminal user → CLI entry: runs
README.md - CLI entry → Configuration: loads settings
src/main.rs - CLI entry → Auto location: resolves location
src/main.rs - CLI entry → App loop: starts app
src/main.rs - CLI entry → Weather client: creates client
- Auto location → IP location service: detects location
README.md - Configuration → Nominatim geocoding: configures geocoding
README.md - App loop → Weather client: fetches weather
src/app.rs - Weather client → Weather providers: dispatches request
src/weather/client.rs - Weather providers → Open-Meteo: implements provider
src/weather/provider/mod.rs - Weather providers → Met Office: implements provider
src/weather/provider/mod.rs - Weather client → Weather normalization: normalizes response
src/weather/client.rs - Weather normalization → Weather model: produces model
src/weather/normalizer.rs - Weather client → Weather cache: uses cache
src/weather/client.rs - App loop → Weather state: updates state
src/app.rs - Theme registry → Scene registry: selects scene
src/app.rs - App loop → Scene registry: registers scene
src/app.rs - Scene registry → World scene: registers world
src/scene/mod.rs - World scene → World styling: uses styling
src/scene/world/mod.rs - Scene registry → Scene overlay: supports overlays
src/scene/mod.rs - App loop → Animation manager: renders animation
src/app.rs - Animation manager → Weather animations: dispatches frames
src/animation_manager.rs - Animation manager → Terminal renderer: draws frame
src/animation_manager.rs - World scene → Terminal renderer: renders scene
src/scene/world/mod.rs - App loop → Terminal renderer: renders HUD
src/app.rs