diff options
-rw-r--r-- | COPYING | 2 | ||||
-rw-r--r-- | Changelog | 8 | ||||
-rwxr-xr-x | bin/efa-m | 29 | ||||
-rw-r--r-- | lib/Travel/Status/DE/EFA.pm | 9 | ||||
-rw-r--r-- | lib/Travel/Status/DE/EFA/Line.pm | 6 | ||||
-rw-r--r-- | lib/Travel/Status/DE/EFA/Result.pm | 10 | ||||
-rw-r--r-- | lib/Travel/Status/DE/VRR.pm | 8 |
7 files changed, 46 insertions, 26 deletions
@@ -1,4 +1,4 @@ -Copyright (C) 2011 Daniel Friesel <derf@finalrewind.org> +Copyright (C) 2011-2014 Daniel Friesel <derf@finalrewind.org> All files in this distribution are licensed under the same terms as Perl itself. @@ -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 @@ -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{ ^ (?<type> 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<efa-m> [B<-d> I<date>] [B<-t> I<time>] I<city> [I<type>B<:>]I<name> =head1 VERSION -version 1.05 +version 1.06 =head1 DESCRIPTION @@ -219,6 +222,12 @@ Use relative departure times. Show departures starting at I<time> instead of now. +=item B<-u>, B<--efa-url> I<url> + +URL to the EFA entry point, defaults to L<http://efa.vrr.de/vrr/XSLT_DM_REQUEST>. +Depending on your location, some I<url>s may contain more specific data +than others. See Travel::Status::DE::EFA(3pm) for alternatives. + =item B<-V>, B<--version> Show version information. @@ -251,7 +260,7 @@ Unknown. =head1 AUTHOR -Copyright (C) 2011 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> +Copyright (C) 2011-2014 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm index a8c4c83..fc6f0dc 100644 --- a/lib/Travel/Status/DE/EFA.pm +++ b/lib/Travel/Status/DE/EFA.pm @@ -6,7 +6,7 @@ use 5.010; no if $] >= 5.018, warnings => "experimental::smartmatch"; -our $VERSION = '1.05'; +our $VERSION = '1.06'; use Carp qw(confess cluck); use Encode qw(encode decode); @@ -389,7 +389,7 @@ Travel::Status::DE::EFA - unofficial EFA departure monitor =head1 VERSION -version 1.05 +version 1.06 =head1 DESCRIPTION @@ -425,6 +425,9 @@ URL to the EFA service. Known URLs are: =back +If you found a URL not listed here, please send it to +E<lt>derf@finalrewind.orgE<gt>. + =item B<place> => I<place> Name of the place/city @@ -483,7 +486,7 @@ efa-m(1), Travel::Status::DE::EFA::Result(3pm). =head1 AUTHOR -Copyright (C) 2011 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> +Copyright (C) 2011-2014 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE diff --git a/lib/Travel/Status/DE/EFA/Line.pm b/lib/Travel/Status/DE/EFA/Line.pm index 8a22fe8..c836b49 100644 --- a/lib/Travel/Status/DE/EFA/Line.pm +++ b/lib/Travel/Status/DE/EFA/Line.pm @@ -6,7 +6,7 @@ use 5.010; use parent 'Class::Accessor'; -our $VERSION = '1.05'; +our $VERSION = '1.06'; Travel::Status::DE::EFA::Line->mk_ro_accessors( qw(direction name operator route type valid)); @@ -46,7 +46,7 @@ requested station =head1 VERSION -version 1.05 +version 1.06 =head1 DESCRIPTION @@ -130,7 +130,7 @@ Travel::Status::DE::EFA(3pm). =head1 AUTHOR -Copyright (C) 2011 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> +Copyright (C) 2011-2014 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE diff --git a/lib/Travel/Status/DE/EFA/Result.pm b/lib/Travel/Status/DE/EFA/Result.pm index c623f6e..aac67cd 100644 --- a/lib/Travel/Status/DE/EFA/Result.pm +++ b/lib/Travel/Status/DE/EFA/Result.pm @@ -6,7 +6,7 @@ use 5.010; use parent 'Class::Accessor'; -our $VERSION = '1.05'; +our $VERSION = '1.06'; Travel::Status::DE::EFA::Result->mk_ro_accessors( qw(countdown date delay destination is_cancelled info key line lineref platform @@ -18,8 +18,8 @@ sub new { my $ref = \%conf; - if ($ref->{delay} eq '-9999') { - $ref->{delay} = 0; + if ( $ref->{delay} eq '-9999' ) { + $ref->{delay} = 0; $ref->{is_cancelled} = 1; } else { @@ -56,7 +56,7 @@ departure received by Travel::Status::DE::EFA =head1 VERSION -version 1.05 +version 1.06 =head1 DESCRIPTION @@ -218,7 +218,7 @@ Travel::Status::DE::EFA(3pm). =head1 AUTHOR -Copyright (C) 2011 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> +Copyright (C) 2011-2014 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm index 23ee381..d793538 100644 --- a/lib/Travel/Status/DE/VRR.pm +++ b/lib/Travel/Status/DE/VRR.pm @@ -6,7 +6,7 @@ use 5.010; no if $] >= 5.018, warnings => "experimental::smartmatch"; -our $VERSION = '0.00'; +our $VERSION = '1.06'; use parent 'Travel::Status::DE::EFA'; @@ -44,7 +44,7 @@ Travel::Status::DE::VRR - unofficial VRR departure monitor. =head1 VERSION -version 0.00 +version 1.06 =head1 DESCRIPTION @@ -92,11 +92,11 @@ Many. =head1 SEE ALSO -aseag-m(1), Travel::Status::DE::EFA(3pm). +efa-m(1), Travel::Status::DE::EFA(3pm). =head1 AUTHOR -Copyright (C) 2013 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> +Copyright (C) 2013-2014 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE |