How gnoccoalpesto/segui_bus works
segui_bus monitors SETA buses and alerts when a selected vehicle or line’s bus approaches a chosen stop. The long-running watch path loads presets and static GTFS, obtains real-time snapshots, builds schedule-aware reports, evaluates proximity and alarm state, then dispatches notifications; the CLI also supports one-shot line, stop, and vehicle lookups. The graph preserves preset-command and Home Assistant capabilities documented in the README. Edges are limited to relationships supported by excerpts, the source index, or README; unsampled details are not assumed.
Main entry points: __main__.py CLI runtime · report.py Schedule-aware report · watch.py Watch and alarm state · static_gtfs.py Static GTFS
Components 22
Runtime orchestration
- CLI runtime
src/segui_bus/__main__.py - Runtime settings
src/segui_bus/config.py - Watch and alarm state
src/segui_bus/service/watch.py
Transit feeds
- Realtime transport
src/segui_bus/service/transport.py - Live snapshots
src/segui_bus/live.py - Realtime fetch
src/segui_bus/fetch.py - GTFS-RT parser
src/segui_bus/gtfsrt.py - Static GTFS
src/segui_bus/static_gtfs.py
Transit analysis
- Transit domain
src/segui_bus/domain.py - Line and stop lookup
src/segui_bus/lookup.py - Geospatial helpers
src/segui_bus/geo.py - Trip progress
src/segui_bus/progress.py - Service-day clock
src/segui_bus/clock.py - Schedule-aware report
src/segui_bus/report.py - Proximity evaluation
src/segui_bus/proximity.py
Presets and alerts
- Preset store
src/segui_bus/presets.py - Telegram commands
src/segui_bus/notify/commands.py - Telegram notifier
src/segui_bus/notify/telegram.py
Other components
- Rider / operator
- BusOne feed service
- Telegram service
- Home Assistant
Connections 36
- Rider / operator → CLI runtime: invokes
src/segui_bus/__main__.py - CLI runtime → Runtime settings: loads
src/segui_bus/__main__.py - CLI runtime → Realtime transport: starts
src/segui_bus/__main__.py - CLI runtime → Live snapshots: fetches
src/segui_bus/__main__.py - CLI runtime → Preset store: loads
src/segui_bus/__main__.py - CLI runtime → Watch and alarm state: configures
src/segui_bus/__main__.py - CLI runtime → Telegram commands: runs
src/segui_bus/__main__.py - CLI runtime → Telegram notifier: dispatches
src/segui_bus/__main__.py - Realtime transport → BusOne feed service: retrieves feeds
README.md - Realtime transport → Runtime settings: uses
src/segui_bus/service/transport.py - Live snapshots → Realtime fetch: fetches
src/segui_bus/live.py - Live snapshots → Static GTFS: uses
src/segui_bus/live.py - Realtime fetch → Runtime settings: uses
src/segui_bus/fetch.py - Realtime fetch → GTFS-RT parser: parses
src/segui_bus/fetch.py - Static GTFS → BusOne feed service: downloads GTFS
src/segui_bus/static_gtfs.py - Static GTFS → Runtime settings: uses
src/segui_bus/static_gtfs.py - GTFS-RT parser → Transit domain: produces objects
src/segui_bus/gtfsrt.py - Line and stop lookup → Static GTFS: resolves routes
src/segui_bus/lookup.py - Line and stop lookup → Geospatial helpers: measures distance
src/segui_bus/lookup.py - Line and stop lookup → Transit domain: uses objects
src/segui_bus/lookup.py - Trip progress → Geospatial helpers: uses geometry
src/segui_bus/progress.py - Trip progress → Transit domain: uses objects
src/segui_bus/progress.py - Schedule-aware report → Line and stop lookup: enriches trips
src/segui_bus/report.py - Schedule-aware report → Trip progress: computes progress
src/segui_bus/report.py - Schedule-aware report → Proximity evaluation: uses proximity
src/segui_bus/report.py - Schedule-aware report → Static GTFS: reads schedule
src/segui_bus/report.py - Schedule-aware report → Service-day clock: converts times
src/segui_bus/report.py - Watch and alarm state → Live snapshots: reads snapshots
src/segui_bus/service/watch.py - Watch and alarm state → Schedule-aware report: builds report
src/segui_bus/service/watch.py - Watch and alarm state → Proximity evaluation: evaluates alarms
src/segui_bus/service/watch.py - Preset store → Static GTFS: resolves against
src/segui_bus/presets.py - Telegram commands → Preset store: manages
src/segui_bus/notify/commands.py - Telegram commands → Watch and alarm state: updates watches
src/segui_bus/notify/commands.py - Telegram commands → Telegram notifier: uses
src/segui_bus/notify/commands.py - Telegram notifier → Telegram service: sends alerts
src/segui_bus/notify/telegram.py - Watch and alarm state → Home Assistant: provides data
README.md