diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-02-25 09:04:27 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-02-25 09:05:42 +0100 |
commit | 1557c7162f2192acd1a3970f03581a0b516af193 (patch) | |
tree | 3cdcfd16ffcc90320188ce355818954113a88b65 /bin/hafas | |
parent | 791439d586ece2da7192cd2e0ab1fe4d1737a167 (diff) |
Update ÖBB productbits and add descriptions to list
Diffstat (limited to 'bin/hafas')
-rwxr-xr-x | bin/hafas | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 { |