summaryrefslogtreecommitdiff
path: root/bin/hafas
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-11-19 12:59:18 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2023-11-19 12:59:18 +0100
commit2b2fcbdee810b59ecfec85929f134c07f5aa40c8 (patch)
tree343bc91ac07641f9cf64b1aec9b5d3dcb7026b04 /bin/hafas
parent1c82ee17d2fa06a79fe3b96883d603408b4fe74a (diff)
Use Travel::Status::DE::HAFAS::Journey for journey data
Diffstat (limited to 'bin/hafas')
-rwxr-xr-xbin/hafas15
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/hafas b/bin/hafas
index deccb63..5bb3634 100755
--- a/bin/hafas
+++ b/bin/hafas
@@ -295,16 +295,16 @@ for my $res ( $hafas->connections ) {
$glance .= sprintf(
' (%01d:%02d) %s',
$sec->transfer_duration->in_units( 'hours', 'minutes' ),
- $sec->name
+ $sec->journey->name
);
}
else {
$negative_transfer = 1;
- $glance .= sprintf( ' (--:--) %s', $sec->name );
+ $glance .= sprintf( ' (--:--) %s', $sec->journey->name );
}
}
else {
- $glance .= $sec->name;
+ $glance .= $sec->journey->name;
}
}
@@ -348,9 +348,12 @@ for my $res ( $hafas->connections ) {
for my $sec ( $res->sections ) {
if ( $sec->type eq 'JNY' ) {
- printf( "${output_bold}%s${output_reset} → %s %s\n",
- $sec->name, $sec->direction,
- display_occupancies( $sec->load ) );
+ printf(
+ "${output_bold}%s${output_reset} → %s %s\n",
+ $sec->journey->name,
+ $sec->journey->direction,
+ display_occupancies( $sec->load )
+ );
printf(
"%-5s %-${delay_fmt}s ab %s%s%s\n",
$sec->dep_cancelled