Unverified Commit 1358a10d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

merge --filter-via into --via

parent 801fea28
Loading
Loading
Loading
Loading
+12 −18
Original line number Diff line number Diff line
@@ -16,8 +16,7 @@ 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 ( $full_routes, $filter_via );
my ( $timeout,     $developer_mode );
my ( @grep_lines,  @grep_platforms, @grep_mots );
my ( %edata,       @edata_pre );
@@ -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