From 0fd9e8a907d79c82d58dd34d031db20462aed115 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 19 May 2009 21:24:36 +0200 Subject: efa: Added --max-change (maximum number of interchanges) --- bin/efa | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin') diff --git a/bin/efa b/bin/efa index 3f512a2..db89e54 100755 --- a/bin/efa +++ b/bin/efa @@ -21,6 +21,7 @@ my $cons; my (@from, @to, @via); my ($time, $time_depart, $time_arrive); my $date; +my $maxinter; my $restrict; my $prefer; my $proximity; @@ -120,6 +121,7 @@ GetOptions( 'from=s{2}' => \@from, 'help' => sub {exec('perldoc', $0)}, 'ignore-info=s' => \$ignore_info, + 'max-change=i' => \$maxinter, 'post=s' => \%post, 'prefer=s' => \$prefer, 'proximity' => \$proximity, @@ -163,6 +165,10 @@ if ($date) { @post{'itdDateDay','itdDateMonth','itdDateYear'} = split(/\./, $date); } +if (defined($maxinter)) { + $post{maxChanges} = $maxinter; +} + if ($prefer) { given($prefer) { when('speed') { $post{routeType} = 'LEASTTIME' } @@ -286,6 +292,10 @@ Journey end time (overrides --time/--depart) Journey date +=item B<--max-change> I + +Print connections with at most I interchanges + =item B<--prefer> I Prefer connections of I: -- cgit v1.2.3