summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-11-18 21:38:48 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-11-18 21:38:48 +0100
commitb8b6eab04b7f4cb2286287551af228e56f2b02a5 (patch)
tree199f01fe5475916344e30600273b379daed68d3a
parentb4ecfde631bed1356b5c51df6819b9116e8c7808 (diff)
dbris-m: show operator if it changes along the route
-rwxr-xr-xbin/dbris-m13
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 )