Commit c1edc66f authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Add --date/--time to db-ris, accept empty info in lib

parent 1a5037db
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -5,9 +5,21 @@ use 5.010;

our $VERSION = '0.0';

use Getopt::Long;
use Travel::Status::DE::DeutscheBahn;

my $status = Travel::Status::DE::DeutscheBahn->new( station => shift, );
my ( $date, $time );

GetOptions(
	'd|date=s' => \$date,
	't|time=s' => \$time,
);

my $status = Travel::Status::DE::DeutscheBahn->new(
	date    => $date,
	station => shift,
	time    => $time,
);

for my $d ( $status->departures() ) {

+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ sub departures {
		my $route    = $n_route->textContent();
		my $dest     = $n_dest->textContent();
		my $platform = $n_platform->textContent();
		my $info     = $n_info->textContent();
		my $info     = $n_info ? $n_info->textContent() : q{};
		my @via;

		for my $str ( $time, $train, $dest, $platform, $info ) {