PublicTransport

Plasma 4 Widgets

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

60
7.8
Description:

This is a Plasma data engine, applet and runner for public transport timetable data. The applet shows a departure/arrival board for a given stop. It can also show journeys to or from the given "home stop". It displays additional information like delays, news about journeys, routes, vehicle types (with icons). Timetable data is available for trams, buses, subway, trains, ferries and planes (using flightstats.com). You can set alarms for departures and filter departures (by type of vehicle, target/origin, delay, transport line string/number, intermediate stops). Filters can also be combined.
Timetable data gets received from provider plugins. Since version 0.11 there are two types of plugins: GTFS and script providers. Script providers need a network connection and can be used to read timetable data from any document type, eg. XML, binary or HTML. GTFS providers only need to import the GTFS feed once and can then be used offline (but a network connection can be used for GTFS-realtime).

My Blog: http://fpuelz-kde.blogspot.com/
PublicTransport on UserBase: http://userbase.kde.org/Plasma/Public_Transport
PublicTransport on KDE projects: https://projects.kde.org/projects/playground/base/publictransport
PublicTransport on ohloh.net: https://www.ohloh.net/p/publicTransport

You can donate me ;)

News
17.01.2013: Version 0.11 beta released
30.12.2012: Version 0.11 alpha 2 released
04.12.2012: Version 0.11 alpha released

Installation
To install PublicTransport download a package for your distribution. If there is no such package you can ask the appropriate packagers for your distribution to create one. Please leave a comment if a new package is created or if you use a package not mentioned in the download list here, so that I can add it.
If you want to install PublicTransport, but there are no packages available for you (yet?) or you want to try the newest version with no new package yet, you can use the installer script (install.sh) included in the Sources download.
But note that software installed with that installer script isn't managed by your package manager in any way and may produce conflicts with installed packages, eg. if PublicTransport is already installed via the package manager. The script should be quite easy to use and also lets you uninstall the software again. You need GIT to use the installer, because the sources are actually downloaded using GIT by the script (from git://anongit.kde.org/publictransport).

There's also a script for packagers, that can download tarballs for all PublicTransport components for a specific version.
You can clone the GIT repository from git://anongit.kde.org/publictransport (read only), which also clones all history. From your local clone of the repository you can checkout all tagged versions (see the HINTS_FOR_PACKAGE_MAINTAINERS file).
If you want to contribute code, you need a KDE account and you can clone the repository with SSH from this URL: git@git.kde.org:publictransport (read + write). You can of course also send me patches via email.

Note: The Sources tarball does not contain the sources, but a script to download them from it's GIT repository and the translations from KDE's SVN. The script asks for the version to compile and install.

Adding a Service Provider Plugin
- Install TimetableMate, maybe not included in the packages, but in the source archive.
- The filenames start with the country code, followed by "_" and an abbreviation of the service provider, e.g. "ch_sbb" for switzerland, service provider "SBB".
- You can test your script and the URLs with TimetableMate. It also offers syntax completion with documentation and templates for the parser functions, that get called by the data engine.
- Also works for GTFS providers
- After installation of your plugin you can open the configuration dialog of the public transport applet and the new provider should be in there.
- You can also open/edit existing providers by simply clicking "Open in TimetableMate..." in the provider data dialog (accessible from the configuration dialog).
- Checkout the documentation of the data engine, it contains much information about the data sources of the engine and how to create new provider plugins.

You are welcome to optimize the scripts in the existing providers in the "serviceProviders" directory in the data engine source directory.

Comments are appreciated.
Last changelog:

6 years ago

17.01.2013:
(version 0.11 beta)
Many crash/bug fixes, visual polishing, see http://fpuelz-kde.blogspot.de/. (The install.sh script is actually unchanged, just select the new version)

30.12.2012:
(version 0.11 alpha 2)
Providers are now hosted on openDesktop.org, download via GHNS, many fixes etc. See http://fpuelz-kde.blogspot.de/. (The install.sh script is actually unchanged, just select the new version)

04.12.2012:
(version 0.11 alpha)
Many improvements, new features, GTFS support, etc. See http://fpuelz-kde.blogspot.de/.
Update: Improved install script, automatically select latest version for installation, show available versions sorted by date, allow switching to another version when starting the script again with the repository already cloned
Update 2: Allow selecting git HEAD for installation again (the script shows Current_Development_Version for it), HEAD contains a fix for building with GTFS support but without protocol buffers installed

