summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-01-19 07:54:23 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-01-19 07:54:23 +0100
commit042edb977fb7d5827af3bce844a8c00bd1442bcb (patch)
treeb678361ced61cbe4406f33943b0921bdabc56b64 /bin
parentf083f9755554ca72cf31df77de11b241bc37dd81 (diff)
add support for walk segments
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dbris11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/dbris b/bin/dbris
index d5a4f82..24b5203 100755
--- a/bin/dbris
+++ b/bin/dbris
@@ -220,6 +220,10 @@ for my $connection ( $ris->connections ) {
elsif ( $segment->is_transfer ) {
$header .= sprintf( ' %.1fkm', $segment->distance_m / 1e3 );
}
+ elsif ( $segment->is_walk ) {
+
+ # not shown in header
+ }
else {
$header .= q{ ??};
}
@@ -244,6 +248,12 @@ for my $connection ( $ris->connections ) {
say $note;
}
}
+ elsif ( $segment->is_walk ) {
+ printf( "${output_bold}%s${output_reset} %dm (≈ %d min.)\n",
+ $segment->walk_name, $segment->distance_m,
+ $segment->duration->in_units('minutes') );
+ next;
+ }
elsif ( $segment->direction ) {
printf( "${output_bold}%s${output_reset} → %s %s\n",
$segment->train_mid, $segment->direction,
@@ -252,6 +262,7 @@ for my $connection ( $ris->connections ) {
else {
printf( "${output_bold}%s${output_reset}\n", $segment->train_long );
}
+
printf( "%s ab %s\n",
$segment->dep->strftime('%H:%M'),
$segment->dep_name );