% if ($self->stash('refresh_interval')) { % } % my $av = 'v98'; # 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')) {
Mehrdeutige Eingabe. Bitte eine Station aus der Liste auswählen
% }
%= content
% if (not stash('hide_opts')) {
%= form_for _redirect => begin %= hidden_field hafas => param('hafas')
Zug / Station
% if (stash('stationlist')) { %= select_field input => stash('stationlist') % } % elsif (stash('input')) { %= text_field 'input', class => 'station', placeholder => 'Zug, Stationsname oder Ril100-Kürzel', id => 'stationinput' % } % else { %= text_field 'input', class => 'station', placeholder => 'Zug, Stationsname oder Ril100-Kürzel', id => 'stationinput', autofocus => 'autofocus' % }
%= submit_button 'Abfahrtstafel'
% if (stash('input')) { % }
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'
Nur Züge über
%= text_field 'via', placeholder => 'Bahnhof 1, Bhf2, ... (oder regulärer Ausdruck)', class => 'station'
Gleise
%= text_field 'platforms', placeholder => '1, 2, 5, ...'
Ankunfts- oder Abfahrtszeit anzeigen?
%= select_field admode => [['Abfahrt bevorzugen' => 'deparr'], ['Nur Abfahrt' => 'dep'], ['Nur Ankunft' => 'arr']]
Frontend
%= select_field mode => [ ['App' => 'app'], ['Infoscreen' => 'infoscreen'], ['Bahnhofstafel (legacy)' => 'multi'], ['Gleisanzeiger (legacy)' => 'single'] ]
%= submit_button 'Anzeigen'
% end
API
    % if (0) {
  • 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.
  • The departure board supports names, EVA IDs, and (in IRIS mode) DS100/Ril100 codes as station identifiers.
  • Requests for train details can optionally be suffixed with the DD.MM.[YYYY] date of the requested trip, e.g. "ICE 921 (1.1.)" or "ICE 921 @ 1.1.". The date refers to the scheduled departure at the train's origin station.
  • 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 Abfahrtstafel unterstützt Namen, EVA-IDs, und (im IRIS-Backend) DS100/Ril100-Codes zur Identifikation von Stationen.
  • Zugdetails können optional für spezifische Abfahrtsdaten im DD.MM.[YYYY]-Format abgefragt werden, z.B. "ICE 921 (1.1.)" oder "ICE 921 @ 1.1.". Das Datum bezieht sich auf die geplante Abfahrtszeit am Startbahnhof der Zugfahrt.
  • 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.
  • % }
Farbschema: light · dunkel · automatisch
DBF v<%= stash('version') // '???' %> · Datenschutz · Impressum
% }