From a201b41bbfffaf32407afe522829654e2dd93674 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 2 Jan 2014 02:37:20 +0100 Subject: Add --efa-url option to efa-m --- bin/efa-m | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'bin/efa-m') diff --git a/bin/efa-m b/bin/efa-m index 7c5f187..03a4b80 100755 --- a/bin/efa-m +++ b/bin/efa-m @@ -5,14 +5,15 @@ use 5.010; no if $] >= 5.018, warnings => "experimental::smartmatch"; -our $VERSION = '1.05'; +our $VERSION = '1.06'; binmode( STDOUT, ':encoding(utf-8)' ); use Getopt::Long qw(:config no_ignore_case); use List::Util qw(max); -use Travel::Status::DE::VRR; +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 ( @grep_lines, @grep_platforms ); @@ -24,6 +25,7 @@ GetOptions( 'p|platform=s@' => \@grep_platforms, 'r|relative' => \$relative_times, 't|time=s' => \$time, + 'u|efa-url=s' => \$efa_url, 'V|version' => \&show_version, ) or show_help(1); @@ -42,12 +44,13 @@ if ( $input =~ s{ ^ (? address|poi|stop) : }{}x ) { $input_type = $+{type}; } -my $status = Travel::Status::DE::VRR->new( - date => $date, - place => $place, - name => $input, - time => $time, - type => $input_type, +my $status = Travel::Status::DE::EFA->new( + date => $date, + efa_url => $efa_url, + place => $place, + name => $input, + time => $time, + type => $input_type, ); sub show_help { @@ -183,7 +186,7 @@ B [B<-d> I] [B<-t> I