summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa31
1 files changed, 31 insertions, 0 deletions
diff --git a/bin/efa b/bin/efa
index 6c1649f..3cbd03c 100755
--- a/bin/efa
+++ b/bin/efa
@@ -114,6 +114,29 @@ sub check_for_error {
return;
}
+sub format_footpath {
+ my @parts = @_;
+ my $str = q{};
+
+ for my $path_elem (@parts) {
+ my ( $type, $level ) = @{$path_elem};
+ if ( $level eq 'UP' ) {
+ $str .= ' ↗';
+ }
+ elsif ( $level eq 'DOWN' ) {
+ $str .= ' ↘';
+ }
+ elsif ( $level eq 'LEVEL' ) {
+ $str .= ' →';
+ }
+ else {
+ $str .= " [unhandled level, please report a bug : $level]";
+ }
+ }
+
+ return $str;
+}
+
sub display_connection {
my ($c) = @_;
@@ -153,6 +176,14 @@ sub display_connection {
printf( "%-5s an %s\n", $c->arrival_time, $c->arrival_stop_and_platform, );
print "\n";
+ if ( $opt->{'extended-info'}
+ and $c->footpath_duration
+ and $c->footpath_type ne 'IDEST' )
+ {
+ printf( "%5d min Umsteigedauer: %s\n\n",
+ $c->footpath_duration, format_footpath( $c->footpath_parts ) );
+ }
+
return;
}