summaryrefslogtreecommitdiff
path: root/bin/efa
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-05-02 19:08:51 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-05-02 19:08:51 +0200
commitc39d354c95993c7b68cbba7bf4e72d27da9590a7 (patch)
tree03ac07deb327e0789983209d8819a29c7a496a96 /bin/efa
parentd9373228ed772bd5030c2a749fd92c61a2ef7054 (diff)
efa: Added --ignore-info switch, ignore bicycle-related information by default
Diffstat (limited to 'bin/efa')
-rwxr-xr-xbin/efa10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/efa b/bin/efa
index a782511..39b5237 100755
--- a/bin/efa
+++ b/bin/efa
@@ -23,6 +23,7 @@ my ($time, $time_depart, $time_arrive);
my $date;
my $restrict;
my $debug = 0;
+my $ignore_info = 'Fahrradmitnahme( begrenzt)? möglich';
my ($i, $j, $con, $part);
$post{type_origin} = 'stop';
@@ -115,6 +116,7 @@ GetOptions(
'debug' => \$debug,
'depart=s' => \$time_depart,
'from=s{2}' => \@from,
+ 'ignore-info=s' => \$ignore_info,
'post=s' => \%post,
'restrict=s' => \$restrict,
'time=s' => \$time,
@@ -196,7 +198,9 @@ $cons = parse_content($raw);
for ($i = 0; $con = $cons->[$i]; $i++) {
for ($j = 0; $part = $con->[$j]; $j++) {
foreach (@{$part->{extra}}) {
- print "# $_\n";
+ unless (length($ignore_info) and $_ =~ /$ignore_info/i) {
+ print "# $_\n";
+ }
}
printf(
"%-5s %-2s %-30s %-20s %s\n%-5s %-2s %-30s\n\n",
@@ -262,6 +266,10 @@ Journey date
Only accept connections using trains of type I<type>, where I<type> may be:
+=item B<--ignore-info> I<regex>
+
+Ignore additional information matching I<regen> (default: "Fahrradmitnahme( begrenzt)? möglich")
+
=over
=item * local