How a-shygun/terrascope works
Terrascope is a curses-based interactive world map. The user launches it, chooses a tab, navigates and inspects a rendered map, and can enable live layers. Its stages are CLI/configuration, map-data setup, world/frame construction, terminal rendering and input handling, with basemap, time, weather, and aircraft capabilities. The graph preserves these documented branches; some implementation paths are unsampled, so their internal links are omitted. Relationships shown use README statements or source-index references, not inferred sibling pipelines.
Main entry points: layer.py Weather layer · world.py World map state · mapdata.py Map data loading · main.py App startup
Components 28
Application entry
- CLI options
src/terrascope/core/cli.py - App startup
src/terrascope/core/main.py - Interactive runtime
src/terrascope/core/app
Map and terminal
- World map state
src/terrascope/core/world.py - Projection and Braille
src/terrascope/core/view.py - Terminal map UI
src/terrascope/core/ui/map.py - Panels and layout
src/terrascope/core/ui/layout.py - Terminal colors
src/terrascope/core/ui/colors.py
Map layers
- Layer registry
src/terrascope/core/registry.py - Layer framework
src/terrascope/core/layer.py - Base world layer
src/terrascope/layers/basemap/layer.py - Day/night layer
src/terrascope/layers/daynight/layer.py - Astronomy calculations
src/terrascope/layers/daynight/astronomy.py - Weather layer
src/terrascope/layers/weather/layer.py - City weather
src/terrascope/layers/weather/city_weather.py - Forecast panel
src/terrascope/layers/weather/forecast.py - Earthquakes
src/terrascope/layers/weather/earthquakes.py - Radar overlay
src/terrascope/layers/weather/radar.py - Aircraft layer
src/terrascope/layers/flights/layer.py - Aircraft feed
src/terrascope/layers/flights/api.py - Aircraft formatting
src/terrascope/layers/flights/formatting.py
Settings and data
- Configuration
src/terrascope/core/config.py - Map data loading
src/terrascope/core/mapdata.py - User cache
src/terrascope/core/config.py - Weather settings
src/terrascope/layers/weather/config.py - Flight settings
src/terrascope/layers/flights/settings.py
Other components
- Terminal user
- External data services
Connections 32
- Terminal user → CLI options: launches
- CLI options → Configuration: overrides
src/terrascope/core/cli.py - CLI options → App startup: starts
src/terrascope/core/cli.py - App startup → Interactive runtime: runs
src/terrascope/core/main.py - App startup → Map data loading: loads
src/terrascope/core/main.py - App startup → Radar overlay: loads frames
src/terrascope/core/main.py - Configuration → User cache: locates
src/terrascope/core/config.py - Map data loading → User cache: stores downloads
src/terrascope/core/mapdata.py - Interactive runtime → World map state: updates
src/terrascope/core/app/shared.py - Interactive runtime → Terminal map UI: renders
src/terrascope/core/app/shared.py - World map state → Layer framework: renders layers
src/terrascope/core/world.py - World map state → Projection and Braille: uses projection
src/terrascope/core/world.py - Terminal map UI → Projection and Braille: displays frame
src/terrascope/core/ui/map.py - Terminal map UI → Terminal colors: uses colors
src/terrascope/core/ui/map.py - Terminal map UI → Panels and layout: uses layout
src/terrascope/core/ui/map.py - Layer registry → Layer framework: registers layers
src/terrascope/core/registry.py - World map state → Map data loading: uses geometry
src/terrascope/core/world.py - Base world layer → Map data loading: uses map data
src/terrascope/layers/basemap/layer.py - Day/night layer → Astronomy calculations: uses calculations
src/terrascope/layers/daynight/layer.py - Weather layer → City weather: uses readings
src/terrascope/layers/weather/layer.py - Weather layer → Forecast panel: uses forecast
src/terrascope/layers/weather/layer.py - Weather layer → Earthquakes: uses feed
src/terrascope/layers/weather/layer.py - Weather layer → Radar overlay: uses radar
src/terrascope/layers/weather/layer.py - Weather layer → Weather settings: reads settings
src/terrascope/layers/weather/layer.py - Aircraft layer → Aircraft feed: fetches aircraft
src/terrascope/layers/flights/layer.py - Aircraft layer → Aircraft formatting: formats data
src/terrascope/layers/flights/layer.py - Aircraft layer → Flight settings: reads settings
src/terrascope/layers/flights/layer.py - Map data loading → External data services: downloads Natural Earth
- City weather → External data services: requests weather
- Radar overlay → External data services: fetches radar
src/terrascope/layers/weather/radar.py - Aircraft feed → External data services: fetches OpenSky
- Terminal user → World map state: navigates map