Unverified Commit 951ffc66 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

dbris: add -j / --with-jid option

parent 22d57710
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ my ( $date, $time, $from, $to, $language );
my $mots;
my ( $first_class, $passengers );
my $developer_mode;
my $show_jid;
my ( $json_output, $raw_json_output );
my $verbose;
my $use_cache = 1;
@@ -52,6 +53,7 @@ GetOptions(
	'h|help'               => sub { show_help(0) },
	'f|full-route'         => \$show_full_route,
	'first-class!'         => \$first_class,
	'j|with-jid'           => \$show_jid,
	'm|modes-of-transit=s' => \$mots,
	'l|language=s'         => \$language,
	'p|passengers=s'       => \$passengers,
@@ -448,6 +450,10 @@ for my $connection ( $ris->connections ) {
			$segment->arr_platform ? q{  } . $segment->arr_platform : q{},
		);

		if ($show_jid) {
			say $segment->journey_id =~ s{ }{}gr;
		}

		if ($verbose) {
			for my $msg ( $segment->messages_ris ) {
				printf( "| %s (%s)\n", $msg->{value}, $msg->{key} );
@@ -500,6 +506,11 @@ Default: today.

Show intermediate stops rather than just start/end of connection legs.

=item B<-j>, B<--with-jid>

Show JourneyID for each connection segment.
The JourneyID can be passed to dbris-m(1) to obtain details about the segment.

=item B<--json>

Print result(s) as JSON and exit. This is a dump of internal data structures