summaryrefslogtreecommitdiff
path: root/bin/efa
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-03-26 20:43:16 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-03-26 20:43:16 +0100
commit1a14e16022b2dff4b2141e5c977ae1510f627ede (patch)
tree52a2b8f3b11675c8cbf6327d63080b1914dadc21 /bin/efa
parentb8c760605104322b990674d90940f409c774adff (diff)
show occupancy next to train / line name
Diffstat (limited to 'bin/efa')
-rwxr-xr-xbin/efa11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/efa b/bin/efa
index 5675d1c..55a68c9 100755
--- a/bin/efa
+++ b/bin/efa
@@ -228,15 +228,17 @@ sub display_connection {
}
}
+ my $occupancy = q{};
+
if ( $c->occupancy ) {
if ( $c->occupancy == 1 ) {
- say "# geringe Auslastung";
+ $occupancy = '[ ]';
}
elsif ( $c->occupancy == 2 ) {
- say "# hohe Auslastung";
+ $occupancy = '[* ]';
}
elsif ( $c->occupancy == 3 ) {
- say "# sehr hohe Auslastung";
+ $occupancy = '[!!]';
}
}
@@ -270,7 +272,8 @@ sub display_connection {
}
}
- printf( "%-5s an %s\n", $c->arrival_time, $c->arrival_stop_and_platform, );
+ printf( "%-5s an %-30s %s\n",
+ $c->arrival_time, $c->arrival_stop_and_platform, $occupancy );
print "\n";
if ( $opt->{'extended-info'}