Reply to topic

How to subscribe to https-feeds in Akregator via Firefox?

markum
Registered Member
Posts
160
Karma
1
Hi,

I am using a script I found years ago on the internet to subscribe to rss-feeds via Firefox in Akregator:

Code: Select all
#!/bin/bash
if [-z`/bin/pidof akregator`]
then
#   echo "starting... " >> /tmp/akregator-rss-subscribe.log
   akregator
fi

for f in "${@/feed/http}"; do
#   echo "$f" >> /tmp/akregator-rss-subscribe.log
#       dcop akregator AkregatorIface addFeedsToGroup "[" "$f" "]" "Firefox Subscribe"
   qdbus org.kde.akregator /Akregator org.kde.akregator.part.addFeedsToGroup "$f" "Imported Feeds"
done

It works fine, but I noticed that it causes some problems if the page is encrypted with "https".
If I add the feed of "https://wiki.mozilla.org/index.php?title=Special:RecentChanges"
it appears as "http: https://wiki.mozilla.org/index.php?titl ... &feed=atom" in Akregator. Since It works fine, when I do this in Konqueror, I assume the problem is with the script. Does anyone have an idea how to fix this?

Markum


markum, proud to be a member of KDE forums since 2008-Nov.
User avatar bcooksley
Administrator
Posts
18669
Karma
83
OS
Are you aware of what the argument being passed to the script is trying to do? It looks like it is trying to turn a feed:// url into a http:// url, which fails with https.


System Settings and Device Actions KCM maintainer
Image
markum
Registered Member
Posts
160
Karma
1
bcooksley wrote:Are you aware of what the argument being passed to the script is trying to do? It looks like it is trying to turn a feed:// url into a http:// url, which fails with https.

I do not exactly understand your question. I have not written the script myself and I do not really understand what it is doing exactly because I lack the knowledge.


markum, proud to be a member of KDE forums since 2008-Nov.
User avatar bcooksley
Administrator
Posts
18669
Karma
83
OS
The issue is both with the script and Firefox. Firefox behaves differently depending on if the URL is http or https.
Try the following script instead, and see if that works for both http and https urls.
Code: Select all
#!/bin/bash
if [-z`/bin/pidof akregator`]; then
   akregator
fi

for url in "$@"; do
   actualUrl=${f/feed/http}
   actualUrl=${actualUrl/http:https/https}
   qdbus org.kde.akregator /Akregator org.kde.akregator.part.addFeedsToGroup "$actualUrl" "Imported Feeds"
done


System Settings and Device Actions KCM maintainer
Image
markum
Registered Member
Posts
160
Karma
1
bcooksley wrote:The issue is both with the script and Firefox. Firefox behaves differently depending on if the URL is http or https.
Try the following script instead, and see if that works for both http and https urls.


Thanks. The behaviour has changed, but it is still not working correctly. Instead of

Code: Select all
https://wiki.mozilla.org/index.php?title=Special:RecentChanges&feed=atom


it adds:
Code: Select all
https://wiki.mozilla.org/index.php%3Ftitle=Special:RecentChanges&feed=atom?title=Special:RecentChanges

which does not work.

Last edited by markum on Sat Jul 20, 2013 7:39 am, edited 1 time in total.


markum, proud to be a member of KDE forums since 2008-Nov.
User avatar bcooksley
Administrator
Posts
18669
Karma
83
OS
I could not reproduce that issue specifically, but I did identify another bug.
Try this instead:
Code: Select all
#!/bin/bash
if [-z`/bin/pidof akregator`]; then
   akregator
fi

for url in "$@"; do
   actualUrl=${url/feed/http}
   actualUrl=${actualUrl/http:https/https}
   qdbus org.kde.akregator /Akregator org.kde.akregator.part.addFeedsToGroup "$actualUrl" "Imported Feeds"
done


System Settings and Device Actions KCM maintainer
Image
markum
Registered Member
Posts
160
Karma
1
Now it works. Great! Thanks!


markum, proud to be a member of KDE forums since 2008-Nov.

 
Reply to topic

Bookmarks



Who is online

Registered users: apater, areid, Baidu [Spider], Bing [Bot], braystacey, edmael, einar, Exabot [Bot], garthecho, Google [Bot], google01103, ivan, jensreuterberg, joaob, jpwhiting, jstaniek, La Ninje, lazyit, Majestic-12 [Bot], mmistretta, MSN [Bot], pedrorodriguez, salvochea, scottpetrovic, scummos, SeaJey, SecretCode, slangkamp, slawekk, Sogou [Bot], SysGhost, TheraHedwig, tienhung, Tioz, VP1986, Yahoo [Bot], šumski