View Single Post
Old 02-05-2007, 09:32 PM   #1
HeffeD
Enthusiast
HeffeD has a complete set of Star Wars action figures.HeffeD has a complete set of Star Wars action figures.HeffeD has a complete set of Star Wars action figures.
 
Posts: 35
Karma: 270
Join Date: Feb 2007
Device: Palm Z22
Trouble rewriting Reuters...

Hi all, I'm new to the Palm and therefore Sunrise/Plucker. I have a few channels set up, but I'd like to learn more about rewriting links.

I'm attempting to rewrite a Reuters RSS feed. The URL is http://www.microsite.reuters.com/rss/oddlyEnoughNews/

I read in another thread how to rewrite links for the Yahoo feeds as:
Code:
document.onanchorlink = function(link) {
  if (link.depth == 1) {
    link.uri = link.uri.replace("/news?tmpl=story&u=", "/s");
    link.uri = link.uri + "&printer=1";
  }
};
Looking at the before and after URLs, I can't make much sense of what is actually going on with the code because it doesn't seem to resemble the URL.

In another thread, I found this:
Quote:
Hi all

I made some mistake in the pattern and rewrite rule for Reuters.

This is the right one:
Pattern rule: http://today\.reuters\.com(.*)type=(.*)
Rewrite rule: http://today.reuters.com/misc/PrinterFriendlyPopup.aspx?type=$2

Bye

Gaetano
OK, well that looks a lot more understandable. Unfortunately, I don't know how to format the script to incorporate the regex URL info.

Can anybody help me with this? Thanks in advance!
HeffeD is offline