![]() |
Pan Transit
http://otsaloma.io/pub/pan-transit.png
Pan Transit is an application for Sailfish OS to view departures from public transport stops. It is designed to support multiple different providers (i.e. cities/regions). Currently supported are Helsinki Region Transport (HSL), Finnish Transport Agency, Transport for London and ASEAG in Aachen, Germany. The dynamic plugin architecture should make it fairly easy for anyone with basic Python programming skills to add support for a new region. Providers only need to make API calls and transform that data to a format that Pan Transit understands and can display in its standard UI. Documentation is available at GitHub. Please note that I do not plan to write providers for different regions myself, but will review and accept contributions from the community. Also, moderate suggestions to generalise the UI will be considered, but for very particular use cases, you might still be better of writing your own stand-alone app. Download at OpenRepos or the Jolla store. Source code and issue tracker at GitHub. Translations at Transifex. Donations appreciated: paypal.me/otsaloma http://otsaloma.io/pub/pan-transit-1.png http://otsaloma.io/pub/pan-transit-2.png http://otsaloma.io/pub/pan-transit-3.png http://otsaloma.io/pub/pan-transit-4.png |
Re: Pan Transit
Dear otsaloma,
I am currently working on a provider for pan transit but have some issues with setting it up. As you wrote in the README on github, I debugged the code using on my PC using the python scripts (where it gives correct results, IMHO). However, after copying the files to "/home/nemo/.local/share/harbour-pan-transit/providers" and selecting the new provider in the settings the search is not given results. Is there a way to debug this from within the app or making it more verbose? What steps would you recommend? Thanks! Edit: I now found out that I need to start pan transit via "/usr/bin/sailfish-qml harbour-pan-transit" which gives me the python output. Now, I could fix one bug such that I can now search for stops, but whenever I want to see the departures of that stop none are listed (I made my python script a little bit verbose and can see that data exists). Is there a way to make pan transit more verbose to see whats going on there? Edit2: I created a fork (sorry for the horrible code and the fact that it currently needs python3-requests). I would be very glad if you could have a look at it. |
Re: Pan Transit
Quote:
Requests is not cool indeed, but for testing, what's the easiest way for me to get requests on the device? |
Re: Pan Transit
Sorry that I forgot so important information, please search e.g. for "Uniklinik" or "Bushof".
|
Re: Pan Transit
Divide the times by 1000. The ones returned by the API seem to be milliseconds, we need seconds. I don't really know what exactly happens when you feed the formatting and filtering functions milliseconds, but correcting that seemed to fix it, I saw departures.
|
Re: Pan Transit
Quote:
For find_nearby I don't have an implementation because I don't know how to get it from the API. Would it be possible to remove this option depending on the selected provider ? |
Re: Pan Transit
I am currently trying to get rid of request but I'm (again) struggling with pan.http.post et. al.
The current requests code looks like (in find_departures): Quote:
Quote:
Quote:
and gives (for provider.find_departures([100636]) ): Quote:
|
Re: Pan Transit
Quote:
Quote:
Quote:
https://developer.mozilla.org/en-US/...b/HTTP/Methods What you likely want is Code:
# For API endpoints that return JSON: https://github.com/otsaloma/pan-tran...oviders/tfl.py |
Re: Pan Transit
Are you planning to support routing / journey planning also within pan transit?
|
Re: Pan Transit
Quote:
https://github.com/otsaloma/poor-map...master/routers |
All times are GMT. The time now is 22:05. |
vBulletin® Version 3.8.8