Skip to content
Commits on Source (3)
Travel::Status::DE::VRR 1.23 - Fri Nov 24 2023
* efa-m: Do not show free-text messages by default. Use the newly
introduced -Om option to show them
* efa-m: Show real-time departure rather than scheduled time + delay
* Result: Add train_type and train_name accessors
Travel::Status::DE::VRR 1.22 - Sat Sep 02 2023 Travel::Status::DE::VRR 1.22 - Sat Sep 02 2023
* Do not use now-deprecated smartmatch features * Do not use now-deprecated smartmatch features
......
...@@ -4,7 +4,7 @@ use warnings; ...@@ -4,7 +4,7 @@ use warnings;
use 5.010; use 5.010;
use utf8; use utf8;
our $VERSION = '1.22'; our $VERSION = '1.23';
binmode( STDOUT, ':encoding(utf-8)' ); binmode( STDOUT, ':encoding(utf-8)' );
...@@ -307,8 +307,13 @@ sub show_results { ...@@ -307,8 +307,13 @@ sub show_results {
$dtime .= ' ' . format_delay( $d->delay, $delay_len ); $dtime .= ' ' . format_delay( $d->delay, $delay_len );
} }
my $line = $d->line;
if ( length($line) > 10 and $d->train_type and $d->train_no ) {
$line = $d->train_type . ' ' . $d->train_no;
}
@output_line @output_line
= ( $dtime, $platform, $d->line, q{}, $d->destination, $d->info ); = ( $dtime, $platform, $line, q{}, $d->destination, $d->info );
if ( $edata{route} ) { if ( $edata{route} ) {
$output_line[3] $output_line[3]
...@@ -407,7 +412,7 @@ B<efa-m> [B<-Lr>] [B<-d> I<dd.mm.yyyy>] [B<-t> I<hh:mm>] ...@@ -407,7 +412,7 @@ B<efa-m> [B<-Lr>] [B<-d> I<dd.mm.yyyy>] [B<-t> I<hh:mm>]
=head1 VERSION =head1 VERSION
version 1.22 version 1.23
=head1 DESCRIPTION =head1 DESCRIPTION
......
...@@ -5,7 +5,7 @@ use warnings; ...@@ -5,7 +5,7 @@ use warnings;
use 5.010; use 5.010;
use utf8; use utf8;
our $VERSION = '1.22'; our $VERSION = '1.23';
use Carp qw(confess cluck); use Carp qw(confess cluck);
use Encode qw(encode); use Encode qw(encode);
...@@ -443,6 +443,8 @@ sub results { ...@@ -443,6 +443,8 @@ sub results {
my $countdown = $e->getAttribute('countdown'); my $countdown = $e->getAttribute('countdown');
my $occupancy = $e->getAttribute('occupancy'); my $occupancy = $e->getAttribute('occupancy');
my $line = $e_line->getAttribute('number'); my $line = $e_line->getAttribute('number');
my $train_type = $e_line->getAttribute('trainType');
my $train_name = $e_line->getAttribute('trainName');
my $train_no = $e_line->getAttribute('trainNum'); my $train_no = $e_line->getAttribute('trainNum');
my $dest = $e_line->getAttribute('direction'); my $dest = $e_line->getAttribute('direction');
my $info = $e_info->textContent; my $info = $e_info->textContent;
...@@ -502,6 +504,8 @@ sub results { ...@@ -502,6 +504,8 @@ sub results {
key => $key, key => $key,
lineref => $line_obj[0] // undef, lineref => $line_obj[0] // undef,
line => $line, line => $line,
train_type => $train_type,
train_name => $train_name,
train_no => $train_no, train_no => $train_no,
destination => $dest, destination => $dest,
occupancy => $occupancy, occupancy => $occupancy,
...@@ -640,7 +644,7 @@ Travel::Status::DE::EFA - unofficial EFA departure monitor ...@@ -640,7 +644,7 @@ Travel::Status::DE::EFA - unofficial EFA departure monitor
=head1 VERSION =head1 VERSION
version 1.22 version 1.23
=head1 DESCRIPTION =head1 DESCRIPTION
......
...@@ -6,7 +6,7 @@ use 5.010; ...@@ -6,7 +6,7 @@ use 5.010;
use parent 'Class::Accessor'; use parent 'Class::Accessor';
our $VERSION = '1.22'; our $VERSION = '1.23';
Travel::Status::DE::EFA::Line->mk_ro_accessors( Travel::Status::DE::EFA::Line->mk_ro_accessors(
qw(direction mot name operator route type valid)); qw(direction mot name operator route type valid));
...@@ -57,7 +57,7 @@ requested station ...@@ -57,7 +57,7 @@ requested station
=head1 VERSION =head1 VERSION
version 1.22 version 1.23
=head1 DESCRIPTION =head1 DESCRIPTION
......
...@@ -6,11 +6,11 @@ use 5.010; ...@@ -6,11 +6,11 @@ use 5.010;
use parent 'Class::Accessor'; use parent 'Class::Accessor';
our $VERSION = '1.22'; our $VERSION = '1.23';
Travel::Status::DE::EFA::Result->mk_ro_accessors( Travel::Status::DE::EFA::Result->mk_ro_accessors(
qw(countdown date delay destination is_cancelled info key line lineref qw(countdown date delay destination is_cancelled info key line lineref
mot occupancy operator platform platform_db platform_name sched_date sched_time time train_no type) mot occupancy operator platform platform_db platform_name sched_date sched_time time train_type train_name train_no type)
); );
my @mot_mapping = qw{ my @mot_mapping = qw{
...@@ -133,7 +133,7 @@ departure received by Travel::Status::DE::EFA ...@@ -133,7 +133,7 @@ departure received by Travel::Status::DE::EFA
=head1 VERSION =head1 VERSION
version 1.22 version 1.23
=head1 DESCRIPTION =head1 DESCRIPTION
...@@ -254,6 +254,15 @@ Scheduled departure time (HH:MM). ...@@ -254,6 +254,15 @@ Scheduled departure time (HH:MM).
Actual departure time (HH:MM). Actual departure time (HH:MM).
=item $departure->train_type
Train type, e.g. "ICE". Typically only defined for long-distance trains.
=item $departure->train_name
Train name, e.g. "ICE International" or "InterCityExpresS" or "Deichgraf".
Typically only defined for long-distance trains.
=item $departure->train_no =item $departure->train_no
Train number. Only defined if departure is a train. Train number. Only defined if departure is a train.
......
...@@ -6,7 +6,7 @@ use 5.010; ...@@ -6,7 +6,7 @@ use 5.010;
use parent 'Class::Accessor'; use parent 'Class::Accessor';
our $VERSION = '1.22'; our $VERSION = '1.23';
Travel::Status::DE::EFA::Stop->mk_ro_accessors( Travel::Status::DE::EFA::Stop->mk_ro_accessors(
qw(arr_date arr_time dep_date dep_time name name_suf platform)); qw(arr_date arr_time dep_date dep_time name name_suf platform));
...@@ -46,7 +46,7 @@ in a Travel::Status::DE::EFA::Result's route ...@@ -46,7 +46,7 @@ in a Travel::Status::DE::EFA::Result's route
=head1 VERSION =head1 VERSION
version 1.22 version 1.23
=head1 DESCRIPTION =head1 DESCRIPTION
......
...@@ -4,7 +4,7 @@ use strict; ...@@ -4,7 +4,7 @@ use strict;
use warnings; use warnings;
use 5.010; use 5.010;
our $VERSION = '1.22'; our $VERSION = '1.23';
use parent 'Travel::Status::DE::EFA'; use parent 'Travel::Status::DE::EFA';
...@@ -42,7 +42,7 @@ Travel::Status::DE::VRR - unofficial VRR departure monitor. ...@@ -42,7 +42,7 @@ Travel::Status::DE::VRR - unofficial VRR departure monitor.
=head1 VERSION =head1 VERSION
version 1.22 version 1.23
=head1 DESCRIPTION =head1 DESCRIPTION
......