From 1557c7162f2192acd1a3970f03581a0b516af193 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 25 Feb 2024 09:04:27 +0100 Subject: Update ÖBB productbits and add descriptions to list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/hafas | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/hafas b/bin/hafas index d5f0612..dad10d3 100755 --- a/bin/hafas +++ b/bin/hafas @@ -156,10 +156,14 @@ sub parse_mot_options { my $desc = Travel::Routing::DE::HAFAS::get_service($service); if ($desc) { my @mots = @{ $desc->{productbits} }; - @mots = grep { $_ ne 'x' } @mots; - @mots = uniq @mots; - @mots = sort @mots; - say join( "\n", @mots ); + for my $mot ( @{ $desc->{productbits} } ) { + if ( ref($mot) eq 'ARRAY' ) { + printf( "%-10s %s\n", @{$mot} ); + } + else { + say $mot; + } + } exit 0; } else { -- cgit v1.2.3