Skip to content
Commits on Source (2)
...@@ -34,6 +34,7 @@ Module::Build->new( ...@@ -34,6 +34,7 @@ Module::Build->new(
'Travel::Status::DE::HAFAS::Journey' => '5.01', 'Travel::Status::DE::HAFAS::Journey' => '5.01',
'Travel::Status::DE::HAFAS::Location' => '5.00', 'Travel::Status::DE::HAFAS::Location' => '5.00',
'Travel::Status::DE::HAFAS::Message' => '4.19', 'Travel::Status::DE::HAFAS::Message' => '4.19',
'Travel::Status::DE::HAFAS::Product' => '5.05',
}, },
script_files => 'bin/', script_files => 'bin/',
sign => 1, sign => 1,
......
git HEAD Travel::Routing::DE::HAFAS 0.06 - Thu Mar 28 2024
* hafas: Add -C / --change-time option * hafas: Add -C / --change-time option
* HAFAS: Add min_change_time option * HAFAS: Add min_change_time option
......
...@@ -3,7 +3,7 @@ use strict; ...@@ -3,7 +3,7 @@ use strict;
use warnings; use warnings;
use 5.014; use 5.014;
our $VERSION = '0.05'; our $VERSION = '0.06';
use utf8; use utf8;
use DateTime; use DateTime;
...@@ -459,7 +459,7 @@ B<hafas> [B<-d> I<date>] [B<-t> I<time>] [B<-m> I<motlist>] ...@@ -459,7 +459,7 @@ B<hafas> [B<-d> I<date>] [B<-t> I<time>] [B<-m> I<motlist>]
=head1 VERSION =head1 VERSION
version 0.05 version 0.06
=head1 DESCRIPTION =head1 DESCRIPTION
......
...@@ -9,10 +9,7 @@ requires 'List::MoreUtils'; ...@@ -9,10 +9,7 @@ requires 'List::MoreUtils';
requires 'List::Util'; requires 'List::Util';
requires 'LWP::UserAgent'; requires 'LWP::UserAgent';
requires 'LWP::Protocol::https'; requires 'LWP::Protocol::https';
requires 'Travel::Status::DE::HAFAS'; requires 'Travel::Status::DE::HAFAS', '5.06';
requires 'Travel::Status::DE::HAFAS::Journey', '5.01';
requires 'Travel::Status::DE::HAFAS::Location', '5.00';
requires 'Travel::Status::DE::HAFAS::Message', '4.19';
on test => sub { on test => sub {
requires 'Test::Compile'; requires 'Test::Compile';
......
...@@ -18,7 +18,7 @@ use Travel::Routing::DE::HAFAS::Connection; ...@@ -18,7 +18,7 @@ use Travel::Routing::DE::HAFAS::Connection;
use Travel::Status::DE::HAFAS::Location; use Travel::Status::DE::HAFAS::Location;
use Travel::Status::DE::HAFAS::Message; use Travel::Status::DE::HAFAS::Message;
our $VERSION = '0.05'; our $VERSION = '0.06';
# {{{ Endpoint Definition # {{{ Endpoint Definition
...@@ -536,8 +536,17 @@ sub check_mgate { ...@@ -536,8 +536,17 @@ sub check_mgate {
sub parse_trips { sub parse_trips {
my ($self) = @_; my ($self) = @_;
my $common = $self->{raw_json}{svcResL}[0]{res}{common};
my @locL = map { Travel::Status::DE::HAFAS::Location->new( loc => $_ ) } my @locL = map { Travel::Status::DE::HAFAS::Location->new( loc => $_ ) }
@{ $self->{raw_json}{svcResL}[0]{res}{common}{locL} // [] }; @{ $common->{locL} // [] };
my @prodL = map {
Travel::Status::DE::HAFAS::Product->new(
common => $common,
product => $_
)
} @{ $common->{prodL} // [] };
my @conL = @{ $self->{raw_json}{svcResL}[0]{res}{outConL} // [] }; my @conL = @{ $self->{raw_json}{svcResL}[0]{res}{outConL} // [] };
for my $con (@conL) { for my $con (@conL) {
...@@ -546,6 +555,7 @@ sub parse_trips { ...@@ -546,6 +555,7 @@ sub parse_trips {
Travel::Routing::DE::HAFAS::Connection->new( Travel::Routing::DE::HAFAS::Connection->new(
common => $self->{raw_json}{svcResL}[0]{res}{common}, common => $self->{raw_json}{svcResL}[0]{res}{common},
locL => \@locL, locL => \@locL,
prodL => \@prodL,
connection => $con, connection => $con,
hafas => $self, hafas => $self,
) )
...@@ -680,7 +690,7 @@ Travel::Routing::DE::HAFAS - Interface to HAFAS itinerary services ...@@ -680,7 +690,7 @@ Travel::Routing::DE::HAFAS - Interface to HAFAS itinerary services
=head1 VERSION =head1 VERSION
version 0.05 version 0.06
=head1 DESCRIPTION =head1 DESCRIPTION
......
...@@ -11,7 +11,7 @@ use DateTime::Duration; ...@@ -11,7 +11,7 @@ use DateTime::Duration;
use Travel::Routing::DE::HAFAS::Utils; use Travel::Routing::DE::HAFAS::Utils;
use Travel::Routing::DE::HAFAS::Connection::Section; use Travel::Routing::DE::HAFAS::Connection::Section;
our $VERSION = '0.05'; our $VERSION = '0.06';
Travel::Routing::DE::HAFAS::Connection->mk_ro_accessors( Travel::Routing::DE::HAFAS::Connection->mk_ro_accessors(
qw(changes duration sched_dep rt_dep sched_arr rt_arr dep arr dep_platform arr_platform dep_loc arr_loc dep_cancelled arr_cancelled is_cancelled load) qw(changes duration sched_dep rt_dep sched_arr rt_arr dep arr dep_platform arr_platform dep_loc arr_loc dep_cancelled arr_cancelled is_cancelled load)
...@@ -24,7 +24,8 @@ sub new { ...@@ -24,7 +24,8 @@ sub new {
my $hafas = $opt{hafas}; my $hafas = $opt{hafas};
my $connection = $opt{connection}; my $connection = $opt{connection};
my $locs = $opt{locL}; my $locL = $opt{locL};
my $prodL = $opt{prodL};
# himL may only be present in departure monitor mode # himL may only be present in departure monitor mode
my @remL = @{ $opt{common}{remL} // [] }; my @remL = @{ $opt{common}{remL} // [] };
...@@ -83,7 +84,8 @@ sub new { ...@@ -83,7 +84,8 @@ sub new {
Travel::Routing::DE::HAFAS::Connection::Section->new( Travel::Routing::DE::HAFAS::Connection::Section->new(
common => $opt{common}, common => $opt{common},
date => $date, date => $date,
locL => $locs, locL => $locL,
prodL => $prodL,
sec => $sec, sec => $sec,
hafas => $hafas, hafas => $hafas,
) )
...@@ -126,8 +128,8 @@ sub new { ...@@ -126,8 +128,8 @@ sub new {
// $connection->{dep}{dPlatfS}, // $connection->{dep}{dPlatfS},
arr_platform => $connection->{arr}{aPlatfR} arr_platform => $connection->{arr}{aPlatfR}
// $connection->{arr}{aPlatfS}, // $connection->{arr}{aPlatfS},
dep_loc => $locs->[ $connection->{dep}{locX} ], dep_loc => $locL->[ $connection->{dep}{locX} ],
arr_loc => $locs->[ $connection->{arr}{locX} ], arr_loc => $locL->[ $connection->{arr}{locX} ],
load => $tco, load => $tco,
messages => \@messages, messages => \@messages,
sections => \@sections, sections => \@sections,
...@@ -198,7 +200,7 @@ Travel::Routing::DE::HAFAS::Connection - A single connection between two stops ...@@ -198,7 +200,7 @@ Travel::Routing::DE::HAFAS::Connection - A single connection between two stops
=head1 VERSION =head1 VERSION
version 0.05 version 0.06
=head1 DESCRIPTION =head1 DESCRIPTION
......
...@@ -11,7 +11,7 @@ use DateTime::Duration; ...@@ -11,7 +11,7 @@ use DateTime::Duration;
use Travel::Routing::DE::HAFAS::Utils; use Travel::Routing::DE::HAFAS::Utils;
use Travel::Status::DE::HAFAS::Journey; use Travel::Status::DE::HAFAS::Journey;
our $VERSION = '0.05'; our $VERSION = '0.06';
Travel::Routing::DE::HAFAS::Connection::Section->mk_ro_accessors( Travel::Routing::DE::HAFAS::Connection::Section->mk_ro_accessors(
qw(type schep_dep rt_dep sched_arr rt_arr dep arr arr_delay dep_delay journey distance duration transfer_duration dep_loc arr_loc qw(type schep_dep rt_dep sched_arr rt_arr dep arr arr_delay dep_delay journey distance duration transfer_duration dep_loc arr_loc
...@@ -27,7 +27,8 @@ sub new { ...@@ -27,7 +27,8 @@ sub new {
my $hafas = $opt{hafas}; my $hafas = $opt{hafas};
my $sec = $opt{sec}; my $sec = $opt{sec};
my $date = $opt{date}; my $date = $opt{date};
my $locs = $opt{locL}; my $locL = $opt{locL};
my $prodL = $opt{prodL};
# himL may only be present in departure monitor mode # himL may only be present in departure monitor mode
my @remL = @{ $opt{common}{remL} // [] }; my @remL = @{ $opt{common}{remL} // [] };
...@@ -86,8 +87,8 @@ sub new { ...@@ -86,8 +87,8 @@ sub new {
rt_arr => $rt_arr, rt_arr => $rt_arr,
dep => $rt_dep // $sched_dep, dep => $rt_dep // $sched_dep,
arr => $rt_arr // $sched_arr, arr => $rt_arr // $sched_arr,
dep_loc => $locs->[ $sec->{dep}{locX} ], dep_loc => $locL->[ $sec->{dep}{locX} ],
arr_loc => $locs->[ $sec->{arr}{locX} ], arr_loc => $locL->[ $sec->{arr}{locX} ],
dep_platform => $sec->{dep}{dplatfR} // $sec->{dep}{dPlatfS}, dep_platform => $sec->{dep}{dplatfR} // $sec->{dep}{dPlatfS},
arr_platform => $sec->{arr}{aplatfR} // $sec->{arr}{aPlatfS}, arr_platform => $sec->{arr}{aplatfR} // $sec->{arr}{aPlatfS},
dep_cancelled => $sec->{dep}{dCncl}, dep_cancelled => $sec->{dep}{dCncl},
...@@ -109,7 +110,8 @@ sub new { ...@@ -109,7 +110,8 @@ sub new {
$ref->{journey} = Travel::Status::DE::HAFAS::Journey->new( $ref->{journey} = Travel::Status::DE::HAFAS::Journey->new(
common => $opt{common}, common => $opt{common},
date => $date, date => $date,
locL => $locs, locL => $locL,
prodL => $prodL,
journey => $sec->{jny}, journey => $sec->{jny},
hafas => $hafas, hafas => $hafas,
); );
...@@ -198,7 +200,7 @@ Travel::Routing::DE::HAFAS::Connection::Section - A single trip between two stop ...@@ -198,7 +200,7 @@ Travel::Routing::DE::HAFAS::Connection::Section - A single trip between two stop
=head1 VERSION =head1 VERSION
version 0.05 version 0.06
=head1 DESCRIPTION =head1 DESCRIPTION
......
...@@ -43,7 +43,7 @@ None. ...@@ -43,7 +43,7 @@ None.
=head1 VERSION =head1 VERSION
version 0.05 version 0.06
=head1 METHODS =head1 METHODS
......
...@@ -15,8 +15,8 @@ apt-get -y install \ ...@@ -15,8 +15,8 @@ apt-get -y install \
libtest-compile-perl libtest-pod-perl \ libtest-compile-perl libtest-pod-perl \
libtest-simple-perl wget libtest-simple-perl wget
wget https://lib.finalrewind.org/deb/libtravel-status-de-deutschebahn-perl_5.05-1_all.deb wget https://lib.finalrewind.org/deb/libtravel-status-de-deutschebahn-perl_5.06-1_all.deb
dpkg -i libtravel-status-de-deutschebahn-perl_5.05-1_all.deb dpkg -i libtravel-status-de-deutschebahn-perl_5.06-1_all.deb
apt-file update apt-file update
apt-cache dumpavail | dpkg --merge-avail apt-cache dumpavail | dpkg --merge-avail
......