WikiRSSProxy

A Wiki RSS Proxy munges RSS feeds using the ModWiki extension and emits a feed with some of the special wiki info stuffed into the the other fields, such that a news aggregator that knows nothing of ModWiki can still display all of the relevant info.

For example, the proxy could put the author's name into the comment field. And change the link from a link to the page to a link to the page's Changes display.

This way wiki RSS feeds would become useful enough to use in standard UpdateCollectors (aggregators). Without waiting for either wiki software or aggregator software to change.

One such proxy exists on emacswiki.org [1]. When you visit it, you will be asked for the URL to the RSS feed you want to simplify. Submit an URL and you should be taken to a simplified RSS. Take note of the that URL and use it for your news aggregator.

Discussion

It is probably easy enough to write a semi-generic one by using WikiGateway.

-- BayleShanks

You know, I'm wondering if we should put this into the logging PageCluster.

(I sense a pattern.)

-- LionKimbro

Didn't know there was one.

Actually, I think this isn't "logging" but just "syndication", which is more general.

We may as well have a "syndication" cluster, I guess. I still think there's no reason to have separate clusters and categories.

-- BayleShanks

There's something in common between logging and syndication, though I can't name it at just this moment.

(I've moved your invocation of discussion about clusters and categories to a brand spanking neeeew page: CategoriesAndClusters!)

-- LionKimbro

The idea was inspired by the following comment from MeatBall:SURVEYAreYouReadingThisRSSFeed:

"I would be using the feed, but my aggregator, BlogLines?, doesn't display who made the changes, and so I find it less useful than hitting RecentChanges myself. -- StephenGilbert"

So use case is:

"I want to use a certain UpdateCollector, but my UpdateCollector doesn't understand ModWiki. When I visit wiki RSS feeds, all I can see is the "comments" field, not the author field, and in addition there is no convenient link to the Changes page. So I end up visiting the wikis' RecentChanges pages anyway."

The best solution is to make the aggregator programs do ModWiki. But making a proxy would allow you to make do even if you only have wiki engines that put out a standard ModWiki feed, and only aggregator programs that don't know about ModWiki.

-- BayleShanks

I have something that seems to work for me: Oddmuse:RSS_Simplification. -- AlexSchroeder

Here are my modifications to Alex's script. They are:

the actual modification is this. replace everything after (and including) the "foreach" block of Alex's code with:

foreach my $i (@{$rss->{items}}) {
  if ($i->{dc}->{contributor}) {
      $contributor = $i->{dc}->{contributor};

      if ($i->{'http://www.w3.org/1999/02/22-rdf-syntax-ns#'}->{'value'})
      {$contributor = $i->{'http://www.w3.org/1999/02/22-rdf-syntax-ns#'}->{'value'};}

#      if ($i->{dc}->{contributor}->{rdf}->{value}) 
#      {$contributor = $i->{dc}->{contributor}->{rdf}->{value};}

      $i->{description} = '(' . $contributor . ') '
	  . $i->{description};
  }
  if ($i->{dc}->{date}) {
      $i->{description} = $i->{description} . '   (' . $i->{dc}->{date} . ') ';  
  }
  if ($i->{$wikins}->{diff}) {
      $diff = $i->{$wikins}->{diff};
      $diff =~ s/action=browse;diff=(\d+);id=([^<]+)/action=history;id=$2/g;
      $diff =~ s/action=browse&diff=(\d+)&id=([^<]+)/action=history&id=$2/g;
      $i->{link} = $diff;
  }
}
print header(-type=>'text/plain; charset=UTF-8');
$output = $rss->as_string();
$output =~ s/&/;/g;
print $output;

-- BayleShanks

Hey Alex, may I put your code (and also my modified version) on InterWikiSoftware? I'd like to maintain a collection of such tools on that site.

-- BayleShanks

Sure. It would be nice, perhaps, to make it customizable by adding a few parameters.

-- AlexSchroeder

While changing my feeds over to use my local proxy, I noticed something curious; my other, raw feeds were displaying things like diff links and history links. It seems my UpdateCollector will display a lot of fields that it doesn't know, just not dc:Contributor. So I hacked Alex's script one more time, to not do anything but make an RSS 1.0 which changes the dc:contributor field to dc:creator (and which replaces & with ;). Here's the "foreach" block:

foreach my $i (@{$rss->{items}}) {
  if ($i->{dc}->{contributor}) {
      $contributor = $i->{dc}->{contributor};

      if ($i->{'http://www.w3.org/1999/02/22-rdf-syntax-ns#'}->{'value'})
      {$contributor = $i->{'http://www.w3.org/1999/02/22-rdf-syntax-ns#'}->{'value'};}

      $i->{dc}->{creator} = $contributor;
  }

}
print header(-type=>'text/plain; charset=UTF-8');
$output = $rss->as_string();
$output =~ s/&/;/g;
print $output;

-- BayleShanks


I can now rest my finger on what is common.

An RSS feed is just the incremental log of a wiki.

If you saved output to a plog rather than publishing on demand, it's not all that much different. :P

-- LionKimbro

Yes, this is true; I think we agree on these lines but with different words. We both think there is a general category including all three cases (personal log, project log, wiki log (= RecentChanges). I like to call this general concept "UpdateSyndication", and you like to call it "logging".

-- BayleShanks

The simplify script doesn't munge dates and times, so if you need a correct pubDate field, you'll have to add some extra code... -- AlexSchroeder


CategorySyndication

Define external redirect: BlogLines NewsMonster

EditNearLinks: MeatballWiki InterWikiSoftware ModWiki StephenGilbert

Languages: