diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-09-11 13:35:24 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-09-11 13:35:24 +0200 |
commit | 4ab8c3cc012f4154c79428243d62f94938d7563a (patch) | |
tree | 29d20fea9516424f4a5b386a7157a5d3d7cd17a0 /bin | |
parent | 43f83fc7df3a563521af01dd1251ddd8e8d21d3a (diff) |
Allow departure listing for an address / point of interest
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/efa-m | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -9,7 +9,7 @@ use Getopt::Long qw(:config no_ignore_case); use List::Util qw(max); use Travel::Status::DE::VRR; -my ( $date, $time ); +my ( $date, $time, $input_type ); my @output; binmode( STDOUT, ':encoding(utf-8)' ); @@ -26,13 +26,18 @@ if ( @ARGV != 2 ) { show_help(1); } -my ( $place, $station ) = @ARGV; +my ( $place, $input ) = @ARGV; + +if ( $input =~ s{ ^ (?<type> address|poi|stop) : }{}x ) { + $input_type = $+{type}; +} my $status = Travel::Status::DE::VRR->new( date => $date, place => $place, - name => $station, + name => $input, time => $time, + type => $input_type, ); sub show_help { |