From 7caeab689baf8390e12915264838c1a0da73e2ef Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 26 Dec 2024 14:00:54 +0100 Subject: journey: parse trip day and attributes --- bin/dbris-m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/dbris-m b/bin/dbris-m index 2049f2d..bf75a29 100755 --- a/bin/dbris-m +++ b/bin/dbris-m @@ -211,8 +211,7 @@ elsif ( $opt{journey} ) { } } - say $trip->train; - say q{}; + printf( "%s am %s\n\n", $trip->train, $trip->day->strftime('%d.%m.%Y') ); for my $stop ( $trip->route ) { if ( $stop == $mark_stop ) { @@ -242,6 +241,12 @@ elsif ( $opt{journey} ) { print($output_reset); } } + if ( $trip->attributes ) { + say q{}; + } + for my $attr ( $trip->attributes ) { + say $attr->{value}; + } if ( $trip->messages ) { say q{}; } -- cgit v1.2.3