diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-02-23 22:03:56 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-02-23 22:03:56 +0100 |
commit | bb2ec6920d6ad5aad255f917a4b3fd2c9b588e45 (patch) | |
tree | 724c3f1658ee85f7560ebe67185c7aa4ee57b771 | |
parent | 4ea052dee5be4951189e943f11d16ba5f6c7c334 (diff) |
add -o, --offset option
-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 |