summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-05-21 11:51:45 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-05-21 11:51:45 +0200
commit13f90963f9af52f6dcaeeec78b39742f577b342c (patch)
treee1ccc37d84798be8ba5f0187a281e1ebe59b159f
parentd788348bd7892a6dd606f422d23c5a489fa5cd7a (diff)
efa: Added --walk-speed ("Gehgeschwindigkeit")
-rwxr-xr-xbin/efa15
-rw-r--r--provides/zsh/completions/_efa1
2 files changed, 16 insertions, 0 deletions
diff --git a/bin/efa b/bin/efa
index 9d8f1e5..de1f4bc 100755
--- a/bin/efa
+++ b/bin/efa
@@ -26,6 +26,7 @@ my $maxinter;
my $restrict;
my $prefer;
my $proximity;
+my $walk_speed;
my $debug = 0;
my $ignore_info = 'Fahrradmitnahme';
my ($i, $j, $con, $part);
@@ -131,6 +132,7 @@ GetOptions(
'time=s' => \$time,
'to=s{2}' => \@to,
'via=s{2}' => \@via,
+ 'walk-speed=s' => \$walk_speed,
);
@exclude = split(/,/, join(',', @exclude));
@@ -222,6 +224,14 @@ if ($restrict) {
}
}
+if ($walk_speed) {
+ if ($walk_speed =~ /^(normal|fast|slow)$/) {
+ $post{changeSpeed} = $walk_speed;
+ } else {
+ print STDERR "--walk-speed usage: normal / fast / slow\n";
+ }
+}
+
$www->get($firsturl);
$www->submit_form(
form_name => 'jp',
@@ -375,6 +385,11 @@ All trains
=back
+=item B<--walk-speed> I<speed>
+
+Set your walking speed to I<speed>.
+Accepted values: normal (default), fast, slow
+
=item B<--ignore-info> I<regex>
Ignore additional information matching I<regex> (default: /Fahrradmitnahme/)
diff --git a/provides/zsh/completions/_efa b/provides/zsh/completions/_efa
index 568e572..94fa447 100644
--- a/provides/zsh/completions/_efa
+++ b/provides/zsh/completions/_efa
@@ -15,6 +15,7 @@ arguments=(
'--prefer:type:(speed nowait nowalk)'
'--proximity'
'--restrict:type:(local ic ice)'
+ '--walk-speed:speed:(normal fast slow)'
'--ignore-info:regex'
'*--post:POST key=value'
)