diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-01-19 07:26:51 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-01-19 07:26:51 +0100 |
commit | 71b412221ec54f60b33a69e9b693b0bca2bdc903 (patch) | |
tree | 1ddc8382df7cc07c47821ba72787e690e62e1d34 /bin/dbris | |
parent | a226458dfdf3f9867ae5070df2f2f62d9e9f4657 (diff) |
dbris: Add -f / --full-route
Diffstat (limited to 'bin/dbris')
-rwxr-xr-x | bin/dbris | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -20,6 +20,7 @@ my $discounts; my $developer_mode; my ( $json_output, $raw_json_output ); my $use_cache = 1; +my $show_full_route; my $cache; my @output; @@ -36,6 +37,7 @@ GetOptions( 'd|date=s' => \$date, 'D|discounts=s' => \$discounts, 'h|help' => sub { show_help(0) }, + 'f|full-route' => \$show_full_route, 'm|modes-of-transit=s' => \$mots, 't|time=s' => \$time, 'V|version' => \&show_version, @@ -254,11 +256,14 @@ for my $connection ( $ris->connections ) { $segment->dep->strftime('%H:%M'), $segment->dep_name ); - for my $stop ( $segment->route ) { - printf( "%s %s %s\n", - $stop->arr ? $stop->arr->strftime('%H:%M') : q{ }, - format_occupancy($stop), $stop->name, ); + if ($show_full_route) { + for my $stop ( $segment->route ) { + printf( "%s %s %s\n", + $stop->arr ? $stop->arr->strftime('%H:%M') : q{ }, + format_occupancy($stop), $stop->name, ); + } } + printf( "%s an %s\n", $segment->arr->strftime('%H:%M'), $segment->arr_name ); |