From 3ddbe470e8ea6f3a32fc9703ea1fdebd0f5a17cb Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 24 Nov 2023 20:17:53 +0100 Subject: efa-m: Avoid over-long long-distance train lines (cut off "InterCity" etc.) --- bin/efa-m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/efa-m b/bin/efa-m index d78969b..5cac08a 100755 --- a/bin/efa-m +++ b/bin/efa-m @@ -307,8 +307,13 @@ sub show_results { $dtime .= ' ' . format_delay( $d->delay, $delay_len ); } + my $line = $d->line; + if ( length($line) > 10 and $d->train_type and $d->train_no ) { + $line = $d->train_type . ' ' . $d->train_no; + } + @output_line - = ( $dtime, $platform, $d->line, q{}, $d->destination, $d->info ); + = ( $dtime, $platform, $line, q{}, $d->destination, $d->info ); if ( $edata{route} ) { $output_line[3] -- cgit v1.2.3