%= javascript '/jquery-1.10.2.min.js' % if ($city and $stop) { % if ($errstr) {
Received an error from the backend service:
%= $errstr
% } % elsif ($frontend eq 'png') { % } % elsif ($frontend eq 'html') { % } % elsif ($frontend eq 'json') {

JSON data for <%= $city %> <%= $stop %>

Data is cached for 1 minute: JSON format:

% } % } # ($city and $stop) % else {

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

It works best for the VRR (Verkehrsverbund Rhein-Ruhr), but also supports most other German transit networks.

% }
% if (my $error = stash 'error') {

Error: <%= $error %>

% } %= form_for _redirect => begin
City → Stop
%= text_field 'city' %= text_field 'stop' %= submit_button 'Display'
optional:
display height [1..10]
%= text_field 'no_lines'
min. offset [minutes]
%= text_field 'offset'
match line prefixes¹
%= text_field 'line'
match platform¹
%= text_field 'platform'
backend
%= select_field backend => [['EFA (VRR)' => 'vrr'], ['HAFAS (DB)' => 'db']]
frontend
%= select_field frontend => [['Image (PNG)' => 'png'], ['HTML' => 'html'], ['JSON' => 'json']]
% end

¹ separate values with commas, e.g. NE,U,10

notes:
vrr-fakedisplay v<%= $version %>
%= javascript begin function reloadDisplay() { d = new Date(); $("#display").attr("src", "../<%= $city %>/<%= $stop %>.<%= $frontend %>?<%= $params %>&r="+d.getTime()) setTimeout('reloadDisplay()', 60000); } setTimeout('reloadDisplay()', 60000); % end