From cd63901479b6f70e1fe8775fe3a2e35f8a97473b Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 6 Oct 2024 13:20:33 +0200 Subject: Parse station-specific info messages --- bin/efa-m | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bin/efa-m') diff --git a/bin/efa-m b/bin/efa-m index 13818ae..4828f94 100755 --- a/bin/efa-m +++ b/bin/efa-m @@ -123,6 +123,7 @@ for my $efield (@edata_pre) { elsif ( $efield eq 'b' ) { $edata{route_before} = 1; $full_routes = 1 } elsif ( $efield eq 'f' ) { $edata{fullroute} = 1; $full_routes = 1 } elsif ( $efield eq 'r' ) { $edata{route} = 1; $full_routes = 1 } + elsif ( $efield eq 'i' ) { $edata{info} = 1 } elsif ( $efield eq 'm' ) { $edata{messages} = 1 } else { $edata{$efield} = 1 } } @@ -460,6 +461,18 @@ sub show_results { display_result(@output); + if ( $edata{info} ) { + for my $info ( $efa->infos ) { + say q{}; + if ( $info->subject ) { + printf( "# %s\n%s\n", $info->subtitle, $info->subject ); + } + else { + printf( "# %s\n", $info->subtitle ); + } + } + } + return; } @@ -659,6 +672,12 @@ requested station. Show each departure's full route (timestamps and stop names) before and after the requested station. +=item i / info + +Show station-specific information messages. These typically relate to +construction work, broken elevators or escalators, or special announcements +for large-scale events. + =item r / route Show up to three stops between the requested station and the departure's -- cgit v1.2.3