summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-01-10 10:54:35 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-01-10 10:54:35 +0100
commit954742fc7e83a88519de69a90d1ecdcfb3881bd2 (patch)
tree20feb531befda3c70060953199bc0836735b81e5
parentc256bbc332db21474c3e2019ee982b99ec5a7e5b (diff)
db-iris: make output less wide, do not show delay reasons / qos by default
-rwxr-xr-xbin/db-iris16
1 files changed, 6 insertions, 10 deletions
diff --git a/bin/db-iris b/bin/db-iris
index 8031524..d25f40f 100755
--- a/bin/db-iris
+++ b/bin/db-iris
@@ -111,18 +111,18 @@ sub display_result {
die("Nothing to show\n");
}
- for my $i ( 0 .. 5 ) {
+ for my $i ( 0 .. 4 ) {
$line_length[$i] = max map { length( $_->[$i] ) } @lines;
}
for my $line (@lines) {
printf(
join( q{ }, ( map { "%-${_}s" } @line_length ) ) . "\n",
- @{$line}[ 0 .. 5 ]
+ @{$line}[ 0 .. 4 ]
);
if ($show_full_route) {
- print "\n" . $line->[6] . "\n\n\n";
+ print "\n" . join( "\n", $line->[5]->route ) . "\n\n\n";
}
}
@@ -147,7 +147,7 @@ for my $d ( $status->results() ) {
my $delay = q{};
if ( $d->delay ) {
- $delay = ' +' . $d->delay;
+ $delay = ( $d->delay > 0 ? ' +' : q{ } ) . $d->delay;
}
if ( $d->is_cancelled ) {
$delay = ' CANCELED';
@@ -157,12 +157,8 @@ for my $d ( $status->results() ) {
@output,
[
$d->time . $delay,
- $d->train,
- $arrivals ? q{} : join( q{ }, $d->route_interesting ),
- $d->route_end,
- $d->platform,
- join( ' -- ', $d->info ),
- join( "\n", $d->route ),
+ $d->train, $arrivals ? q{} : join( q{ }, $d->route_interesting ),
+ $d->route_end, $d->platform, $d
]
);
}