Loading bin/hafas +27 −16 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ my $types = q{}; my $developer_mode; my $developer_mode; my ( $json_output, $raw_json_output ); my ( $json_output, $raw_json_output ); my $show_full_route; my $show_full_route; my $exclude_infeasible; my ( $list_services, $service ); my ( $list_services, $service ); my ( @excluded_mots, @exclusive_mots ); my ( @excluded_mots, @exclusive_mots ); my $max_change = undef; my $max_change = undef; Loading @@ -46,22 +47,23 @@ my $output_bold = -t STDOUT ? "\033[1m" : q{}; my $output_reset = -t STDOUT ? "\033[0m" : q{}; my $output_reset = -t STDOUT ? "\033[0m" : q{}; GetOptions( GetOptions( 'a|arrive=s' => sub { $arrival = 1; $time = $_[1] }, 'a|arrive=s' => sub { $arrival = 1; $time = $_[1] }, 'c|max-change=s' => \$max_change, 'c|max-change=s' => \$max_change, 'C|change-time=s' => \$min_change_time, 'C|change-time=s' => \$min_change_time, 'd|date=s' => \$date, 'd|date=s' => \$date, 'h|help' => sub { show_help(0) }, 'h|help' => sub { show_help(0) }, 'f|full-route' => \$show_full_route, 'f|full-route' => \$show_full_route, 'l|language=s' => \$language, 'l|language=s' => \$language, 'm|mot=s' => \$types, 'm|mot=s' => \$types, 's|service=s' => \$service, 's|service=s' => \$service, 't|time|depart=s' => \$time, 't|time|depart=s' => \$time, 'v|verbose+' => \$verbosity, 'x|exclude-infeasible' => \$exclude_infeasible, 'V|version' => \&show_version, 'v|verbose+' => \$verbosity, 'devmode' => \$developer_mode, 'V|version' => \&show_version, 'json' => \$json_output, 'devmode' => \$developer_mode, 'raw-json' => \$raw_json_output, 'json' => \$json_output, 'list' => \$list_services, 'raw-json' => \$raw_json_output, 'list' => \$list_services, ) or show_help(1); ) or show_help(1); Loading Loading @@ -338,6 +340,9 @@ for my $res ( $hafas->connections ) { } } if ( $cancelled or $negative_transfer or $part_cancelled ) { if ( $cancelled or $negative_transfer or $part_cancelled ) { if ($exclude_infeasible) { next; } printf( printf( "%s (%02d:%02d) %s %s %s\n", "%s (%02d:%02d) %s %s %s\n", $res->dep->strftime('XX.XX. %H:%M'), $res->dep->strftime('XX.XX. %H:%M'), Loading Loading @@ -538,6 +543,12 @@ B<-v>) to 3 (B<-vvv>). Show version information and exit. Show version information and exit. =item B<-x>, B<--exclude-infeasible> HAFAS responses include journeys that are infeasible e.g. due to delayed or cancelled trips. By default, B<hafas> displays those with an XX.XX. departure date. When this option is set, B<hafas> silently ignores them instead. =back =back =head1 EXIT STATUS =head1 EXIT STATUS Loading Loading
bin/hafas +27 −16 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ my $types = q{}; my $developer_mode; my $developer_mode; my ( $json_output, $raw_json_output ); my ( $json_output, $raw_json_output ); my $show_full_route; my $show_full_route; my $exclude_infeasible; my ( $list_services, $service ); my ( $list_services, $service ); my ( @excluded_mots, @exclusive_mots ); my ( @excluded_mots, @exclusive_mots ); my $max_change = undef; my $max_change = undef; Loading @@ -46,22 +47,23 @@ my $output_bold = -t STDOUT ? "\033[1m" : q{}; my $output_reset = -t STDOUT ? "\033[0m" : q{}; my $output_reset = -t STDOUT ? "\033[0m" : q{}; GetOptions( GetOptions( 'a|arrive=s' => sub { $arrival = 1; $time = $_[1] }, 'a|arrive=s' => sub { $arrival = 1; $time = $_[1] }, 'c|max-change=s' => \$max_change, 'c|max-change=s' => \$max_change, 'C|change-time=s' => \$min_change_time, 'C|change-time=s' => \$min_change_time, 'd|date=s' => \$date, 'd|date=s' => \$date, 'h|help' => sub { show_help(0) }, 'h|help' => sub { show_help(0) }, 'f|full-route' => \$show_full_route, 'f|full-route' => \$show_full_route, 'l|language=s' => \$language, 'l|language=s' => \$language, 'm|mot=s' => \$types, 'm|mot=s' => \$types, 's|service=s' => \$service, 's|service=s' => \$service, 't|time|depart=s' => \$time, 't|time|depart=s' => \$time, 'v|verbose+' => \$verbosity, 'x|exclude-infeasible' => \$exclude_infeasible, 'V|version' => \&show_version, 'v|verbose+' => \$verbosity, 'devmode' => \$developer_mode, 'V|version' => \&show_version, 'json' => \$json_output, 'devmode' => \$developer_mode, 'raw-json' => \$raw_json_output, 'json' => \$json_output, 'list' => \$list_services, 'raw-json' => \$raw_json_output, 'list' => \$list_services, ) or show_help(1); ) or show_help(1); Loading Loading @@ -338,6 +340,9 @@ for my $res ( $hafas->connections ) { } } if ( $cancelled or $negative_transfer or $part_cancelled ) { if ( $cancelled or $negative_transfer or $part_cancelled ) { if ($exclude_infeasible) { next; } printf( printf( "%s (%02d:%02d) %s %s %s\n", "%s (%02d:%02d) %s %s %s\n", $res->dep->strftime('XX.XX. %H:%M'), $res->dep->strftime('XX.XX. %H:%M'), Loading Loading @@ -538,6 +543,12 @@ B<-v>) to 3 (B<-vvv>). Show version information and exit. Show version information and exit. =item B<-x>, B<--exclude-infeasible> HAFAS responses include journeys that are infeasible e.g. due to delayed or cancelled trips. By default, B<hafas> displays those with an XX.XX. departure date. When this option is set, B<hafas> silently ignores them instead. =back =back =head1 EXIT STATUS =head1 EXIT STATUS Loading