smurfy / fahrplan

QT Application for Public transportation
GNU General Public License v2.0
58 stars 33 forks source link

[resource request] Transport for London #243

Open Sandvich opened 8 years ago

Sandvich commented 8 years ago

Hi!

Right now Ubuntu Touch is missing any decent transport apps for London, and I think fahrplan could do a good job. The details of the API are on the TfL website here: https://tfl.gov.uk/info-for/open-data-users/data-feeds?intcmp=29422 I would, of course, be up for doing most of this myself, but for now I don't really know where to begin!

Thanks, Sanchit

leppa commented 8 years ago

I would, of course, be up for doing most of this myself, but for now I don't really know where to begin!

If you know C++, you can create a new parser yourself and submit a pull request.

For this, you need to subclass ParserAbstract (or ParserEfa/HafasXml/HafasBinary, which already implement parsing of some common data formats) and re-implement relevant virtual functions. Then add your new parser to FahrplanParserThread::run() and FahrplanBackendManager::getParserList().

Sandvich commented 8 years ago

This sounds complex but hopefully doable :3

leppa commented 8 years ago

I see that the API you mentioned supports JSON and XML. Parsing XML is a pain, so I'd suggest using JSON here. You can take a look at ParserNinetwo implementation, which also uses JSON-based backend.

Don't know how is it for @smurfy, but unfortunately, I don't have much time for side-projects ATM. But I'll try to help if you have some questions (or need a code review).

smurfy commented 8 years ago

I'm quite busy myself at the moment too.

Sandvich commented 8 years ago

Sounds good - I use JSON a lot at work, so I'm much more comfortable with that than XML.

balcy commented 6 years ago

Hi I wanted to say that I've written a backend for Transport for London based on api.tfl.gov.uk Station search (by name and GPS) and journeys (with various transport types) should be fine already. For the timetable I used the "Live arrivals" API. Therefore you cannot search for departures / arrivals at other times than the current time, and departures from terminal stations do not work. For other stations / bus stops departures and arrivals should be identical. What I'm not sure about is if all platform support unicode symbols for bus stops (🚏) or underground (🚇), because I only could test it on Ubuntu touch I can send a PR for that.

balcy commented 6 years ago

https://github.com/smurfy/fahrplan/pull/268

balcy commented 6 years ago

@dayrover, @smurfy I would like to make TFL available on Ubuntu touch.

balcy commented 6 years ago

The feature is now available for Ubuntu Touch: https://open-store.io/app/openstore.fahrplan2 @dayrover thanks for uploading.