% if ($self->stash('refresh_interval')) { % } % my $av = 'v88'; # asset version % if (session('theme') and session('theme') eq 'dark' or param('dark')) { %= stylesheet "/static/${av}/css/dark.min.css", id => 'theme' % } % else { %= stylesheet "/static/${av}/css/light.min.css", id => 'theme' % } %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" %= javascript '/static/js/jquery-3.4.1.min.js', defer => undef %= javascript "/static/${av}/js/jquery-ui.min.js", defer => undef %= javascript "/static/${av}/js/dbf.min.js", defer => undef % if (not stash('hide_opts')) { %= javascript "/dyn/${av}/autocomplete.js", defer => undef % } % if (stash('with_geostop')) { %= javascript "/static/${av}/js/geostop.min.js", defer => undef % } % if (stash('with_map')) { %= stylesheet "/static/${av}/leaflet/leaflet.css" %= javascript "/static/${av}/leaflet/leaflet.js" %= javascript "/static/${av}/js/map-refresh.min.js", defer => undef % }
% if (my $error = stash 'error') {
Fehler:

%= $error

% } % elsif (stash('stationlist')) {
<%= l 'Mehrdeutige Eingabe' %>. <%= l 'Bitte eine Station aus der Liste auswählen' %>
% }
%= content
% if (not stash('hide_opts')) {
%= form_for _redirect => begin
<%= l 'Zug / Station' %>
% if (stash('stationlist')) { %= select_field input => stash('stationlist') % } % elsif (stash('input')) { %= text_field 'input', class => 'station', placeholder => l 'Zug, Stationsname oder Ril100-Kürzel', id => 'stationinput' % } % else { %= text_field 'input', class => 'station', placeholder => l 'Zug, Stationsname oder Ril100-Kürzel', id => 'stationinput', autofocus => 'autofocus' % }
%= submit_button l('Abfahrtstafel')
% if (stash('input')) { % }
<%= l 'Weitere Einstellungen' %>
%= check_box 'rt' => 1, id => 'id_show_realtime'
%= check_box 'hidelowdelay' => 1, id => 'id_hidelowdelay'
%= check_box 'detailed' => 1, id => 'id_detailed'
%= check_box 'no_related' => 1, id => 'id_no_related'
%= check_box 'past' => 1, id => 'past'
%= check_box 'hide_opts' => 1, id => 'id_hide_opts'
%= l 'Nur Züge über'
%= text_field 'via', placeholder => l('Bahnhof 1, Bhf2, ... (oder regulärer Ausdruck)'), class => 'station'
%= l 'Gleise'
%= text_field 'platforms', placeholder => '1, 2, 5, ...'
%= l 'Ankunfts- oder Abfahrtszeit anzeigen?'
%= select_field admode => [[l('Abfahrt bevorzugen') => 'deparr'], [l('Nur Abfahrt') => 'dep'], [l('Nur Ankunft') => 'arr']]
Frontend
%= select_field mode => [ ['App' => 'app'], ['Infoscreen' => 'infoscreen'], ['Bahnhofstafel (legacy)' => 'multi'], ['Gleisanzeiger (legacy)' => 'single'] ]
%= submit_button l('Anzeigen')
% end
API
    % if (languages() =~ m{^en}) {
  • You're welcome to embed DBF departure boards as iframes or use them in full-screen browser setups. The App frontend works best for small screens, whereas the legacy Infoscreen mode is better suited for large displays.
  • A JSON IRIS API is avaliable via mode=json&version=3 (or just https://dbf.finalrewind.org/Station.json?version=3). Route elements may contain "isAdditional" and "isCancelled"; the rest should be self-explanatory. Please do not send more than 30 requests per minute and only one request per station per minute.
  • There is no JSON API for train details yet.
  • The optional limit parameter limits the number of returnd departures; e.g. limit=10 will result in no more than ten.
  • DBF is available as Open Source software (installation instructions). Please use your own installation for automated crawlers that request dozens of stations per minute.
  • % } % else {
  • DBF-Abfahrtstafeln können gerne als iframe eingebunden oder in fest installierten Vollbild-Browserfenstern verwendet werden. Für eine kleine Ansicht (z.B. iframe in einer normalen Website) empfiehlt sich das "App"-Frontend. Für eine große Ansicht (z.B. als alleinstehender Infoscreen) gibt es den "Infoscreen"-Modus.
  • Die Parameter mode=json&version=3 (alternativ https://dbf.finalrewind.org/Bahnhofsname.json?version=3) bieten ein JSON-IRIS-Interface. Die route-Elemente können zusätzlich die Felder "isAdditional" oder "isCancelled" enthalten, der Rest sollte selbsterklärend sein. Im Fehlerfall fehlt das "departures"-Element, stattdessen wird ein "error"-Element mit Fehlermeldung zurückgegeben. Bitte maximal 30 Anfragen pro Minute und insbesondere nur eine Anfrage pro Station und Minute – eine höhere Auflösung haben die Backenddaten ohnehin nicht.
  • Ein JSON-Interface für Zugdetails ist in Arbeit.
  • Mit limit kann die Anzahl der angezeigten / im JSON enthaltenen Abfahrten eingeschränkt werden, z.B. limit=10 für die ersten zehn.
  • Dieser Dienst ist Open Source-Software und kann leicht auf eigenen Servern installiert werden. Automatisierte Crawler, die mehrere Dutzend Stationen pro Minute abfragen, bitte nur auf eigenen Instanzen betreiben.
  • % }
Theme: dark · light · device theme
Language: DE · EN · system language
DBF v<%= stash('version') // '???' %> · <%= l 'Datenschutz' %> · <%= l 'Impressum' %>
% }