Unverified Commit 71b41222 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

dbris: Add -f / --full-route

parent a226458d
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ my $discounts;
my $developer_mode;
my ( $json_output, $raw_json_output );
my $use_cache = 1;
my $show_full_route;
my $cache;

my @output;
@@ -36,6 +37,7 @@ GetOptions(
	'd|date=s'             => \$date,
	'D|discounts=s'        => \$discounts,
	'h|help'               => sub { show_help(0) },
	'f|full-route'         => \$show_full_route,
	'm|modes-of-transit=s' => \$mots,
	't|time=s'             => \$time,
	'V|version'            => \&show_version,
@@ -254,11 +256,14 @@ for my $connection ( $ris->connections ) {
			$segment->dep->strftime('%H:%M'),
			$segment->dep_name );

		if ($show_full_route) {
			for my $stop ( $segment->route ) {
				printf( "%s  %s  %s\n",
					$stop->arr ? $stop->arr->strftime('%H:%M') : q{     },
					format_occupancy($stop), $stop->name, );
			}
		}

		printf( "%s  an  %s\n",
			$segment->arr->strftime('%H:%M'),
			$segment->arr_name );