summaryrefslogtreecommitdiff
path: root/bin/efa
diff options
context:
space:
mode:
Diffstat (limited to 'bin/efa')
-rwxr-xr-xbin/efa35
1 files changed, 34 insertions, 1 deletions
diff --git a/bin/efa b/bin/efa
index 6916644..ed902df 100755
--- a/bin/efa
+++ b/bin/efa
@@ -22,6 +22,7 @@ my (@from, @to, @via);
my ($time, $time_depart, $time_arrive);
my $date;
my $restrict;
+my $prefer;
my $debug = 0;
my $ignore_info = 'Fahrradmitnahme';
my ($i, $j, $con, $part);
@@ -119,6 +120,7 @@ GetOptions(
'help' => sub {exec('perldoc', $0)},
'ignore-info=s' => \$ignore_info,
'post=s' => \%post,
+ 'prefer=s' => \$prefer,
'restrict=s' => \$restrict,
'time=s' => \$time,
'to=s{2}' => \@to,
@@ -159,6 +161,17 @@ if ($date) {
@post{'itdDateDay','itdDateMonth','itdDateYear'} = split(/\./, $date);
}
+if ($prefer) {
+ given($prefer) {
+ when('speed') { $post{routeType} = 'LEASTTIME' }
+ when('nowait') { $post{routeType} = 'LEASTINTERCHANGE' }
+ when('nowalk') { $post{routeType} = 'LEASTWALKING' }
+ default {
+ print STDERR "--prefer usage: speed / nowait / nowalk\n";
+ }
+ }
+}
+
if ($restrict) {
given ($restrict) {
when('local') { $post{lineRestriction} = 403 }
@@ -267,13 +280,33 @@ Journey end time (overrides --time/--depart)
Journey date
+=item B<--prefer> I<type>
+
+Prefer connections of I<type>:
+
+=over
+
+=item * speed (default)
+
+The faster, the better
+
+=item * nowait
+
+Prefer connections with less interchanges
+
+=item * nowalk
+
+Prefer connections with less walking (at interchanges)
+
+=back
+
=item B<--restrict> I<type>
Only accept connections using trains of type I<type>, where I<type> may be:
=over
-=item * local
+=item * local (default)
only take local trains ("Verbund-/Nahverkehrslinien"). Slow, but the cheapest
method if you're not travelling long distance