From 9765a97011272bde005dd96a43d10e7e887ded0b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 6 Aug 2015 16:02:05 +0200 Subject: infoscreen: detail view: all times in the timetable are schedule data --- templates/infoscreen.html.ep | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index c20589d..54b1605 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -76,7 +76,14 @@ <%= $stop->name %> % } - <%= $departure->time %> + +% if ($departure->can('sched_time')) { + <%= $departure->sched_time %> +% } +% else { + <%= $departure->time %> +% } + <%= $id_name %> <%= $id_stop %> % for my $stop ($departure->route_post) { -- cgit v1.2.3 From eb3be788427872f60631078215a82352c490dceb Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 6 Aug 2015 16:08:57 +0200 Subject: fix infoscreen for db backend --- templates/infoscreen.html.ep | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index 54b1605..4a4f309 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -107,7 +107,7 @@ % if ($departure->can('route_interesting') and $departure->route_interesting) { -%= join(' - ', map { $_->name_suf } ($departure->route_interesting)); +%= join(' - ', map { ref($_) ? $_->name_suf : $_ } ($departure->route_interesting)); % } % elsif ($departure->can('lineref') and $departure->lineref) { %= $departure->lineref->route @@ -131,11 +131,13 @@ FĂ„LLT AUS % } % else { -% if ($departure->countdown > 0) { - <%= $departure->countdown %> min -% } -% else { - sofort +% if ($departure->can('countdown')) { +% if ($departure->countdown > 0) { + <%= $departure->countdown %> min +% } +% else { + sofort +% } % } % } -- cgit v1.2.3 From 9bee75d432365d44af46f5d500f7d210b867cc18 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 11 Aug 2015 16:38:14 +0200 Subject: rename title/description to infoscreen (we're not just a fakedisplay anymore) --- index.pl | 10 +++++----- templates/exception.html.ep | 2 +- templates/main.html.ep | 6 +++--- templates/not_found.html.ep | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/index.pl b/index.pl index 73919e7..9ed5c56 100644 --- a/index.pl +++ b/index.pl @@ -33,7 +33,7 @@ sub get_results { $expiry ||= 150; my $cache = Cache::File->new( - cache_root => '/tmp/vrr-fake', + cache_root => '/tmp/vrr-fakedisplay', default_expires => "${expiry} sec", lock_level => Cache::File::LOCK_LOCAL(), ); @@ -106,7 +106,7 @@ sub handle_request { $no_lines = $default{no_lines}; } - $self->stash( title => 'vrr-fakedisplay' ); + $self->stash( title => 'vrr-infoscreen' ); $self->stash( version => $VERSION ); $self->stash( params => $self->req->params->to_string ); @@ -122,7 +122,7 @@ sub handle_request { errstr => $errstr, title => $stop ? "departures for ${city} ${stop}" - : "vrr-fakedisplay ${VERSION}", + : "vrr-infoscreen ${VERSION}", ); return; @@ -342,7 +342,7 @@ sub render_html { $self->render( $template, - title => "vrr-fakedisplay v${VERSION}", + title => "vrr-infoscreen v${VERSION}", color => [ split( qr{,}, $color ) ], departures => \@departures, id_name => decode( 'UTF-8', $data->{id_name} ), @@ -522,7 +522,7 @@ get '/:stop' => \&handle_request; app->config( hypnotoad => { listen => ['http://*:8091'], - pid_file => '/tmp/vrr-fake.pid', + pid_file => '/tmp/vrr-fakedisplay.pid', workers => $ENV{DBFAKEDISPLAY_WORKERS} // 2, }, ); diff --git a/templates/exception.html.ep b/templates/exception.html.ep index dfa71e1..f473669 100644 --- a/templates/exception.html.ep +++ b/templates/exception.html.ep @@ -1,7 +1,7 @@ - vrr-fakedisplay + vrr-infoscreen %= stylesheet '/main.css' diff --git a/templates/main.html.ep b/templates/main.html.ep index 8d17e64..3b33790 100644 --- a/templates/main.html.ep +++ b/templates/main.html.ep @@ -80,7 +80,7 @@ change any time.

% else {

-VRR-Fakedisplay shows the next departures at a public transit stop, just like +VRR-Infoscreen shows the next departures at a public transit stop, just like the Lumino LED displays used at some stops.

@@ -162,10 +162,10 @@ other German transit networks.
  • The EFA backend does not support Umlauts
  • For Düsseldorf, the DB backend usually gives better results
  • -
  • If you write the city correctly (like "Essen", not "essen"), vrr-fake can +
  • If you write the city correctly (like "Essen", not "essen"), vrr-infoscreen can shorten destination names
  • Example -
  • See also db-fakedisplay for an +
  • See also db-infoscreen for an interface optimized for Deutsche Bahn departure data
diff --git a/templates/not_found.html.ep b/templates/not_found.html.ep index 35255b3..ca06ae9 100644 --- a/templates/not_found.html.ep +++ b/templates/not_found.html.ep @@ -1,7 +1,7 @@ - vrr-fakedisplay + vrr-infoscreen %= stylesheet '/main.css' -- cgit v1.2.3