From c1edc66f2c9951f9075f91c209ccf51b7ab319ee Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 24 Jun 2011 08:58:58 +0200 Subject: Add --date/--time to db-ris, accept empty info in lib --- bin/db-ris | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/db-ris b/bin/db-ris index 95e1c6e..c2c76d1 100755 --- a/bin/db-ris +++ b/bin/db-ris @@ -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() ) { -- cgit v1.2.3