diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-12-02 19:26:26 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-12-02 19:26:26 +0100 |
commit | 1358a10dacab0d2a6bf14d31aab94696d77bb55c (patch) | |
tree | 110cca410c06e5814770314bd96746aa8a7eddac /bin/efa-m | |
parent | 801fea28fe765c59d9ee27a8cec876f6fece09d0 (diff) |
merge --filter-via into --via
Diffstat (limited to 'bin/efa-m')
-rwxr-xr-x | bin/efa-m | 30 |
1 files changed, 12 insertions, 18 deletions
@@ -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<station> -Only show trains serving I<station> after the requseted stop. I<station> -is matched against the "I<city> I<stop>" fields in each line's route. -Regular expressions are also supported. - -=item B<-V>, B<--track-via> I<station> - -Lik B<--via>: Only show trains serving I<station> after the requseted stop. -Also, show the arrival time at I<station> after the departure time at the -current stop. +Only show trains serving I<station> after the requseted stop, and show the +arrival time at I<station> after the departure time at the current stop. +I<station> is matched against the "I<city> I<stop>" fields in each line's +route. Regular expressions are also supported. =item B<--version> @@ -637,7 +631,7 @@ use B<-s> I<service> 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 |