summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/hafas-m11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/hafas-m b/bin/hafas-m
index 4583248..f881589 100755
--- a/bin/hafas-m
+++ b/bin/hafas-m
@@ -16,6 +16,7 @@ use Travel::Status::DE::HAFAS;
my ( $date, $time, $language );
my $arrivals;
+my $show_jid;
my $types = q{};
my $developer_mode;
my $via;
@@ -37,6 +38,7 @@ GetOptions(
'a|arrivals' => \$arrivals,
'd|date=s' => \$date,
'h|help' => sub { show_help(0) },
+ 'j|with-jid' => \$show_jid,
'l|language=s' => \$language,
'm|mot=s' => \$types,
's|service=s' => \$service,
@@ -611,6 +613,10 @@ for my $d (@results) {
. $info_line;
}
+ if ($show_jid) {
+ $info_line = $d->id . ' ' . $info_line;
+ }
+
my $entry = [
( $d->is_cancelled ? '--:--' : $d->datetime->strftime('%H:%M') )
. ( $d->tz_offset ? q{*} : ( q{ } x $offset_len ) ),
@@ -745,6 +751,11 @@ the end station.
Date to list departures for. Default: today.
+=item B<-j>, B<--with-jid>
+
+Show journey IDs in arrival/departure board. These can be used to obtain
+details on individual journeys with subsequent B<hafas-m> invocations.
+
=item B<--json>
Print result(s) as JSON and exit. This is a dump of internal data structures