Loading bin/dbris +13 −6 Original line number Diff line number Diff line Loading @@ -265,21 +265,28 @@ for my $connection ( $ris->connections ) { printf( "${output_bold}%s${output_reset}\n", $segment->train_long ); } printf( "%s ab %s\n", printf( "%s ab %s%s\n", $segment->dep->strftime('%H:%M'), $segment->dep_name ); $segment->dep_name, $segment->dep_platform ? q{ } . $segment->dep_platform : q{}, ); if ($show_full_route) { for my $stop ( $segment->route ) { printf( "%s %s %s\n", printf( "%s %s %s%s\n", $stop->arr ? $stop->arr->strftime('%H:%M') : q{ }, format_occupancy($stop), $stop->name, ); format_occupancy($stop), $stop->name, $stop->platform ? q{ } . $stop->platform : q{}, ); } } printf( "%s an %s\n", printf( "%s an %s%s\n", $segment->arr->strftime('%H:%M'), $segment->arr_name ); $segment->arr_name, $segment->arr_platform ? q{ } . $segment->arr_platform : q{}, ); say q{}; } say q{---------------------------------------}; Loading lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm +7 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,8 @@ Travel::Routing::DE::DBRIS::Connection::Segment->mk_ro_accessors( qw( dep_name dep_eva arr_name arr_eva train train_long train_mid train_short direction sched_dep rt_dep dep sched_arr rt_arr arr sched_dep rt_dep dep dep_platform sched_arr rt_arr arr arr_platform sched_duration rt_duration duration duration_percent journey_id occupancy occupancy_first occupancy_second Loading Loading @@ -135,6 +135,11 @@ sub new { = [ map { $_->{value} } @{ $json->{transferNotes} // [] } ]; } if ( @{ $ref->{route} // [] } ) { $ref->{dep_platform} = $ref->{route}[0]->platform; $ref->{arr_platform} = $ref->{route}[-1]->platform; } bless( $ref, $obj ); return $ref; Loading Loading
bin/dbris +13 −6 Original line number Diff line number Diff line Loading @@ -265,21 +265,28 @@ for my $connection ( $ris->connections ) { printf( "${output_bold}%s${output_reset}\n", $segment->train_long ); } printf( "%s ab %s\n", printf( "%s ab %s%s\n", $segment->dep->strftime('%H:%M'), $segment->dep_name ); $segment->dep_name, $segment->dep_platform ? q{ } . $segment->dep_platform : q{}, ); if ($show_full_route) { for my $stop ( $segment->route ) { printf( "%s %s %s\n", printf( "%s %s %s%s\n", $stop->arr ? $stop->arr->strftime('%H:%M') : q{ }, format_occupancy($stop), $stop->name, ); format_occupancy($stop), $stop->name, $stop->platform ? q{ } . $stop->platform : q{}, ); } } printf( "%s an %s\n", printf( "%s an %s%s\n", $segment->arr->strftime('%H:%M'), $segment->arr_name ); $segment->arr_name, $segment->arr_platform ? q{ } . $segment->arr_platform : q{}, ); say q{}; } say q{---------------------------------------}; Loading
lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm +7 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,8 @@ Travel::Routing::DE::DBRIS::Connection::Segment->mk_ro_accessors( qw( dep_name dep_eva arr_name arr_eva train train_long train_mid train_short direction sched_dep rt_dep dep sched_arr rt_arr arr sched_dep rt_dep dep dep_platform sched_arr rt_arr arr arr_platform sched_duration rt_duration duration duration_percent journey_id occupancy occupancy_first occupancy_second Loading Loading @@ -135,6 +135,11 @@ sub new { = [ map { $_->{value} } @{ $json->{transferNotes} // [] } ]; } if ( @{ $ref->{route} // [] } ) { $ref->{dep_platform} = $ref->{route}[0]->platform; $ref->{arr_platform} = $ref->{route}[-1]->platform; } bless( $ref, $obj ); return $ref; Loading