From b066c8145dfb091f073d91ca1ed043847d0c390b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 27 Dec 2018 15:25:27 +0100 Subject: add some type parsing --- bin/db-wagenreihung | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bin/db-wagenreihung') diff --git a/bin/db-wagenreihung b/bin/db-wagenreihung index 959e217..2594478 100755 --- a/bin/db-wagenreihung +++ b/bin/db-wagenreihung @@ -43,7 +43,7 @@ my ( $station, $train_number ) = @ARGV; my $col_first = "\e[38;5;11m"; my $col_mixed = "\e[38;5;208m"; -my $col_second = "\e[0m"; #"\e[38;5;9m"; +my $col_second = "\e[0m"; #"\e[38;5;9m"; my $col_reset = "\e[0m"; my $res = Travel::Status::DE::IRIS->new( @@ -122,4 +122,10 @@ for my $wagon ( $wr->wagons ) { $col_reset, ' ' x $spacing_right ); } print $wr->direction == 100 ? '>' : '<'; -print "\n"; +print "\n\n"; + +for my $wagon ( $wr->wagons ) { + printf( "%3s: %10s %s\n", + $wagon->number || '?', + $wagon->type, join( q{ }, $wagon->attributes ) ); +} -- cgit v1.2.3