summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-11-28 22:11:53 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-11-28 22:11:53 +0100
commit1d5e4aedb8d4e114b02d508fa52371d3218a1119 (patch)
treeaadf70c0f451695af9c204b2c3c509de152e7450 /bin
parent10d600e8e573262ef812ff2197fe8426bad7da6a (diff)
Initial support for intermediate stops (via -E -E). will be cleaned up tomorrow
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa15
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/efa b/bin/efa
index a4972e4..1844102 100755
--- a/bin/efa
+++ b/bin/efa
@@ -114,7 +114,7 @@ GetOptions(
date|d=s
depart=s
exclude|e=s@
- extended-info|E
+ extended-info|E+
from=s@{2}
help|h
ignore-info|I:s
@@ -215,10 +215,19 @@ for my $i ( 0 .. $#routes ) {
}
printf(
- "%-5s ab %-30s %-20s %s\n%-5s an %s\n\n",
+ "%-5s ab %-30s %-20s %s\n",
$c->departure_time, $c->departure_stop_and_platform,
$c->train_line, $c->train_destination,
- $c->arrival_time, $c->arrival_stop_and_platform,
+ );
+
+ if ( $opt->{'extended-info'} and $opt->{'extended-info'} == 2 ) {
+ for my $via ( @{ $c->{via} } ) {
+ printf( "%-5s %-22s %s\n", @{$via}[ 1 .. 3 ] );
+ }
+ }
+
+ printf( "%-5s an %s\n\n",
+ $c->arrival_time, $c->arrival_stop_and_platform,
);
}
if ( $i != $#routes ) {