Hi everyone,
I wanted better control over what is contained in the RSS feed, so
here's what I did. In function generateRss() in the source of your
TiddlyWiki replace the content of the section called...
// The body
with...
var tids = store.getTiddlers("modified","excludeLists");
var n = config.numRssItems;
var i = config.options.txtRssIncludeOnlyTagged;
i=i?i.readBracketedList():[];
var e = config.options.txtRssExcludeTagged;
e=e?e.readBracketedList():[];
for(var t=tids.length-1;t>=0;t--) {
if((!e[0]||!tids[t].tags.containsAny(e))&&
(!i[0]||tids[t].tags.containsAny(i))){
s.push("<item>\n" +
tiddlerToRssItem(tids[t],u) +
"\n</item>");
n--;
}
if(n==0)break;
}
Then, to include only tiddlers with one of certain tags or exclude
tiddlers with one of some other tags, you must specify the options...
config.options.txtRssIncludeOnlyTagged
config.options.txtRssExcludeTagged
...as a bracketedList of tags. You can simply do this by putting a
respective line into a zzConfig tiddler tagged systemConfig, like
so...
config.options.txtRssIncludeOnlyTagged = "RSS";
config.options.txtRssExcludeTagged = "excludeSearch systemConfig";
If you're fine with using cookies to store such values, you could also
edit them using the <<option>> macro in any tiddler like so...
only include tiddlers with threse tags:
<<option txtRssIncludeOnlyTagged>>
exclude all tiddlers with threse tags:
<<option txtRssExcludeTagged>>
Note that - while I hope to see something like this in a future
release - this may likely not survive a core update to your
TiddlyWiki.
Cheers, Tobias.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.