summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-11 13:17:12 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-11 13:17:12 +0200
commit43f83fc7df3a563521af01dd1251ddd8e8d21d3a (patch)
tree7838ef7fdf5f682d2fc8e75f0134d0da649a6dc9 /bin
parentcddc688b8152407f53916268a41304c01d137e87 (diff)
Add initial support for additional departure information
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa-m13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/efa-m b/bin/efa-m
index a722588..0c10ba6 100755
--- a/bin/efa-m
+++ b/bin/efa-m
@@ -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);