- 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
18 lines
534 B
Dart
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");
|
|
}
|
|
}
|