summaryrefslogtreecommitdiff
path: root/bin/efa
diff options
context:
space:
mode:
Diffstat (limited to 'bin/efa')
-rwxr-xr-xbin/efa15
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/efa b/bin/efa
index 61e7106..7491c33 100755
--- a/bin/efa
+++ b/bin/efa
@@ -17,7 +17,7 @@ use Getopt::Long qw/:config no_ignore_case/;
use List::Util qw(first);
our $VERSION = '2.12';
-my $ignore_info = 'Fahrradmitnahme|Einstiegshilfe';
+my $ignore_info;
my $efa;
my $efa_url = 'http://efa.vrr.de/vrr/XSLT_TRIP_REQUEST2';
my %accessibility;
@@ -237,7 +237,7 @@ GetOptions(
if ( $opt->{accessibility} ) {
@{ $opt->{accessibility} }
- = split( qr{,}, join( q{,}, @{ $opt->{accessibility} } ) );
+ = split( qr{,}, join( q{,}, @{ $opt->{accessibility} } ) );
}
for my $field ( @{ $opt->{accessibility} } ) {
@@ -247,6 +247,7 @@ for my $field ( @{ $opt->{accessibility} } ) {
when ( [qw[E no-elevators]] ) { $opt->{without_elevators} = 1 }
when ( [qw[l nf low-platform]] ) { $opt->{with_low_platform} = 1 }
when ( [qw[w wheelchair]] ) { $opt->{with_wheelchair} = 1 }
+ when ( [qw[i info]] ) { } # used for ignore_info default
}
}
@@ -277,6 +278,16 @@ if ( not( @from and @to ) ) {
}
}
+if ( not defined $ignore_info ) {
+ $ignore_info = join(
+ q{|},
+ grep { defined } (
+ @{$opt->{accessibility}} ? undef : 'Einstiegshilfe',
+ $opt->{bike} ? undef : 'Fahrradmitnahme',
+ )
+ );
+}
+
for my $pair ( [ \@from, \$from_type ], [ \@via, \$via_type ],
[ \@to, \$to_type ], )
{