diff options
-rw-r--r-- | Changelog | 5 | ||||
-rwxr-xr-x | bin/efa | 6 | ||||
-rw-r--r-- | lib/Travel/Routing/DE/EFA.pm | 1 | ||||
-rw-r--r-- | lib/Travel/Routing/DE/EFA/Route/Part.pm | 14 |
4 files changed, 20 insertions, 6 deletions
@@ -1,6 +1,9 @@ git HEAD - * efa: Fix odd encoding issues when using -w, -t, -d, -a and similar + * efa: Fix encoding issues when using -w, -t, -d, -a and similar + * Travel::Routing::DE::EFA::Route::Part: Add train_product accessor + * Improve support for walking connections + * Handle "nicht umsteigen" messages and other unusual connection types Travel::Routing::DE::VRR 2.10 - Fri May 29 2015 @@ -137,8 +137,10 @@ sub display_connection { printf( "%-5s ab %-30s %-20s %s\n", - $c->departure_time, $c->departure_stop_and_platform, - $c->train_line, $c->train_destination, + $c->departure_time, + $c->departure_stop_and_platform, + $c->train_line || $c->train_product, + $c->train_destination, ); if ( $opt->{'full-route'} ) { diff --git a/lib/Travel/Routing/DE/EFA.pm b/lib/Travel/Routing/DE/EFA.pm index 801270b..562c0e9 100644 --- a/lib/Travel/Routing/DE/EFA.pm +++ b/lib/Travel/Routing/DE/EFA.pm @@ -594,6 +594,7 @@ sub parse_xml_part { departure_stop => $e_dep->getAttribute('name'), departure_platform => $e_dep->getAttribute('platformName'), train_line => $e_mot->getAttribute('name'), + train_product => $e_mot->getAttribute('productName'), train_destination => $e_mot->getAttribute('destination'), arrival_date => $self->itddate_str($e_adate), arrival_time => $self->itdtime_str($e_atime), diff --git a/lib/Travel/Routing/DE/EFA/Route/Part.pm b/lib/Travel/Routing/DE/EFA/Route/Part.pm index 8c46fb9..e6c6e18 100644 --- a/lib/Travel/Routing/DE/EFA/Route/Part.pm +++ b/lib/Travel/Routing/DE/EFA/Route/Part.pm @@ -13,7 +13,7 @@ Travel::Routing::DE::EFA::Route::Part->mk_ro_accessors( arrival_date arrival_time arrival_sdate arrival_stime delay departure_platform departure_stop departure_date departure_time departure_sdate - departure_stime train_line train_destination + departure_stime train_destination train_line train_product ) ); @@ -219,11 +219,19 @@ newline-terminated strings =item $part->train_destination -destination of the line providing the connection +Destination of the line providing the connection. May be empty. =item $part->train_line -name / number of the line +Name / number of the line. May be empty. + +=item $part->train_product + +Usually the prefix of B<train_line>, for instance C<< U-Bahn >> or +C<< Niederflurstrab >>. However, it may also contain special values such as +C<< FuE<szlig>weg >> (for a direct connection without transit vehicles) or +C<< nicht umsteigen >> (in case a vehicle changes its line number at a stop). +In those cases, B<train_destination> and B<train_line> are usually empty. =item $part->via |