From 1358a10dacab0d2a6bf14d31aab94696d77bb55c Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 2 Dec 2023 19:26:26 +0100 Subject: merge --filter-via into --via --- bin/efa-m | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'bin/efa-m') diff --git a/bin/efa-m b/bin/efa-m index d4c4ba6..3798d65 100755 --- a/bin/efa-m +++ b/bin/efa-m @@ -15,12 +15,11 @@ use Travel::Status::DE::EFA; my $efa_url = 'https://efa.vrr.de/vrr/XSLT_DM_REQUEST'; my $efa_encoding; -my ( $date, $time, $input_type, $list_lines, $offset, $relative_times ); -my ($full_routes); -my ( $filter_via, $track_via ); -my ( $timeout, $developer_mode ); -my ( @grep_lines, @grep_platforms, @grep_mots ); -my ( %edata, @edata_pre ); +my ( $date, $time, $input_type, $list_lines, $offset, $relative_times ); +my ( $full_routes, $filter_via ); +my ( $timeout, $developer_mode ); +my ( @grep_lines, @grep_platforms, @grep_mots ); +my ( %edata, @edata_pre ); my ( $list_services, $service, $discover_and_print, $discover ); my $efa; @@ -44,7 +43,7 @@ GetOptions( 'timeout=i' => \$timeout, 'u|efa-url=s' => \$efa_url, 'v|via=s' => \$filter_via, - 'V|track-via=s' => sub { $filter_via = $track_via = $_[1] }, + 'V|track-via=s' => \$filter_via, 'version' => \&show_version, 'devmode' => \$developer_mode, @@ -311,7 +310,7 @@ sub show_results { $dtime = '--:--'; } } - elsif ($track_via) { + elsif ($filter_via) { my $via = first { $_->name =~ m{$filter_via}io } $d->route_post; $dtime .= ' → ' @@ -586,15 +585,10 @@ value to disable it. =item B<-v>, B<--via> I -Only show trains serving I after the requseted stop. I -is matched against the "I I" fields in each line's route. -Regular expressions are also supported. - -=item B<-V>, B<--track-via> I - -Lik B<--via>: Only show trains serving I after the requseted stop. -Also, show the arrival time at I after the departure time at the -current stop. +Only show trains serving I after the requseted stop, and show the +arrival time at I after the departure time at the current stop. +I is matched against the "I I" fields in each line's +route. Regular expressions are also supported. =item B<--version> @@ -637,7 +631,7 @@ use B<-s> I when making requests. =over =item * EFA does not provide real-time data for the routes of requested -departures. Hence, B<--track-via> estimates the arrival time from scheduled +departures. Hence, B<--via> estimates the arrival time from scheduled departure and departure delay =back -- cgit v1.2.3