diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-11-18 21:38:48 +0100 |
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-11-18 21:38:48 +0100 |
| commit | b8b6eab04b7f4cb2286287551af228e56f2b02a5 (patch) | |
| tree | 199f01fe5475916344e30600273b379daed68d3a | |
| parent | b4ecfde631bed1356b5c51df6819b9116e8c7808 (diff) | |
dbris-m: show operator if it changes along the route
| -rwxr-xr-x | bin/dbris-m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/dbris-m b/bin/dbris-m index f6caafc..a98eab5 100755 --- a/bin/dbris-m +++ b/bin/dbris-m @@ -399,6 +399,11 @@ elsif ( $opt{journey} and not( $raw_json_output or $json_output ) ) { } say q{}; + my $prev_operator; + if ( scalar $trip->operators > 1 ) { + $prev_operator = q{}; + } + my $prev_trip_no; if ( scalar $trip->trip_numbers > 1 ) { $prev_trip_no = q{}; @@ -437,6 +442,14 @@ elsif ( $opt{journey} and not( $raw_json_output or $json_output ) ) { print($output_reset); } + if ( defined $prev_operator + and defined $stop->operator + and $stop->operator ne $prev_operator ) + { + printf( ' %s', $stop->operator ); + $prev_operator = $stop->operator; + } + if ( defined $prev_trip_no and defined $stop->trip_no and $stop->trip_no ne $prev_trip_no ) |
