Planeta PyAr, or how to generate multiple planets with rawdog

I just finished implementing my first public planet, Planeta PyAr using rawdog. It contains the blogs of members of Python Argentina

To avoid the classical argument about whether this is "the planet of people in PyAr" or "posta about python from people in PyAr", I decided to hack rawdog into producing both.

I didn't want to have two separate rawdog configurations, so I started looking at plugins.

The basis was the selectfeeds plugin and the rss plugin.

Then I merged selectfeeds into rss to make things simpler.

Here is my hacked version which takes the selectfeed argument and uses only those feeds when creating the HTML, FOAF, OPML and RSS files.

The bad side of this is that selectfeed requires you post the feed URLs all in one line!

With just a couple dozen blogs in the planet, that means several hundred characters. And then when you decide to change one URL... ick.

So, I wrote a tiny script to take separate feed files and create separate config files, merge-config.py.

Now, I create a feeds-full file with the non-python-specific feeds in rawdog format:

#############
# Feeds full
#############

# Anthony Lenton
feed 20m http://anthony.lenton.com.ar/feed/es/
# Rivendel
feed 20m http://www.ceportela.com.ar/?feed=rss2
# Facundo Batista
feed 20m http://feeds2.feedburner.com/com/wEER
:
:

And the same for a feeds-python:

###################
# Feeds solo python
###################

# Anthony Lenton
feed 20m http://anthony.lenton.com.ar/?feed=rss2&cat=4&language=es
# Rivendel
# No tiene RSS solo python
# Facundo Batista
# No tiene RSS solo python
# Gabriel Patiño
feed 20m http://gepatino.blogspot.com/feeds/posts/default/-/Python
:
:
:

Put all the common configurations in config-base.

And merge-config.py produces a config, a config-full and a config-python.

Then run rawdog like this:

cd ~/.rawdog ; LANG=es_ES rawdog -c config-full -w ; LANG=es_ES rawdog -c config-python -w

And that's it, two planets for the cost of one and a half.I wonder why other planets don't provide this.

Comments

Comments powered by Disqus