Plasma’s Publictransport applet’s porting status

You might remember that I spoke about Plasma’s Publictransport applet getting some reworking during the summer. It’s been over a month since I made that announcement on my blog and while ideally, I’d have liked to have blogged every week about my work, I haven’t really been able to. This is largely down to the fact that I was occupied with work on a project back at my university and I shifted back to home from my hostel as well, after finishing four years of undergraduate studies.

Nevertheless, in the little time that I did have at my disposal, I’ve been able to make some progress indeed and with around a month remaining, I hope to get down to reworking the UI of applets – which admittedly is the most challenging part of the project, as soon as possible.

Here’s what has been done so far,

  • Publictransport engine ported to use KF5::ThreadWeaver
  • Publictransport dataengine is now visible in plasmaengineexplorer
    • You’ll need a serviceProvider plugin which you’d have downloaded from GHNS in a typical KDE4 setup.
    • GHNS facility is not yet working in the KF5 version of the applet, so this needs to be done manually.
hdwlhxn
Service provider data being displayed from the publictransport dataengine

Configuring service providers manually on KF5

This is a really dirty workaround but if you’re really curious and want to try out a few things, here’s what you can do.

First things first, you’ll need to get/download the service providers, somehow. I was able to do this by logging into a KDE4 session, building and running the publictransport applet there. I’ve with me, copies of the Swiss public transport service provider thanks to opendata.ch and a German one provided by Deutsche Bahn. I’ve uploaded these two to my Dropbox and enabled public access.

So if you have a working KDE4 setup, in some distros, the publictransport applet might be provided by your package manager(eg: OpenSuse). In which case, install it, run the applet, download the relevant service providers and look into ~/.kde/share/apps and copy the plasma_engine_publictransport directory as such and place it inside your ~/.local/share directory.

If the applet is not packaged by your distro, I’m afraid you’ll have to build it by source(which is the way I’d recommend btw) or you could request me for the service provider files which you’d like to have and I’d be happy to help.

Once you’re done with this, ensure your environment is set correctly. You can take a look at my how my environment variables are setup and read related bits on the community wiki.

Hardcode the value of your service provider filename in the serviceproviderplugin.xml file. This shouldn’t be needed and the wildcard entries present there should be picking up all relevant files. That’s something that needs some looking at.

For eg: If I wanted to use the Swiss service provider, I’d add a line as such, inside the <mime-type …> </mime-type> tags of the serviceproviderplugin.xml file

<glob pattern="ch_opendata.pts" />

where “ch_opendata.pts” resides inside your ~/.local/share/plasma_engine_publictransport/serviceProviders directory. The same applies for other service providers. Look for the .pts files.

So to sum it up, you would need to

  1. Download the application source code
  2. Download the service providers
  3. Setup your environment correctly
  4. Hardcode the service provider filename in the plugin xml file (BUG)

I’ll get down to rewriting the UI as soon as #4 is fixed. Our aim is to list stop details for either an arrival/departure for a vehicle line using just the data from the dataengine, which means I still have lots of work to do.

See you soon!

Advertisements

One thought on “Plasma’s Publictransport applet’s porting status

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s