summaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-12-03 10:38:41 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-12-03 10:38:56 +0100
commit9015d556eb2a60b3ea0b753605887631e3f722be (patch)
treeb637938d8f502062259e47209d09267bf28d30b6 /cgi
parenta3f2e6d4f97fce1bfb425a04243886c3ad71f4f8 (diff)
version++0.04
Diffstat (limited to 'cgi')
-rw-r--r--cgi/index.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index 80cf5c3..7da21ac 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -11,7 +11,7 @@ use Travel::Status::DE::VRR;
no warnings 'uninitialized';
-our $VERSION = '0.03';
+our $VERSION = '0.04';
sub default_no_lines {
return 5;
@@ -89,6 +89,8 @@ sub handle_request {
sub shorten_line {
my ($line) = @_;
+ $line =~ s{ \s* S-Bahn }{}ox;
+
$line =~ s{ ^ ( U | S | SB ) \K \s+ }{}ox;
$line =~ s{ ^ ( STR | Bus ) }{}ox;
@@ -175,7 +177,7 @@ sub render_image {
);
if ($errstr) {
- $png->draw_at( 6, '-------efa.vrr.de error-------' );
+ $png->draw_at( 6, '--------backend error--------' );
$png->new_line();
$png->new_line();
$png->draw_at( 0, $errstr );
@@ -194,7 +196,6 @@ sub render_image {
// $strp_simple->parse_datetime($time);
my $dt;
- $line =~ s{ \s* S-Bahn }{}ox;
if ( ( @grep_line and not( grep { $line =~ $_ } @grep_line ) )
or ( @grep_platform and not( $platform ~~ \@grep_platform ) )