Loading bin/efa-m +1 −5 Original line number Diff line number Diff line Loading @@ -483,11 +483,7 @@ sub show_results { @output_line = ( $dtime, $platform, $line, q{}, $d->destination, $d ); if ($show_jid) { $output_line[2] .= sprintf( ' %s@%d(%s)%d', $d->stateless =~ s{ }{}gr, scalar $d->route_pre ? ( $d->route_pre )[0]->id : $d->stop_id, $d->sched_datetime->strftime('%Y%m%d'), $d->key ); $output_line[2] .= ' ' . $d->id; } if ( $edata{route} ) { Loading lib/Travel/Status/DE/EFA/Departure.pm +21 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,20 @@ sub parse_route { return \@ret; } sub id { my ($self) = @_; if ( $self->{id} ) { return $self->{id}; } return $self->{id} = sprintf( '%s@%d(%s)%d', $self->stateless =~ s{ }{}gr, scalar $self->route_pre ? ( $self->route_pre )[0]->id : $self->stop_id, $self->sched_datetime->strftime('%Y%m%d'), $self->key ); } sub hints { my ($self) = @_; Loading Loading @@ -324,6 +338,13 @@ Additional information related to the departure (list of strings). If departures for an address were requested, this is the stop name, otherwise it may be recent news related to the line's schedule. =item $departure->id Stringified unique(?) identifier of this departure; suitable for passing to Travel::Status::DE::EFA->new(stopseq) after decomposing it again. The returned string combines B<stateless>, B<stop_id> (or the ID of the first stop in B<route_pre>, if present), B<sched_datetime>, and B<key>. =item $departure->is_cancelled 1 if the departure got cancelled, 0 otherwise. Loading Loading
bin/efa-m +1 −5 Original line number Diff line number Diff line Loading @@ -483,11 +483,7 @@ sub show_results { @output_line = ( $dtime, $platform, $line, q{}, $d->destination, $d ); if ($show_jid) { $output_line[2] .= sprintf( ' %s@%d(%s)%d', $d->stateless =~ s{ }{}gr, scalar $d->route_pre ? ( $d->route_pre )[0]->id : $d->stop_id, $d->sched_datetime->strftime('%Y%m%d'), $d->key ); $output_line[2] .= ' ' . $d->id; } if ( $edata{route} ) { Loading
lib/Travel/Status/DE/EFA/Departure.pm +21 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,20 @@ sub parse_route { return \@ret; } sub id { my ($self) = @_; if ( $self->{id} ) { return $self->{id}; } return $self->{id} = sprintf( '%s@%d(%s)%d', $self->stateless =~ s{ }{}gr, scalar $self->route_pre ? ( $self->route_pre )[0]->id : $self->stop_id, $self->sched_datetime->strftime('%Y%m%d'), $self->key ); } sub hints { my ($self) = @_; Loading Loading @@ -324,6 +338,13 @@ Additional information related to the departure (list of strings). If departures for an address were requested, this is the stop name, otherwise it may be recent news related to the line's schedule. =item $departure->id Stringified unique(?) identifier of this departure; suitable for passing to Travel::Status::DE::EFA->new(stopseq) after decomposing it again. The returned string combines B<stateless>, B<stop_id> (or the ID of the first stop in B<route_pre>, if present), B<sched_datetime>, and B<key>. =item $departure->is_cancelled 1 if the departure got cancelled, 0 otherwise. Loading