diff options
Diffstat (limited to 'bin/hafas-m')
-rwxr-xr-x | bin/hafas-m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/hafas-m b/bin/hafas-m index cc78d26..ee3ae78 100755 --- a/bin/hafas-m +++ b/bin/hafas-m @@ -17,6 +17,7 @@ my $ignore_late = 0; my $types = q{}; my $language; my $developer_mode; +my $list_services; my @output; @@ -32,9 +33,18 @@ GetOptions( 't|time=s' => \$time, 'V|version' => \&show_version, 'devmode' => \$developer_mode, + 'list' => \$list_services, ) or show_help(1); +if ($list_services) { + printf( "%-40s %-14s %s\n\n", 'operator', 'abbr. (-s)', 'url (-u)' ); + for my $service ( Travel::Status::DE::HAFAS::get_services() ) { + printf( "%-40s %-14s %s\n", @{$service}{qw(name shortname url)} ); + } + exit 0; +} + for my $type ( split( qr{,}, $types ) ) { if ( substr( $type, 0, 1 ) eq q{!} ) { $train_type{ substr( $type, 1 ) } = 0; |