Giter VIP home page Giter VIP logo

fahrplanagent's Introduction

Fahrplan-Agent

Fahrplan-Agent: Benachrichtigungen für DB Fahrplanänderungen

Mein Fahrplan-Agent ist ein Skript, das ich geschrieben habe weil mich die DB Streckenagent-App nur über Verspätungen und nicht über Änderungen des Fahrplans informiert.

Der Fahrplan-Agent verwendet die DB API Fahrplan-API um den Fahrplan für einen Tag abzufragen und mit den "normalen" Daten für gegebene verbindungen zu vergleichen. Änderungen gegenüber dem Normal-Fahrplan werden so erkannt und können als E-Mail-Benachrichtigung verschickt werden. Ich habe den Fahrplan-Agent als Cronjob angelegt, der für mich jeden Abend die Fahrplan-Ânderungen am nächsten Tag abfragt und mich benachrichtigt.

Abgefragt werden:

  • Änderung der Abfahrtszeit
  • Änderung der Ankunftszeit
  • Änderung des Abfahrtsgleises
  • Ausfall des Halts am Zielbahnhof
  • Ausfall des gesamten Zugs

Verwendung

In fahrplanagent-mailer.py

  • in trains die gewünschten Verbindungen anlegen
  • ggf. in mailto eine E-Mail-Adresse angeben (ohne E-Mail-Adresse wird das Ergebnis direkt ausgegeben)

Um die API zu verwenden, ist eine Registrierung (Client ID und Client Secret) erforderlich. Die Client ID kann in einer Datei fahrplanapi-client-id.txt, das Client Secret in einer Datei fahrplanapi-client-ecret.txt hinterlegt werden im Verzeichnis des Skripts hinterlegt werden und wird dann verwendet.

E-Mail-Versand erfolgt über Aufruf von mail und wird nur unter Linux u.ä. mit konfiguriertem Mail-System funktionieren.

fahrplanagent's People

Contributors

chjacob avatar chjacob-tubs avatar

fahrplanagent's Issues

/arrivalBoard{id} and /departureBoard/{id] seem to be broken. Could you verify this?

I have a similar interface like yours, but I am not able to fetch departure data from the DB API any longer.

/location/{name} still works but /arrivalBoard{id} and /departureBoard/{id} seem to be broken.
When I use them I always get

Response Body
[]

Response Code
200 

so it is successful but empty.

I get the same response when I use the API Konsole on https://developer.deutschebahn.com/store/apis/info?name=Fahrplan-Free&version=v1&provider=DBOpenData

Could you please verify this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.