Skip to content
GitLab
Explore
Sign in
derf
Travel-Routing-DE-HAFAS
Compare revisions
b7af35c24679ff46c92e96078d2e4d1930cb8b15 to c8c2af1bb6db579e86c46f8e0a6d4c4e03d9eba8
Commits on Source (3)
Section: add comment with known section types
· 30b4bdb5
Birte Kristina Friesel
authored
Apr 02, 2024
30b4bdb5
update Travel::Status::DE::HAFAS dependency to 6.00
· 7990ea2b
Birte Kristina Friesel
authored
Apr 02, 2024
7990ea2b
add -j/--with-jid option
· c8c2af1b
Birte Kristina Friesel
authored
Apr 06, 2024
c8c2af1b
Hide whitespace changes
Inline
Side-by-side
bin/hafas
View file @
c8c2af1b
...
...
@@ -20,6 +20,7 @@ my $types = q{};
my
$developer_mode
;
my
(
$json_output
,
$raw_json_output
);
my
$show_full_route
;
my
$show_jid
;
my
$exclude_infeasible
;
my
(
$list_services
,
$service
);
my
(
@excluded_mots
,
@exclusive_mots
);
...
...
@@ -51,8 +52,9 @@ GetOptions(
'
c|max-change=s
'
=>
\
$max_change
,
'
C|change-time=s
'
=>
\
$min_change_time
,
'
d|date=s
'
=>
\
$date
,
'
h|help
'
=>
sub
{
show_help
(
0
)
},
'
f|full-route
'
=>
\
$show_full_route
,
'
h|help
'
=>
sub
{
show_help
(
0
)
},
'
j|with-jid
'
=>
\
$show_jid
,
'
l|language=s
'
=>
\
$language
,
'
m|mot=s
'
=>
\
$types
,
'
s|service=s
'
=>
\
$service
,
...
...
@@ -425,6 +427,9 @@ for my $res ( $hafas->connections ) {
$sec
->
arr_platform
//
q{}
,
);
}
if
(
$show_jid
)
{
say
$sec
->
journey
->
id
;
}
}
elsif
(
$sec
->
type
eq
'
WALK
'
)
{
printf
(
...
...
@@ -507,6 +512,11 @@ Planned departure (or arrival) date. Default: today.
Show intermediate stops of each connection.
=item B<-j>, B<--with-jid>
Show journey IDs. These can be used to obtain details on individual journeys
via B<hafas-m>.
=item B<-l>, B<--language> I<language>
Request free-text messages to be provided in I<language>.
...
...
cpanfile
View file @
c8c2af1b
...
...
@@ -9,7 +9,7 @@ requires 'List::MoreUtils';
requires 'List::Util';
requires 'LWP::UserAgent';
requires 'LWP::Protocol::https';
requires 'Travel::Status::DE::HAFAS', '
5
.0
6
';
requires 'Travel::Status::DE::HAFAS', '
6
.0
0
';
on test => sub {
requires 'Test::Compile';
...
...
lib/Travel/Routing/DE/HAFAS/Connection/Section.pm
View file @
c8c2af1b
...
...
@@ -115,6 +115,8 @@ sub new {
$ref
->
{
arr_delay
}
=
(
$rt_arr
->
epoch
-
$sched_arr
->
epoch
)
/
60
;
}
# known types according to 2015 DB Navigator:
# HIDE, JNY, WALK, BIKE, KISS, PARK, TAXI, TRSF, DEVI
if
(
$sec
->
{
type
}
eq
'
JNY
'
)
{
$ref
->
{
journey
}
=
Travel::Status::DE::HAFAS::
Journey
->
new
(
...
...
scripts/makedeb-docker-helper
View file @
c8c2af1b
...
...
@@ -15,8 +15,8 @@ apt-get -y install \
libtest-compile-perl libtest-pod-perl
\
libtest-simple-perl wget
wget https://lib.finalrewind.org/deb/libtravel-status-de-deutschebahn-perl_
5
.0
6
-1_all.deb
dpkg
-i
libtravel-status-de-deutschebahn-perl_
5
.0
6
-1_all.deb
wget https://lib.finalrewind.org/deb/libtravel-status-de-deutschebahn-perl_
6
.0
0
-1_all.deb
dpkg
-i
libtravel-status-de-deutschebahn-perl_
6
.0
0
-1_all.deb
apt-file update
apt-cache dumpavail | dpkg
--merge-avail
...
...