From 22728aaab49ed08c89c053313779e09ee54b99a7 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 6 Apr 2024 22:23:05 +0200 Subject: add -j/--with-jid option --- bin/hafas-m | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 invocations. + =item B<--json> Print result(s) as JSON and exit. This is a dump of internal data structures -- cgit v1.2.3