Masterpiece Of The Day
I have created an RSS feed called Masterpiece Of The Day, showcasing a daily random masterwork painting from the ibiblio WebMuseum. I did this primarily to learn about some of the great artworks of history, and also to learn how to create an RSS feed. (Paul Graham would be proud!)
So what are you waiting for? Subscribe to it today using your RSS feedreader of choice! Here's the link to the feed:
Geek Notes
I use the following Ruby script to create the XML file, which gets FTP'd to the web on a daily basis. I love languages like Ruby that allow multi-line strings:
urls = File.readlines("motd.txt")
url = urls[rand(urls.size)].strip
url =~ /.*\/auth\/(.*).jpg/
rss = "<?xml version='1.0'?>
<rss version='0.91'>
<channel>
<title>Masterpiece of the Day</title>
<link>http://jonaquino.blogspot.com/2005/02/masterpiece-of-day.html</link>
<description>A daily random masterwork painting from the ibiblio WebMuseum.</description>
<item>
<title>#{$1}</title>
<link>#{url}</link>
<description><img src='#{url}'></description>
</item>
</channel>
</rss>"
File.open("motd.xml", "w") {|file|
file.write(rss)
}
puts `ftp -i -n -s:"motd.ftp"`
2 Comments:
How does one link your XML rss feed into Firefox?
By Anonymous, at 6/10/2005 4:16 p.m.
Hi Anonymous - To subscribe to peoples' RSS feeds, I recommend using Bloglines. It's grrreat! http://bloglines.com
By Jonathan, at 6/11/2005 9:40 a.m.
Post a Comment
<< Home