From 683a1fb700d5ba86a12acf1427c05de1b5008b4a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 18 Apr 2015 23:20:10 +0200 Subject: db-iris: add some wing support. there's at least one major bug still present (sometimes, departure_wings contains duplicate entries) --- bin/db-iris | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'bin/db-iris') diff --git a/bin/db-iris b/bin/db-iris index 73592ba..310de21 100755 --- a/bin/db-iris +++ b/bin/db-iris @@ -309,7 +309,8 @@ for my $d ( $status->results() ) { if ( ( $filter_via and not( first { $_ =~ m{$filter_via}io } @via ) ) or ( @grep_class and none { $_ ~~ \@grep_class } $d->classes ) or ( @grep_platform and not( $d->platform ~~ \@grep_platform ) ) - or ( @grep_type and not( $d->type ~~ \@grep_type ) ) ) + or ( @grep_type and not( $d->type ~~ \@grep_type ) ) + or $d->is_wing ) { next; } @@ -369,6 +370,23 @@ for my $d ( $status->results() ) { $d->route_end, $platformstr // q{}, $d ] ); + + for my $wing ( $d->departure_wings ) { + push( + @output, + [ + '├' . '─' x ( length($timestr) - 1 ), + $wing->train, + $edata{route} ? join( q{ }, $wing->route_interesting ) : q{}, + $wing->route_end, + $platformstr // q{}, + $wing + ] + ); + } + if ( $d->departure_wings ) { + $output[-1][0] = '└' . '─' x ( length($timestr) - 1 ); + } } display_result(@output); -- cgit v1.2.3