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 --- COPYING | 2 +- Changelog | 8 ++++++++ bin/efa-m | 29 +++++++++++++++++++---------- lib/Travel/Status/DE/EFA.pm | 9 ++++++--- lib/Travel/Status/DE/EFA/Line.pm | 6 +++--- lib/Travel/Status/DE/EFA/Result.pm | 10 +++++----- lib/Travel/Status/DE/VRR.pm | 8 ++++---- 7 files changed, 46 insertions(+), 26 deletions(-) diff --git a/COPYING b/COPYING index e411adf..67e99cd 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (C) 2011 Daniel Friesel +Copyright (C) 2011-2014 Daniel Friesel All files in this distribution are licensed under the same terms as Perl itself. diff --git a/Changelog b/Changelog index b321521..24ac064 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,11 @@ +Travel::Status::DE::VRR 1.06 - Thu Jan 02 2014 + + * Add Travel::Status::DE::EFA module, move ::Result and ::Line to + Travel::Status::DE::EFA. Travel::Status::DE::VRR now inherits from + ::EFA, no API changes were made. + * Travel::Status::DE::EFA has a mandatory efa_url parameter to set the + entry point to an EFA service + Travel::Status::DE::VRR 1.05 - Wed Dec 18 2013 * Add -r, --relative option to use relative times 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