One feed per tag in WordPress

WordPress lets you choose to see only the entries with a specified tag from a blog, like, say, http://obvio171.wordpress.com/tag/soc. Thinking it would also have one feed per tag in the same way, I added that address to Planet-Soc as my soc feed.

To my great surprised, it crawled all of my posts and dumped it into the planet (sorry about that guys). I don’t know if they actually have a way to get one feed per tag, but I couldn’t find it, so I wrote the following:

#! /usr/bin/ruby
require 'rss'
rss = RSS::Parser.parse(open('http://obvio171.wordpress.com/feed/'))
channel = RSS::Rss::Channel.new
rss.channel.items.select {|i| !(i.categories.select {|c| c.content == "soc"}).empty?}.each {|i| channel.items << i}
channel.link = rss.channel.link
channel.title = rss.channel.title
channel.description = rss.channel.description
channel.generator = rss.channel.generator
rss.channel = channel
begin
File.delete('rss_soc.xml')
rescue
end
File.new('rss_soc.xml','w') << rss.to_xml

Now I only have to find a way to remove the old feed from planet-soc and add the new one (which btw is hosted at http://www.students.ic.unicamp.br/~ra033245/rss_soc.xml if anyone’s interested).

Posted in Uncategorized. Tags: , , , , , . 2 Comments »

Nifty new blogging tool by 17-year-old

Logahead is a new install-on-your-own-server blogging tool I’ve come across. The last one was WordPress, and out of my desire to learn more about it and the good first impression it had on me, this blog was born. Of course I’m not going to switch now, but I’m sure going to give Logahead a go.

Logahead seems to go more in the way of simplicity, probably being not as configurable as WordPress, but still full of nice features, “fully buzzword compatible (AJAX, RSS, Web 2.0 – it’s all there)” and really easy to use.

Most impressive: all done by one 17-year-old.

(through eHub)

Posted in Uncategorized. Tags: , , , , , , , . Leave a Comment »