A neat terminal user interface for viewing public transport departures from stops across Sydney and NSW using Transport for NSW's Open Data APIs.
Mr_Enderkid
Check their project out: Cave Cruncher
Lindamust
Check their project out: Fluid Simulator
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Refactored and rewrote both the list rendering code and the GTFS data handling!
GTFS data is no longer fed directly raw to the rendering code (which cluttered it up with trying to make sense of missing data, etc.) and now goes through an abstraction layer with custom data structures that handle the conversion with From impls.
This allowed me to rewrite the rendering code to clean it up a lot and handle errors better as a side effect.
Created a new crate to help with fetching live vehicle positions from realtime GTFS data called tfnsw-realtime, a thin wrapped around tokio's prost to dynamically generate Rust code based off the .proto files supplied from TfNSW.
Using that data departures now have their vehicle types along with carriage information (e.g. occupancy) displayed if available. Scrolling through the departures list was also added.
Added colours in the terminal for each different train, light rail, intercity and bus line. Also added a display on each departure of that service's lateness with colours too.
Signing off for the night;
Learnt how to use the very nicely named ratatui library to create the basis of a usable and dynamically updating terminal user interface. The interface right now consists only of a title bar, a list of departures (from a hardcoded station, choices coming later) and a details panel, which doesn't work yet.
Started work on the API interface part of this project — the part of the code that interacts with TfNSW's APIs. Created Rust structs for the various data structures that could be returned from the departures endpoint and just logged them to the terminal for now - I will work on making this prettier later once more endpoints and data are collected.