diff options
-rw-r--r-- | Changelog | 4 | ||||
-rwxr-xr-x | bin/efa-m | 8 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,7 @@ +git HEAD + + * efa-m: Add -o, --offset option + Travel::Status::DE::VRR 1.07 - Tue Jan 07 2014 * efa-m: Add previously undocumented -L option to manual @@ -15,7 +15,7 @@ use List::Util qw(max); use Travel::Status::DE::EFA; my $efa_url = 'http://efa.vrr.de/vrr/XSLT_DM_REQUEST'; -my ( $date, $time, $input_type, $list_lines, $relative_times ); +my ( $date, $time, $input_type, $list_lines, $offset, $relative_times ); my ( @grep_lines, @grep_platforms ); @ARGV = map { decode( 'UTF-8', $_ ) } @ARGV; @@ -25,6 +25,7 @@ GetOptions( 'h|help' => sub { show_help(0) }, 'l|line=s@' => \@grep_lines, 'L|linelist' => \$list_lines, + 'o|offset=i' => \$offset, 'p|platform=s@' => \@grep_platforms, 'r|relative' => \$relative_times, 't|time=s' => \$time, @@ -139,6 +140,7 @@ sub show_results { ( @grep_lines and not( $d->line ~~ \@grep_lines ) ) or ( @grep_platforms and not( $platform ~~ \@grep_platforms ) ) + or ( $offset and $d->countdown < $offset ) ) { next; @@ -222,6 +224,10 @@ using B<--date> and B<--time> are guaranteed to be included. Only show departures of I<lines> (comma-separatad list, option may be repeated) +=item B<-o>, B<--offset> I<minutes> + +Ignore departures which are less than I<minutes> from now. + =item B<-p>, B<--platform> I<platforms> Only show departures at I<platforms> (comma-separated list, option may be |