
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
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.
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)
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
Report
fpuelz
8 years ago
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
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 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
Report
fpuelz
8 years ago
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
Report
EliasP
8 years ago
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
fpuelz
8 years ago
- 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
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
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
Report
buschmann23
8 years ago
Report
fpuelz
8 years ago
Report
buschmann23
8 years ago
Here is my output:
http://paste.opensuse.org/31083204
Report
fpuelz
8 years ago
Report
fpuelz
8 years ago
Report
Finswimmer
8 years ago
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
---
[ 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
fpuelz
8 years ago
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
thanks for the attention!
Report
Finswimmer
8 years ago
Tobi
Report
Finswimmer
8 years ago
Please try it again
Report
nisavid
8 years ago
Report
Finswimmer
8 years ago
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