18.10.2011:
(version 0.10 RC2)
Applet:
- Fix link errors
- Fix memory leaks
- Fix applet collapsing to popup icon in desktop
- Drawing performance improvements
- Use of KPixmapCache for vehicle type icons
- New monochrome icons, shown in the popup icon
- Add possibility to put the applet into the notification area
- Better layout adjustments for small sizes
- Change applet tooltip according to current departure group in popup icon
- Shorter alarm names, alarm names in notifications
- Nicer alarm background
- Fix color groups and route time display for arrivals
TimetableMate:
- Fix for missing KWebKitPart include file, it now uses KWebView directly
Library:
- Fix a crash with GraphicalTimetableLine (missing null pointer check)

Naraku

7 years ago

With KDE 4.7.2 and the RC2 I still have a compilation error:


In file included from /opt/Public Transport/publictransport/applet/build/../settings.h:29:0,
from /opt/Public Transport/publictransport/applet/build/../departuremodel.h:27,
from /opt/Public Transport/publictransport/applet/build/moc_departuremodel.cpp:10,
from /opt/Public Transport/publictransport/applet/build/plasma_applet_publictransport_automoc.cpp:5:
/opt/Public Transport/publictransport/applet/build/ui_publicTransportFilterConfig.h:29:49: schwerwiegender Fehler: publictransporthelper/checkcombobox.h: Datei oder Verzeichnis nicht gefunden
Kompilierung beendet.
make[2]: *** [CMakeFiles/plasma_applet_publictransport.dir/plasma_applet_publictransport_automoc.o] Fehler 1
make[1]: *** [CMakeFiles/plasma_applet_publictransport.dir/all] Fehler 2
make: *** [all] Fehler 2

Report

C

fpuelz

7 years ago

That's because you didn't install "libpublictransporthelper" before compiling the applet.
I'm trying to find out how to get it compiling without having the library installed. Until then, first install the library, then everything else. The install script does it automatically.

Report

Naraku

7 years ago

Thanks for your answer. But I used the install script and according to the progress bar the helper library is compiled first.

Report

C

fpuelz

7 years ago

Hm.. after compilation of the library you should be asked for your root password, for the installation. Did you enter the password before the applet compilation started?
What distribution are you using? By default the script uses sudo for the installation. Maybe it helps to use su instead.

Report

Naraku

7 years ago

I use Fedora 15 (no sudo). I started the script with -s to use su, but during the installation process i didn't had to enter my root password. So the library was compiled, but not installed, I guess.

Report

C

fpuelz

7 years ago

Ok, another updated script. This time with "su for localization.sh" and install.sh passes the -s argument to localization.sh.

Report

C

fpuelz

7 years ago

Oh sorry, I forgot to add the "-s" to the list of available options (only checked if "-s" is used). This time it should work ;)

Report

Naraku

7 years ago

For the localization it still uses sudo. I used the new version of both scripts und -s. Even when I start localization.sh -s directly it uses sudo.

Report

C

fpuelz

7 years ago

I updated the script, please download & try again

Report

Naraku

7 years ago

Thanks. I am now asked for the root password and the intallation works. But when installing language files I am asked for the sudo password of the current user, although I used -s for the install script.

Report

C

fpuelz

7 years ago

I think I found out what was wrong with the install script (if "su" is used).
It missed double quotes around the command to be executed as root, ie. su -c "command word2".
Should work with the next version.

Report

buschmann23

7 years ago

I am using version 0.10 RC 2 with KDE 4.7.2 on openSUSE 11.4. The plasmoid is on my desktop in full view, but after a restart there is only the icon in the plasmoid area.

Screenshot:
http://i.imgur.com/ifGgK.png

Report

C

fpuelz

7 years ago

Thanks for the info, the bug was already reported to me and is now fixed in GIT master.

Report

fixu

7 years ago

Hi,

how can i help you test the journey function? If I could help you by putting a xml file somewhere or whatever just tell me. Thanks for your great plasmoid, it is getting nicer by every release!

