| Class | Technorati::Referrer |
| In: |
examples/referrer.rb
(CVS)
|
| Parent: | Object |
Simple example class that builds a RSS feed of blog posts referring to the given blog.
| RSS_TMPL | = | <<-END_RSS_TMPL <?xml version='1.0' encoding='utf-8'?> <rss version='2.0'> <channel> <title>Technorati: Sites Linking to <%= h(url) %></title> <link>http://technorati.com/</link> <description> A list of sites linking to <%= h(url) %> according to <a href='http://technorati.com/'>Technorati</a>. </description> <%= result.items.map { |item| rss_item(url, item) }.join %> </channel> </rss> END_RSS_TMPL | ERuby template for RSS feed. | |
| ITEM_TMPL | = | <<-END_ITEM_TMPL <item> <title><%= h(item.weblog_name) %></title> <link><%= h(item.weblog_url) %></link> <pubDate><%= h(item.linkcreated.httpdate) %></pubDate> <description> This site links to <%= h(url) %>. <%= h(item.excerpt ? 'Exerpt:' << item.excerpt : '') %> </description> </item> END_ITEM_TMPL | ERuby template for RSS items. |
Create a new Referrer and run it with the specified arguments. Used to run this class from the command-line.