| Edit | Rename | Changes | History | Upload | Download | Back to Top |
Right click and save these scripts
Here's a simple sample script - once it produces the rss file, you can subscribe with a local file URL.
| writer content str rest out |
"creates the item"
contentBlock := [:builder :chunk |
| stream |
stream := ReadStream on: chunk.
stream throughAll: 'SRC="'.
builder link: (stream upTo: $").
builder title: 'User Friendly For: ', Date today printString.
builder description: '<a href="', chunk.
builder pubDate: Timestamp now].
"main script"
out := 'userFriendly.xml' asFilename writeStream.
writer := RSS20_SAXWriter new output: out.
writer
prolog;
startRSS;
startChannel;
title: 'User Friendly Feed';
link: 'http://www.userfriendly.org/';
description: 'User Friendly Feed';
pubDate: Timestamp now;
startItem;
title: 'User Friendly For: ', Date today printString.
content := 'http://www.userfriendly.org/' asURI valueStream contents.
str := content readStream.
str throughAll: 'CARTOON FOR'.
str upToAll: 'href="'.
rest := str throughAll: '</A>'.
contentBlock value: writer value: rest.
writer
endItem;
endChannel;
endRSS.
out close.
| Edit | Rename | Changes | History | Upload | Download | Back to Top |