diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dbris-m | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/bin/dbris-m b/bin/dbris-m index ea751b3..13c7020 100755 --- a/bin/dbris-m +++ b/bin/dbris-m @@ -3,7 +3,7 @@ use strict; use warnings; use 5.020; -our $VERSION = '0.05'; +our $VERSION = '0.08'; use utf8; use DateTime; @@ -19,7 +19,7 @@ my $developer_mode; my $show_jid; my $use_cache = 1; my $cache; -my ( $json_output, $raw_json_output ); +my ( $json_output, $raw_json_output, $with_polyline ); my %known_mot = map { $_ => 1 } (qw(ICE EC_IC IR REGIONAL SBAHN BUS SCHIFF UBAHN TRAM ANRUFPFLICHTIG)); @@ -48,6 +48,7 @@ GetOptions( 'devmode' => \$developer_mode, 'json' => \$json_output, 'raw-json' => \$raw_json_output, + 'with-polyline' => \$with_polyline, ) or show_help(1); @@ -91,7 +92,8 @@ elsif ( $opt{station} =~ m{ ^ [?] (?<query> .*) $ }x ) { delete $opt{station}; } elsif ( $opt{station} =~ m{[|]} ) { - $opt{journey} = $opt{station}; + $opt{journey} = $opt{station}; + $opt{with_polyline} = $with_polyline; delete $opt{station}; } elsif ( $opt{station} =~ m{ [@] L = (?<eva> \d+ ) [@] }x ) { @@ -100,7 +102,7 @@ elsif ( $opt{station} =~ m{ [@] L = (?<eva> \d+ ) [@] }x ) { id => $opt{station}, }; } -elsif ( $opt{station} !~ m{ ^ \d+ $ }x ) { +else { my $status = Travel::Status::DE::DBRIS->new( cache => $cache, locationSearch => $opt{station}, @@ -573,7 +575,7 @@ B<dbris-m> B<?>I<query>|I<lat>B<:>I<lon> =head1 VERSION -version 0.05 +version 0.08 =head1 DESCRIPTION @@ -675,6 +677,11 @@ Default: now. Show version information and exit. +=item B<--with-polyline> (trip details) + +Request polyline (geocoordinates of the trip's route) from the backend. +Only sensible when combined with B<--json> or B<--raw-json>. + =back =head1 EXIT STATUS |