BinghamtonBetterBus-v2/src/shared/bin/test.dart
Levi Lesches e8de6475c7
Optimizations (#15)
- Add walking transfers
- Pick route with minimal walking distance, instead of stop count
- Turned `shared` into the new server, client no longer relies on `server`
- Prepare to send full route data (instead of string) to the client
2025-05-04 03:19:06 -04:00

18 lines
534 B
Dart

// User-facing script
// ignore_for_file: avoid_print
import "package:shared/generator.dart";
void main(List<String> args) async {
final provider = args.first;
final routeName = args.last;
final routes = await Generator.routes.parse();
final stops = await Generator.stops.parse();
final routeID = RouteID(Provider.fromJson(provider), routeName);
final route = routes[routeID]!;
print("Here are the stops for $route:");
for (final stopID in route.stops) {
final stop = stops[stopID]!;
print("- $stop");
}
}