cheers

felix

Report

C

fpuelz

7 years ago

Great to hear, thanks :)

And I now have a fix for the ch_sbb journey function! I needed to update the parsing script for journeys, here is the updated version of ch_sbb.js: http://pastebin.com/DsyNavAV.
Please try it out, if there are any bugs let me know. You need to replace the existing ch_sbb.js with the updated version, it is in /usr/share/kde4/apps/plasma_engine_publictransport/accessorInfos/ or a similarly named directory. You can also add the new script to ~/.kde/share/apps/plasma_engine_publictransport/accessorInfos/. Files in the home directory are used instead of the global ones.

To get more information about script errors like this, you can have a look at the accessor error log file: ~/.kde/share/apps/plasma_engine_publictransport/accessors.log. The scripts will print (hopefully) meaningful error messages there with the HTML where parsing failed.
The error message of the script tells us where in the script the error happened. The HTML code can then be used to check if the script tries to find strings that are not existent in the HTML code (any longer). Sometimes only little changes like an added attribute to an HTML element will break scripts, but they try to be tolerant for changes.

In the updated script for ch_sbb I changed the code that finds the journey result table and made it more tolerant for future changes. The journey details tables also needed to be changed. And some other updates.

You can also use TimetableMate to check scripts, it may give some helpful information on errors.

Report

TheBlackCat

7 years ago

I like the more modular structure. Would it be possible to make a top-level CmakeLists.txt file that would allow people to build everything in one step rather than needing to install the library before compiling the rest? The way it is now makes it a lot harder to make packages.

Report

C

fpuelz

7 years ago

I have such a CMakeLists.txt here http://pastebin.com/Vp3MRd47. I've written it some time ago, it accepts options to select components to be compiled (see contents).
But the library still needs to be installed first, because it's needed for the linker for the other components. The solution would be to use the not installed binaries of the library to link the components with the library. That should work, but I need to figure out how that works.

Report

C

fpuelz

7 years ago

Hm.. There is an "EXPORT" CMake command which I've been trying to use. But the headers of the library aren't found if they aren't installed.
I don't know if it's possible to use the headers of the library from it's build tree somehow. If I simply include the source directory of the library the headers aren't found because they are included with the prefix <publictransporthelper/...h>. And there may be conflicting file names.

Maybe someone with more experience in CMake can help?
- I want to link "libpublictransporthelper" from other components and make the headers available as mentioned above, without installing the library.

Report

TheBlackCat

7 years ago

You should see what calligra and kde-workspace do, for example. They have separate lib directories but you are still able to build the entire tree at once.

Report

C

fpuelz

7 years ago

One more thing: Are trying to package everything into one package? Then it may be easier to create a separate package for the library? You could also include the engine into that library-package and make the rest dependent on that package.

So there should be at least two packages:
- One for the library (and maybe the data engine, because it's also needed by all other components)
- One or more for the rest (applets, runner, timetablemate, ...), dependend on the first package

Does this make it easier?
The library still has to be installed to compile stuff for the "second package(s)". Isn't it always like this?

Report

TheBlackCat

7 years ago

"Isn't it always like this?"

Usually in cases where the library and other components live in the same tree, the library and other components can be built in one go. Then the libraries are split up from the other files using sub-packages after the build is complete. I am pretty sure both RPMs and DEB files support build multiple packages from a single package description file (I know RPMs can).

The advantage of this is you can have clean separation of the shared library and non-library rpms or debs while only needing a single tarball, a single package description file, and a single build.

The same is true of localization files. These are almost always built with the rest of the software and then split off using automated scripts that search for the language files, tag them with the appropriate language data so users can find them, and put them where they need to go (either in the main package or in their own package, depending on how big they are). This is one of only two pieces of software I know of that expect users to download, tar, and build the language files separately.

So as it is now, it is very difficult to package. The stuff that you are having packagers do by hand is usually done automatically after the build using package description files.

For most package you just drop in a tarball, change the version number, then start the build. With this package you have to manually do multiple individual steps using a GUI interface. That make it easier for users at home building for themselves, but much harder for packagers. If you would like I could provide a spec file to show you how, at least for RPMs, software like this is usually structured.

In my case it is even more difficult because I am using open build service, which can be set up to automatically download the latest git snapshot, update the version numbering, build the package, and publish it with a single button press. This is ideally-suited to software like yours where the master git branch is always stable. But because of how the package is structured, this is impossible. Especially with how the language files are divided up in separate directory trees that all have to be downloaded separately, it is impossible to automate the build process. Currently I am just not building the language files.

Report

C

fpuelz

7 years ago

Hi, thanks for the insight, I really don't know much about packaging.

I just added a global CMakeLists.txt in git master, which works, compiles everything without having to install the library first :) Some other little changes were necessary for this. Calligra was a good example.
I also turned off the unit tests by default.

