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)

buschmann23

8 years ago

In order to build version 0.10 libpublictransporthelper has to be installed. So it would be nice, to have it in an extra source tarball. With the current monolithic tarball I have to use the whole thing for both. library and widgets/engines.

Report

C

fpuelz

8 years ago

Hm.. I could put multiple source tarballs in one archive here. The installer script would then also be clearly separated from the sources.
But the component directories just need to be compressed into a tarball to have a source tarball for that component.

Another option would be to create source tarballs for everything and upload them to some other server (I can only upload one file here).
Or I could move everything to a git repository and create branches for the releases. Would that be a good option for you as packager?

The data engine and the library could be put together in one package, then one package for each applet and the runner. And one extra package for timetablemate. I thought, packagers just could divide the sources into multiple packages as they like.

Report

buschmann23

8 years ago

Yes, sure it can be seperated in multiple packages. And that is exactly what I am doing. :) But I have to create separate package for libpublictransporthelper because the lib is needed at compilation time for the rest. So the library package has to be installed first. :)

It's only a matter of tarball size. Currently I am using the same tarball for both packages. :)

According to openSUSE package guidelines I can not put the lib together with the engines in one package.

So, in the end it's only a question of source rpm size. Not really important. :)

The install script is not necessary for packagers.

Report

cmlr

8 years ago

I'm the package maintainer for Arch Linux, and at first I had some trouble with the current version. However, eventually I also hit on the idea of making 2 packages, and now Arch has a clean installation. Except that I don't include timetablemate.

I don't share the complaint about the installer, since I used it to create the package script. For instance, I carried over the use of wildcards *, so the package script doesn't have to include version numbers for the individual pieces.

Report

cmlr

8 years ago

Perhaps along with a README file you could include a HINTS_FOR_PACKAGE_MAINTAINERS file, since some of us are slow on the uptake. :)

Report

C

fpuelz

8 years ago

@cmlr: There's now a HINTS_FOR_PACKAGE_MAINTAINERS file :) Hopefully informative enough.
I also added CHANGELOG files for all components.

@buschmann23: Can't you just create tarballs from the source directories instead of using the one with everything in it? Is the installer script also in the source RPMs? But not too important, yes, only a few KB ;)

Report

buschmann23

8 years ago

@fpuelz Mea culpa. :) Sure, that is the right idea. :)

Report

EliasP

8 years ago

There are several issues when it comes to the packaging of public transport, which make the life of distribution packages just way more complicated than necessary:

No component separator is used for 'beta' in the version string. Please use 0.10_beta3 instead of '0.10beta3'.
The toplevel directory's name is different from the package name. Please just use the plain package name (publictransport) or the full package name (publictransport-0.10_beta3) for the toplevel directory and don't append "random" strings like timetablemate-0.2.2 to it.
Do not ship your custom installer. Concentrate on the development of the application itself and let distribution packagers do this. Shipping installer scripts like your install.sh introduce several dangerous things because they bypass the native package manager and endanger system consistency:
- package manager controlled files might get overwritten
- the package manager might overwrite files installed by the script
- upgrade/uninstallation of files provided by the installer is not handled in any way
- outdated files are never cleaned up, resulting in a bunch of stale files in the system over time
- when shared-objects are installed, they lead to dynamic-linking inconsistencies on distributions which allow so called "impure" package building from source (All RPM + DEB based ones, Arch, Gentoo, ...)


Such installer scripts might seem to be an easy way for beginners to get such an package up and running quickly on their system, but in the long term they cause more work & pain than they solve due to the reasons listed above and some more.

Just stumbled upon this issues while updating the Gentoo ebuild for this package which is still on version 0.6.10 in Gentoo's KDE overlay, probably also due to some of the reasons listed above.

Report

C

fpuelz

8 years ago

Hi

- Ok: New version string (in the tarball name) :)

