Adding RSS feeds to Akregator

Feb 26, 2009 by     7 Comments    Posted under: Technology
|

KDE 4.x has changed many of the ways we work from its predecessor, KDE 3.5. Upgrading to this version I have realized that adding an rss feed to Akregator, my reader of choice, no longer worked. This is because dcop has been replaced with d-bus. Similar to dcop we can find out how to convert our dcop calls for use with d-bus.

The qdbus tool works quite similar to how dcop worked, e.g. if you invoke it
without any parameters it will list all processes (actually all D-Bus
connections [1]).

If you pass one such name as its first parameter, it will list all objects
inside the application. If you add one object it will list all its methods.

So a starting point for your DCOP call above would be

qdbus org.kde.akregator /Akregator org.kde.akregator.part.addFeedsToGroup

So with this we can come up with a sh script that will add feeds to Akregator when clicking on the rss icon in the location bar.

#!/bin/bash

# check to see if akregator is running
# if not start akregator
if [ -z `/sbin/pidof akregator`]
then
	akregator
fi

for f in "${@/feed/http}"; do

  # 4.x qdbus call
  qdbus org.kde.akregator /Akregator \
  org.kde.akregator.part.addFeedsToGroup "$f" "Firefox Subscribed"

  # 3.x dcop call
  # dcop akregator AkregatorIface addFeedsToGroup "[" "$f" "]" "Firefox Subscribe"
done

You can copy and paste the above code into a file with executable permissions and associate the rss type with this script from within firefox.

Below you can download a file and put it somewhere that firefox has access.

About Me

I have a passion for art, music, science and math. Really anything that makes me feel something. A mild mannered developer trying to slowly change the world. Apparently, very slowly.
Page Paul

Follow me on Twitter

Categories

%d bloggers like this: