diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-07-06 14:40:05 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-07-06 14:40:05 +0200 |
commit | 653d3c749a1385b661e3f91181c69df768b9cd84 (patch) | |
tree | e0777ad7ee5bc526ab6695ee811a38c23628799f /bin | |
parent | 1e036e94b7b5500d8c1630548398980735ad9110 (diff) |
db-ris: Only show info column when a train is late
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/db-ris | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -80,6 +80,16 @@ sub display_result { return; } +sub filter_info { + my ($info) = @_; + + if ( $info =~ m{ ^ (?: p.nktlich | k [.] A [.] ) $ }ox ) { + return q{}; + } + + return $info; +} + sub filter_via { my (@via) = @_; @@ -133,7 +143,7 @@ for my $d ( $status->results() ) { [ $d->time, $d->train, join( q{ }, filter_via(@via) ), $d->destination, - $d->platform, $d->info + $d->platform, filter_info( $d->info ) ] ); } |