- Ok: I won't add strings like "timetablemate" to the toplevel directory name. But it's not meant to be packaged into one big package. You can think of it like multiple source packages in one tarball: There are eg. two data engines and three applets. Not everyone will want all? At least timetablemate should get it's own package, as it's only used to help when adding support for new service providers. Hm.. and package names change between distros, don't they? I added a HINTS_FOR_PACKAGE_MAINTAINERS file to the source tarball, which explains the directories and how the components depend on each other.

- The installer stays, but I added a warning message before it starts: "Prefer packages, remember uninstallation of an old version, ..". It only helps getting the compilation and installation right. Without it a user that wants just to do that might get it wrong (eg. wrong installation prefix, although there're also INSTALL files) or maybe has no idea how to uninstall it at all.. Ah, the installer has an uninstall option, don't know since when (but of course it has to be run manually with the installer). I agree that packages are a much nicer way to install the software. So it's there for users with a distribution without publictransport packages or users that absolutely want to try out the newest version, when there's no new package already. Another thing I might add to the warning message: "Don't install in parallel with PublicTransport installed from the package manager".
(I created the installer to learn a little bit of bash scripting, but it also helps me to ensure, that everything builds fine in the source package)

Report

Finswimmer

8 years ago

@EliasP:

I have already made an ebuild for Gentoo.
And yes, you are right. It is a little pain to get it work...

Tobi

Report

buschmann23

8 years ago

When I try to build it on Fedora 14 (KDE SC 4.5.2 and Qt 4.7.0), I get the following error during build. Because I am new to fedora packaging, I don't know, if this is a Fedora problem or a problem with Public Transport. :)

Quote:
/usr/bin/c++ -O2 -g -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -Wl,--enable-new-dtags CMakeFiles/timetablemate.dir/timetablemate_automoc.o CMakeFiles/timetablemate.dir/timetablemate.o CMakeFiles/timetablemate.dir/main.o CMakeFiles/timetablemate.dir/timetablemateview.o CMakeFiles/timetablemate.dir/publictransportpreview.o CMakeFiles/timetablemate.dir/accessorinfoxmlreader.o CMakeFiles/timetablemate.dir/javascriptcompletionmodel.o CMakeFiles/timetablemate.dir/javascriptmodel.o CMakeFiles/timetablemate.dir/javascriptparser.o CMakeFiles/timetablemate.dir/scripting.o CMakeFiles/timetablemate.dir/settings.o -o timetablemate -rdynamic -L/usr/lib64/kde4/devel /usr/lib64/libkdeui.so.5.5.0 /usr/lib64/libkparts.so.4.5.0 /usr/lib64/libplasma.so.3.0.0 /usr/lib64/libktexteditor.so.4.5.0 /usr/lib64/libkrosscore.so.4.5.0 -lkwebkit /usr/lib64/libkparts.so.4.5.0 /usr/lib64/libkio.so.5.5.0 /usr/lib64/libQtNetwork.so /usr/lib64/libnepomuk.so.4.5.0 -lsoprano /usr/lib64/libkdeui.so.5.5.0 /usr/lib64/libQtSvg.so /usr/lib64/libQtGui.so /usr/lib64/libkdecore.so.5.5.0 /usr/lib64/libQtCore.so -lpthread /usr/lib64/libQtDBus.so /usr/lib64/libQtScript.so /usr/lib64/libQtXml.so -Wl,-rpath,/usr/lib64/kde4/devel:
/usr/bin/ld: CMakeFiles/timetablemate.dir/timetablemate.o: undefined reference to symbol 'QWebSettings::setAttribute(QWebSettings::WebAttribute, bool)'
/usr/bin/ld: note: 'QWebSettings::setAttribute(QWebSettings::WebAttribute, bool)' is defined in DSO /usr/lib64/libQtWebKit.so.4 so try adding it to the linker command line
/usr/lib64/libQtWebKit.so.4: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Report

buschmann23

8 years ago

I forgot to mention the used version of Public Transport. It is version 0.9, because I don't want to ship the beta right now.

Report

buschmann23

8 years ago

I now tried the 0.10 beta3 on Fedora 14, the error has gone, but Fedora 14 by default ships with KDE 4.5 and 0.10 needs KDE SC 4.6. :) So I will try it again when Fedora 15 hits the openSUSE Build Service.

