#!/home/tobi/rebol -cs REBOL [] print "Content-Type: text/html^/" do %/xml-lib.r channel-url: "http://www.popo.at/" if (last channel-url) <> #"/" [append channel-url "/"] page: read to-url channel-url channel-template: read %templates/rdf10/channel.xml resource-template: read %templates/rdf10/resource.xml item-template: read %templates/rdf10/item.xml channel-title: "" parse page [thru "" copy channel-title to ""] description: "" parse page [thru {}] items: [] parse page [any [thru {} copy item to {} (append items item)]] temp: [] parse page [any [thru {} copy str to {} (append temp str)]] urls: [] foreach str temp [ parse str [thru {} copy title to {}] title: "" url: pick urls cnt replace/all template "{url}" url replace template "{title}" title replace template "{description}" encode-xml item append output-string template cnt: cnt + 1 ] replace channel-template "{items}" output-string write ftp://tobi:p3kschloegln@www.popo.at/www/rss.xml channel-template print {rss.xml}