summaryrefslogtreecommitdiff
path: root/bin/hafas
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-04-06 22:38:50 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-04-06 22:38:50 +0200
commitc8c2af1bb6db579e86c46f8e0a6d4c4e03d9eba8 (patch)
tree073bf11303d70ab6122d06640d2211cdd47c9c75 /bin/hafas
parent7990ea2b73698e3dead616ec64f9358331100014 (diff)
add -j/--with-jid option
Diffstat (limited to 'bin/hafas')
-rwxr-xr-xbin/hafas12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/hafas b/bin/hafas
index 14cbeba..86cac23 100755
--- a/bin/hafas
+++ b/bin/hafas
@@ -20,6 +20,7 @@ my $types = q{};
my $developer_mode;
my ( $json_output, $raw_json_output );
my $show_full_route;
+my $show_jid;
my $exclude_infeasible;
my ( $list_services, $service );
my ( @excluded_mots, @exclusive_mots );
@@ -51,8 +52,9 @@ GetOptions(
'c|max-change=s' => \$max_change,
'C|change-time=s' => \$min_change_time,
'd|date=s' => \$date,
- 'h|help' => sub { show_help(0) },
'f|full-route' => \$show_full_route,
+ 'h|help' => sub { show_help(0) },
+ 'j|with-jid' => \$show_jid,
'l|language=s' => \$language,
'm|mot=s' => \$types,
's|service=s' => \$service,
@@ -425,6 +427,9 @@ for my $res ( $hafas->connections ) {
$sec->arr_platform // q{},
);
}
+ if ($show_jid) {
+ say $sec->journey->id;
+ }
}
elsif ( $sec->type eq 'WALK' ) {
printf(
@@ -507,6 +512,11 @@ Planned departure (or arrival) date. Default: today.
Show intermediate stops of each connection.
+=item B<-j>, B<--with-jid>
+
+Show journey IDs. These can be used to obtain details on individual journeys
+via B<hafas-m>.
+
=item B<-l>, B<--language> I<language>
Request free-text messages to be provided in I<language>.