Inside Paulo Abrantes' head
[ start | index | login or register ]
start > 2006-03-17 > 1

RSS feed rendering Macro

Created by pabrantes. Last edited by pabrantes, 2 years and 233 days ago. Viewed 1,245 times. #5
[diff] [history] [edit] [rdf]
labels
Category:IT
attachments
feedreader.jar (5641)

RSS feed rendering Macro

Last night I spent a few hours looking how the Macro system in >>Snipsnap was organized. It's pretty easy to write a macro and deploy it. Today when I got some free time I wrote a >> RSS feed renderer macro. I wrote it, mostly to learn how the macro system works..And well, I wanted an automated way of displaying recente posts (not recent changes, that's a feature that comes in-the-box with snipsnap) and using the blog's rss feed seemed a good idea.

>>FeedReader is used in the following way:

{rss:feed=http://rss.slashdot.org/Slashdot/slashdot}

Or if you want to display less or more than five feeds you can use max parameter:

{rss:feed=http://rss.slashdot.org/Slashdot/slashdot|max=7}

First example will generate the following:
>>Most of Woolly Mammoth Genome Reconstructed
>>New Xbox Experience Goes Live
>>NASA Exploring 8 New Space Expeditions
>>Towards a World Wide Grid?
>>Researchers Getting the Lead Out of Electronics

Second one will generate:
>>Most of Woolly Mammoth Genome Reconstructed
>>New Xbox Experience Goes Live
>>NASA Exploring 8 New Space Expeditions
>>Towards a World Wide Grid?
>>Researchers Getting the Lead Out of Electronics
>>Adobe Releases C/C++ To Flash Compiler
>>Apple's New MacBooks Have Built-In Copy Protection

It supports RSS v1.0 and RSS v2.0.

The >>jar file distributed in this post was compiled using java 1.5.0. Remember that if you are running snipsnap with java 1.4 it won't work.

If you liked this macro and want to thank me in some way, you can always send me 2€ (laugh).

no comments | post comment
Who am I?
paulo-roca2My name is Paulo Abrantes AKA pabrantes and I'm a software developer. I'm currently employed at >>CIIST working as a Java developer in >>FenixEDU.

This blog is mostly about Java programming, domain driven design and snipsnap bliki developing. Everything written in this blog is my personal opinion and it may not reflect the opinions of my employer and co-workers.


Blog subscription
subscribe by rss subscribe by email

Links
>> Home
>> Paulo's Profile
>> Post History
>> Add to Technorati Favorites
>> Paulo's Photo Gallery
>> WishList
>> Posting without Login

Search Blog
Fellow Bloggers

Recent Posts

Java Programming: Bytecode Injection
Intermission: Sorry For Downtime
Software Developing: Studying The Bliki Domain Model
SnipSnap Developing: Trying to settle a roadmap
System Administration: Load Balancing with Apache
Blogging: Two years have passed
Software Developing: The SnipSnap Saga
Java Programming: Getting your code spicy with Groovy
Software Developing: Fluent Interfaces
Software Developing: Implementing a ShoutBox on SnipsSnip
Software Developing: SnipSnap, SnipIt and SnipSnip
Java Programming: Proxies and Access Control
Java Programming: Proxies and References
Java Programming: References' Package
YALM: Yet Another Layout Modification

For older posts, please refer to post-history for a complete Post History

Logged in Users: (0)
… and a Guest.
This is a modified version of snipsnap.org created by >>Paulo Abrantes