summaryrefslogtreecommitdiff
path: root/bin/db-wagenreihung
diff options
context:
space:
mode:
Diffstat (limited to 'bin/db-wagenreihung')
-rwxr-xr-xbin/db-wagenreihung16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/db-wagenreihung b/bin/db-wagenreihung
index e0dd4c9..756785c 100755
--- a/bin/db-wagenreihung
+++ b/bin/db-wagenreihung
@@ -71,7 +71,7 @@ my $wr = Travel::Status::DE::DBWagenreihung->new(
);
printf(
- "%s: %s → %s (%s)\n%s Gleis %s\n\n",
+ "%s: %s → %s\n",
join( ' / ', map { $wr->train_type . ' ' . $_ } $wr->train_numbers ),
join( ' / ', $wr->origins ),
join(
@@ -80,11 +80,10 @@ printf(
sprintf( '%s (%s)', $_->{name}, join( q{}, @{ $_->{sections} } ) )
} $wr->destinations
),
- $wr->train_desc,
- $wr->station_name,
- $wr->platform
);
+printf( "%s Gleis %s\n\n", $wr->station_name, $wr->platform );
+
for my $section ( $wr->sections ) {
my $section_length = $section->length_percent;
my $spacing_left = int( ( $section_length - 2 ) / 2 ) - 1;
@@ -139,6 +138,15 @@ for my $wagon ( $wr->wagons ) {
print $wr->direction == 100 ? '>' : '<';
print "\n\n";
+for my $desc ( $wr->train_descriptions ) {
+ if ( $desc->{text} ) {
+ printf( "%s (%s)\n",
+ $desc->{text}, join( q{}, @{ $desc->{sections} } ) );
+ }
+}
+
+say "";
+
for my $wagon ( $wr->wagons ) {
printf(
"%3s: %3s %10s %s\n",