diff options
-rwxr-xr-x | bin/dbris-m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/dbris-m b/bin/dbris-m index 733b35b..26def34 100755 --- a/bin/dbris-m +++ b/bin/dbris-m @@ -75,6 +75,16 @@ elsif ( $opt{station} =~ m{[|]} ) { $opt{journey} = { id => $opt{station} }; delete $opt{station}; } +elsif ( $opt{station} !~ m{ ^ \d+ $ }x ) { + my $status + = Travel::Status::DE::DBRIS->new( locationSearch => $opt{station} ); + for my $result ( $status->results ) { + if ( defined $result->eva ) { + $opt{station} = $result->eva; + last; + } + } +} my $status = Travel::Status::DE::DBRIS->new(%opt); |