diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-25 11:52:14 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-25 11:52:14 +0100 |
commit | fc95f2a3ceef03f076ee268d71ce11d5765a6c37 (patch) | |
tree | 376f9733b06700c81cfb8b70c52663f4aaf57f15 /bin | |
parent | ff446b8a2d5d57aef30c4ed4fb2b536e6e56d141 (diff) |
add --change-time / min_change_time options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hafas | 33 |
1 files changed, 21 insertions, 12 deletions
@@ -22,8 +22,9 @@ my ( $json_output, $raw_json_output ); my $show_full_route; my ( $list_services, $service ); my ( @excluded_mots, @exclusive_mots ); -my $max_change = undef; -my $verbosity = 0; +my $max_change = undef; +my $min_change_time = undef; +my $verbosity = 0; my @output; my %min_verbosity = ( @@ -47,6 +48,7 @@ my $output_reset = -t STDOUT ? "\033[0m" : q{}; GetOptions( 'a|arrive=s' => sub { $arrival = 1; $time = $_[1] }, 'c|max-change=s' => \$max_change, + 'C|change-time=s' => \$min_change_time, 'd|date=s' => \$date, 'h|help' => sub { show_help(0) }, 'f|full-route' => \$show_full_route, @@ -85,16 +87,17 @@ if ( not( $from_stop and $to_stop ) ) { } my %opt = ( - service => $service, - from_stop => $from_stop, - via_stops => \@via_stops, - to_stop => $to_stop, - excluded_mots => \@excluded_mots, - exclusive_mots => \@exclusive_mots, - max_change => $max_change, - developer_mode => $developer_mode, - arrival => $arrival, - language => $language, + service => $service, + from_stop => $from_stop, + via_stops => \@via_stops, + to_stop => $to_stop, + excluded_mots => \@excluded_mots, + exclusive_mots => \@exclusive_mots, + max_change => $max_change, + min_change_time => $min_change_time, + developer_mode => $developer_mode, + arrival => $arrival, + language => $language, ); if ( $date or $time ) { @@ -477,6 +480,12 @@ Overrides B<--time> / B<--depart>. Request connections with no more than I<count> changeovers. +=item B<-C>, B<--change-time> I<minutes> + +Request connections with scheduled changeover durations of at least I<minutes>. +Note that this does not account for real-time data: the backend may return +delayed connections that violate the specified changeover duration. + =item B<-d>, B<--date> I<dd>.I<mm>.[I<yyyy>] Planned departure (or arrival) date. Default: today. |