But I think I cannot do much about the localization files for now. Maybe it gets easier if PublicTransport leaves playground?

Report

TheBlackCat

7 years ago

I think I have figured out why the build error occurs. Whenever I run make with -j2 or higher, I get the missing file error. If I run it with just make, or make -j1, the error doesn't occur.

Report

C

fpuelz

7 years ago

The missing file for the runner should be generated.. Maybe it helps to clean the build directory and retry compiling?

The language files are in /trunk/l10n-kde4/<CountryCode>/messages/playground-base/. There are libpublictransporthelper.po, plasma_runner_publictransport.po, plasma_applet_publictransport.po, plasma_engine_publictransport.po, plasma_applet_flights.po, plasma_applet_graphicaltimetableline.po, timetablemate.po. They are mixed in the directory with other language files for playground, but it's always those files currently.

Report

TheBlackCat

7 years ago

Thanks, the Cmakelists.txt file works great. I am getting what I think is an unrelated build error, though:

In file included from /usr/src/packages/BUILD/publictransport-1319422801/runner/publictransportrunner.h:26:0,
from /usr/src/packages/BUILD/publictransport-1319422801/runner/publictransportrunner.cpp:20:
/usr/src/packages/BUILD/publictransport-1319422801/runner/config/publictransportrunner_config.h:24:44: fatal error: ui_publicTransportRunnerConfig.h: No such file or directory
compilation terminated.

As for translations, I am not sure. Even if the language files were just in their own svn or git directory it would help a lot.

Report

6 years ago

17.01.2013:
(version 0.11 beta)
Many crash/bug fixes, visual polishing, see http://fpuelz-kde.blogspot.de/. (The install.sh script is actually unchanged, just select the new version)

30.12.2012:
(version 0.11 alpha 2)
Providers are now hosted on openDesktop.org, download via GHNS, many fixes etc. See http://fpuelz-kde.blogspot.de/. (The install.sh script is actually unchanged, just select the new version)

04.12.2012:
(version 0.11 alpha)
Many improvements, new features, GTFS support, etc. See http://fpuelz-kde.blogspot.de/.
Update: Improved install script, automatically select latest version for installation, show available versions sorted by date, allow switching to another version when starting the script again with the repository already cloned
Update 2: Allow selecting git HEAD for installation again (the script shows Current_Development_Version for it), HEAD contains a fix for building with GTFS support but without protocol buffers installed

18.10.2011:
(version 0.10 RC2)
Applet:
- Fix link errors
- Fix memory leaks
- Fix applet collapsing to popup icon in desktop
- Drawing performance improvements
- Use of KPixmapCache for vehicle type icons
- New monochrome icons, shown in the popup icon
- Add possibility to put the applet into the notification area
- Better layout adjustments for small sizes
- Change applet tooltip according to current departure group in popup icon
- Shorter alarm names, alarm names in notifications
- Nicer alarm background
- Fix color groups and route time display for arrivals
TimetableMate:
- Fix for missing KWebKitPart include file, it now uses KWebView directly
Library:
- Fix a crash with GraphicalTimetableLine (missing null pointer check)

