Baruch Even's Blog

I have no subtitle...

Entries from July 2006.

The making of a Planet
19th July 2006

Planets are a fairly common method to aggregate blogs. They are especially pervasive in the FOSS world, with planets for Debian, Gnome, KDE, and many others.

I find planets as a useful resource for a community to give a single place for the communication and to check for updates. The usual method of communication in blogs is a reply in a post, the planet makes the replies come in the same page for the reader with little context loss.

For this reason I'm also fond of setting up planets myself for those communities that lack them, and so I setup planets for FOSS-IL for Israeli blogs about FOSS issues (mostly in Hebrew), Planet (former) Advogato for former Advogato bloggers and the latest one is Planet MicroISV for MicroISVs.

I was asked to provide some (tutorial|help|something) on setting up a planet, and this post is the answer to that request.


The PlanetPlanet program is a very common RSS feed aggregator, it works with most feeds and is fairly tolerant to non-standard-conforming feeds. It is also relatively low maintenance, which is why I chose it for my aggregators.


The first thing you'll need is to make sure you have Python 2.2 or better installed. If you're on a sane OS, you can just do apt-get install python2.3 otherwise you are left to fend for yourself. For the Windows folks there is ActivePython.

Another would be prerequisite is Bazaar, two implementations for the Distributed Revision Control algorithm which was pioneered in GNU Arch. Bazaar would be more user friendly, but both IMNSHO are horrendous user-interface wise. Which is why I provide a snapshot of the latest revision for your benefit.


Installation would be fairly simple, just unpack the tar.gz and it's installed, nothing else needs to be done, except configuring it.

The snapshot I provided is just a raw dump of the arch repository, it is useful as is since you can update the installation as needed by just updating and merging with Arch/Bazaar. This will not be covered here. Too much of a trouble for now, and the PlanetPlanet development is at the pace of a snail carrying an elephant, don't expect updates in the near future.


I assume you have in mind the list of blogs you want to put on the planet. It need not be comprehensive, a few blogs to start would be good enough. It's trivial to add more as you go.

In the planet directory you should copy the examples directory to a new one, say myplanet, copy the output directory to myplanet-output and edit the myplanet/config.ini file.

At the minimum you should change the following variables:

The next stage would be to replace the existing blog listed in the config.ini file with your own list. The example is there and is trivial to follow, the entry for a blog looks like:

name = Baruch Even

Where the feed URL is in square brackets and the name of the blog is the name. There are various games that are possible with the templates but we'll ignore them for now and let you learn them from the examples provided by the authors.

The next stage is just to run the planet on the new files, we will use the defaults for the rest.

python myplanet/config.ini

The planet will work for a while, churn out various uninteresting messages and generate the files we asked it for in the myplanet-output. You can now inspect the files in the output directory, load them in a browser and enjoy.


So you haven't left yet? Want some more info?

One obvious question is now that we have the files, how do we serve them to the world so everyone can enjoy our creation? First, you should ask yourself if the world really cares... you do, ah?! OK. If the world cares enough it will find a way to show you how to do it. Since it depends on your OS, web server and various configurations, I can't help you on this. This is left as an exercise to the reader.

The configuration in config.ini should be fairly obvious and is well commented. The look of the site depends on two factors, the HTML that is generated, which is a clean HTML version 4.01 and has all formatting controlled by the CSS file which was kindly provided in the outputs directory.

The templating code is very simple, it has two operations, TMPL_LOOP and TMPL_VAR. TMPL_LOOP will loop over a variable, usually the Channels variable. And the TMPL_VAR operator will emit that variable, there are the global vars and the loop vars. The best way to figure it out is to use the existing templates as a building block, they are fairly easy to understand.

Enjoy your new Planet!

No tags

RSS Feed

Created by Chronicle v4.4