Report

C

fpuelz

8 years ago

Does everything need KDE 4.6 or only timetablemate with KWebkitPart? I just removed some preprocessor switches for support of KDE 4.4 / Qt 4.5 ;) Seems, they were a bit outdated.

Report

buschmann23

8 years ago

Looks like the applet itself needs KDE SC 4.6.

Here is my output:
http://paste.opensuse.org/31083204

Report

C

fpuelz

8 years ago

Ah, the Plasma::Theme::View... colors are new.. I could replace them with some other colors for KDE < 4.6 quite easily. If there are no other errors it should then work again with 4.5.

Report

C

fpuelz

8 years ago

Ok, I tested it in a virtualized fedora 14 and Beta 5 builds on KDE 4.5 again :)

Report

Finswimmer

8 years ago

Hi,

I have two widgets with different stops and filters.
After many suspend2disk,suspend2ram and complete restart I have two widgets with the same stop and the same filters.

Is there a way how I can help you to debug this error?

Thank you

Report

nisavid

8 years ago

using the Gentoo ebuild for publictransport-0.10_beta2, i get the following build error every time:

---
[ 31%] Building CXX object plasma-runner-publictransport-0.1.1/CMakeFiles/kcm_krunner_publictransport.dir/kcm_krunner_publictransport_automoc.o
In file included from /var/tmp/portage/kde-misc/publictransport-0.10_beta2/work/publictransport-0.10_beta2_build/plasma-runner-publictransport-0.1.1/moc_publictransportrunner_config.cpp:10:0,
from /var/tmp/portage/kde-misc/publictransport-0.10_beta2/work/publictransport-0.10_beta2_build/plasma-runner-publictransport-0.1.1/kcm_krunner_publictransport_automoc.cpp:4:
/var/tmp/portage/kde-misc/publictransport-0.10_beta2/work/publictransport-0.10_beta2_build/plasma-runner-publictransport-0.1.1/../../publictransport-0.10beta2_timetablemate-0.2.2/plasma-runner-publictransport-0.1.1/config/publictransportrunner_config.h:25:46: fatal error: publictransporthelper/stopwidget.h: No such file or directory
compilation terminated.
---

i get a similar error if i copy and modify the ebuild for version 0.10_beta3 (which is very straightforward--just change the "beta2" in the ebuild to "beta3").

i tried building with MAKEOPTS="-j1" and without the Graphite loop optimization CFLAGS, but it didn't help.

here's my ``emerge --info``: http://nisavid.pastebin.com/F9K0Vnqy

Report

C

fpuelz

8 years ago

Looks like it doesn't find the library headers. The library must be installed for the other parts to be compilable.
I guess the library has to get it's own package and must be set as dependency for the others (applets, runners, TimetableMate).

Or it should link to the compiled but not installed version of the library. I'll think about that, should be a little change in the CMakeLists.txt files. But I think a separate package for the library (or library + data engine) would be better, and could then be used as dependency for the applets, the runner and TimetableMate.

Report

nisavid

8 years ago

yes, i think a separate library package makes sense too.

thanks for the attention!

Report

Finswimmer

8 years ago

Despite of the symlink problem mentioned on previous page beta3-ebuild is working now.

Tobi

Report

Finswimmer

8 years ago

@nisavid:
Please try it again

Report

nisavid

8 years ago

indeed, there is no build error with the new ebuild. thank you!

Report

Finswimmer

8 years ago

Hello,

I do not know if it is possible.
At the moment one can only say that the widget should show a special number of departures.
But if you filter you do not get 20 departures. Instead you get only two as these two are the only matching within the next 20 departures.
So...It would be nice to say that there should always be 10 departures wether they are filtered or not.
(I know that the widget then needs to fetch 20 departures, filter, check if there are enough departures remaining and, maybe, re-fetch more derpartures.

Thank you
Tobi

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 21