12345678910
141
product-maker mirkogennari Jan 15 2017 8 great
product-maker matafleur Apr 08 2015 8 great
product-maker Soru Jun 07 2014 8 great
product-maker MatthiasM Mar 18 2013 8 great
product-maker lei00 Feb 25 2013 8 great
product-maker meyerm Oct 12 2012 8 great
product-maker djselbeck Dec 30 2011 8 great
product-maker vortex375 Nov 12 2011 8 great
product-maker Rando25 Nov 10 2011 8 great
product-maker Eol Nov 07 2011 8 great
product-maker nikore90 Oct 18 2011 8 great
product-maker warrob Sep 15 2011 8 great
product-maker quippini Aug 11 2011 8 great
product-maker jenzuslongus Jul 29 2011 8 great
product-maker tobaj Jul 22 2011 8 great
product-maker thrawn Jul 10 2011 8 great
product-maker mschu Mar 30 2011 8 great
product-maker Vistausss Mar 27 2011 8 great
product-maker Genserowski Mar 26 2011 8 great
product-maker roadracer Mar 11 2011 8 great
product-maker terwarf Mar 09 2011 8 great
product-maker FollowByWhiteRabbit Mar 04 2011 8 great
product-maker FraSMOG Mar 04 2011 8 great
product-maker terrorbaby92 Mar 03 2011 8 great
product-maker vkmaheshbhat Feb 28 2011 8 great
product-maker misiakdurko Feb 27 2011 8 great
product-maker FSchulz Feb 26 2011 8 great
product-maker nsaibot Feb 17 2011 8 great
product-maker Vzlom Feb 16 2011 8 great
product-maker nisavid Feb 12 2011 8 great
product-maker flanello Feb 06 2011 8 great
product-maker kovariadam Feb 06 2011 8 great
product-maker momonster Feb 06 2011 8 great
product-maker Weaselweb Feb 05 2011 8 great
product-maker Ireyon Feb 02 2011 8 great
product-maker vitoubien Feb 01 2011 3 bad
product-maker Finswimmer Jan 30 2011 8 great
product-maker EliasP Jan 19 2011 8 great
product-maker fixu Dec 16 2010 8 great
product-maker PyroLinux Nov 08 2010 8 great
product-maker thecrazyzorro Oct 30 2010 8 great
product-maker Dieter-MZ Oct 06 2010 8 great
product-maker Count:157 Rating: 7.80

simgunz

Sep 29 2014

vortex375

Nov 12 2011

hoderlump

Nov 05 2011

tobaj

Oct 18 2011

jenzuslongus

Aug 03 2011

dyn0saur

Jun 03 2011

Naraku

Apr 16 2011

m00nraker

Mar 22 2011

terwarf

Mar 09 2011

nsaibot

Feb 16 2011

flanello

Feb 06 2011

rgreinhofer

Feb 04 2011

EliasP

Jan 19 2011

thecrazyzorro

Oct 30 2010

eikel

Jul 29 2010

rickdesantis

Jun 13 2010

thomasjfedora

May 24 2010

elric80

May 13 2010

sadiqhuq

Apr 06 2010

Rerghar

Mar 30 2010

balevas01

Mar 19 2010

poelzi

Feb 25 2010

lordlukas

Feb 16 2010

dtritscher

Feb 14 2010

H1bakusha

Feb 10 2010

msledziona

Feb 07 2010

Bottom-Egg

Feb 05 2010

nicodietrich

Jan 21 2010

knilch

Jan 20 2010

markum

Jan 02 2010

smihael

Dec 30 2009

Kummerpaule

Sep 29 2009

dixiecko

Aug 14 2009

weatherman

Aug 09 2009

JanMalte

Aug 09 2009

Hantilles

Aug 05 2009

kovariadam

Jul 29 2009

lokdp

Jul 28 2009

EinfachToll

Jul 28 2009

AndiBauer

Jul 26 2009

takanowaka

Jul 25 2009

poppei82

Jul 18 2009

frankbrian25

Jul 13 2009

alvanx

Jul 10 2009

Boccaccio

Jul 05 2009

Podstavsky

Jul 03 2009

painkiller101

Jun 26 2009

vejha

Jun 23 2009

buschmann23

Jun 19 2009

gravy

Jun 18 2009

pano

Jun 18 2009

k3ks

Jun 17 2009

Finswimmer

Jun 17 2009

Frank

Jun 16 2009

dejazmach

Jun 16 2009

jalpaka

Jun 15 2009

radecz3k

Jun 15 2009

Vistausss

Jun 14 2009

ZdadrDeM

Jun 13 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
0.11 beta
updated Jan 17 2013
added Jun 03 2009
downloads today
0
page views today 17