summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-06-24 08:58:58 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-06-24 08:59:50 +0200
commitc1edc66f2c9951f9075f91c209ccf51b7ab319ee (patch)
tree4c15474468fe11df3d291426d9d74e792306557a /bin
parent1a5037db51400c8fdd0cd9210df1310ca757371e (diff)
Add --date/--time to db-ris, accept empty info in lib
Diffstat (limited to 'bin')
-rwxr-xr-xbin/db-ris14
1 files changed, 13 insertions, 1 deletions
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() ) {