Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Force RSS feeds to refresh using pubsub Internet
I've had problems with RSS feeds not updating correctly in Safari. So, I started looking for a way to manually refresh the feeds which, in turn, led to experimenting with the pubsub command (in the Terminal application).

To use the pubsub command, first launch the Terminal application.

To list all RSS feed clients type:

pubsub list clients

You'll get results like this:
#Feeds	Signature
9	com.apple.Safari
0	com.apple.mail
To list all RSS feeds for all clients type:

pubsub list

To list RSS feeds for a particular client type:

pubsub --client com.apple.Safari list

Either way, the pubsub list command returns the following RSS feed information:
Title		-Name
URL		-URL
Interval	-Refresh /Expiry times
To refresh a particular feed type:

pubsub refresh http://rss.feed.url

For more pubsub command information type:

man pubsub

Using this information I wrote a quick AppleScript to refresh all of my Safari RSS feeds. Here it is:
--GET ALL RSS FEED URLS
set theURLs to paragraphs of 
	(do shell script "pubsub --client com.apple.Safari list|awk -F'" & tab & "' '{print $3}'|grep http:")
--UPDATE THE RSS FEEDS ONE BY ONE
repeat with aURL in theURLs
	do shell script "pubsub refresh " & quoted form of aURL
end repeat
I then changed Safari's RSS Preferences to 'Check for updates: Every day.' Now I can manually (force) refresh my feeds whenever I want. If you set Safari to 'Check for updates: Never' it won't show you the unread RSS counts.

I don't have any RSS feeds in the Mail application, but you can easily modify the AppleScript to update the RSS feeds of a different client or all clients.

[crarko adds: I mostly tested this one. The AppleScript compiles and runs and the pubsub command does what the hint says. It doesn't appear to work with NetNewsWire which is the application I use for RSS feeds.]
    •    
  • Currently 3.71 / 5
  You rated: 4 / 5 (7 votes cast)
 
[6,792 views]  

Force RSS feeds to refresh using pubsub | 5 comments | Create New Account
Click here to return to the 'Force RSS feeds to refresh using pubsub' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Force RSS feeds to refresh using pubsub
Authored by: mantrid on Jan 11, '11 07:49:33AM

Sorry about the one star vote, it was unintentional. I was trying to click the "read more" link and missed.



[ Reply to This | # ]
Force RSS feeds to refresh using pubsub
Authored by: karog on Jan 11, '11 08:23:09AM

In Mail, you can ctrl-click (right click) on any RSS Feed in the left sidebar and choose Update All RSS Feeds.



[ Reply to This | # ]
Force RSS feeds to refresh using pubsub
Authored by: asmeurer on Jan 11, '11 03:40:43PM

My RSS feeds weren't updating for a few days, but I got them to update again (quite by accident) by adding a new RSS feed.



[ Reply to This | # ]
Force RSS feeds to refresh using pubsub
Authored by: asmeurer on Jan 11, '11 03:42:57PM

It's a shame it doesn't work with NetNewsWire, because that means that that program is not using the systemwide RSS mechanism, which only updates a feed once and automatically sets a feed item as read in one program if it is read in another.



[ Reply to This | # ]
Force RSS feeds to refresh using pubsub
Authored by: wjv on Jan 12, '11 06:24:51AM
If you don't mind messing a bit with SQL, you can also set per-feed refresh times as in this old hint of mine.

Somebody really need to write a nice graphical front-end for the PubSub framework.

[ Reply to This | # ]