diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-09-11 13:17:12 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-09-11 13:17:12 +0200 |
commit | 43f83fc7df3a563521af01dd1251ddd8e8d21d3a (patch) | |
tree | 7838ef7fdf5f682d2fc8e75f0134d0da649a6dc9 /bin/efa-m | |
parent | cddc688b8152407f53916268a41304c01d137e87 (diff) |
Add initial support for additional departure information
Diffstat (limited to 'bin/efa-m')
-rwxr-xr-x | bin/efa-m | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -64,6 +64,16 @@ sub display_result { } for my $line (@lines) { + + if ( length( $line->[4] ) ) { + $line->[4] =~ tr{\n\x0d}{ }s; + chomp $line->[4]; + print "\n"; + for my $info_line ( split( qr{\n}, $line->[4] ) ) { + say "# ${info_line}"; + } + } + printf( join( q{ }, ( map { "%-${_}s" } @line_length ) ) . "\n", @{$line}[ 0 .. 3 ] @@ -75,7 +85,8 @@ sub display_result { for my $d ( $status->results ) { - push( @output, [ $d->time, $d->platform, $d->line, $d->destination, ] ); + push( @output, + [ $d->time, $d->platform, $d->line, $d->destination, $d->info ] ); } display_result(@output); |