Sunday Feb 15, 2009

Influencing Planet's output name space

Earlier, last week on the planet developers mail list, Fredric Muller writes

From the help file I read:
# The following provide defaults for each template:
# output_dir: Directory to place output files

Now I am trying to figure out how to have one of those template file
output in a different directory (like they all go into /var/www/planet/
and I would like one of them to go to /var/www/ ).

I can think of a couple of ways of solving this problem. My first way, which may not be the simplest, is based on the fact that I have several planet instances and for the most advanced and thought out installation I have answered this problem as follows. It is designed to answer another problem and so might be overkill.

  • I install planet into its own user and hence home directory.
  • I plan to run more than one planet so,
  • I create a sub directory for each instance
  • I create a Logs directory since I plan to run the planets from cron, pipe the logs into files and keep them for a while. Both the logs and the log name control files are kept here.
  • In the instance sub directories I place the config.ini file and the template sources; the index.tmpl will also be different as will any images used to decorate the planet html file such as feed logos or page decoration
  • In the home directory I create a shell script, which calls to act as the argument to cron and a crontab source file.
  • test the script for each instance of Planet
  • set the crontab using the source file

because I have multiple config.ini's and index.tmpl files, I can (and do) have multiple output directories and also ensure that the HTML pages meet my look and feel requirements. I do this at and and on my development site have a standard planet venus and a mingle solution. I shall be moving the two planets above shortly so I suggest that you don't rely on them for a while. Within Sun's firewall, I have a community feed and one for me (like planet davelevy above) that uses this technique. The original requirement was based on the need for quite different config.ini files, with different input feed lists but Fredric's case is also solved using the technique.

I also have a script to tidy up the logs, maybe I should publish them all. (If you want'em comment or reply to the planet development list and ask. )

The second answer for Fredric's case, is that since I encapsulate ${HOME}/ into a script, I could always end the script with an appropriate cp command, provided there was no contention for the name /var/www/index.html.


Wednesday Jan 14, 2009

Fixed my planet bug

I wrote about running up planet venus inside virtual box on my blog. It seems that it was a problem with, the FOAF tests. With help, I have debugged the problem, written a correction and submitted it to the developer list.

This has been accepted, so I am now a content developer for Venus. Hooray for me!


Wednesday Jan 07, 2009

+1 to virtual box

I installed a planet instance inside an Ubuntu Guest Virtual Box VM, and it failed the install tests. I was gratified to discover that a native instance of planet/ubuntu 8 failed in the same way. +1 to Virtual Box. Now onto fixing it.


Tuesday Jul 25, 2006

My personal planet

I now have an instance of the Planet RSS feed aggregator running on my Qube under Linux 2.2 which is aggregating my Snipsnap and feeds, or would be if I hadn't discovered a misconfiguration that makes it difficult to blog on my snipsnap. (This seems to be a windows firewall problem!)

How do I do this?

Planet requires Python(v2,2 or better). So I downloaded the most recent Python (2.4) from and tried to compile it into an install directory, this failed because my TCL library was too old, and I couldn't replace this with an up to date version; the ActiveState TCL distribution complained about my libc's age and version, and with Linux, that's that. For more on this unfortunate state of affairs, check my personal wiki here.... Fortunately I have a friend (Chris Gerhard) who installed Python 2.x a long time ago on a Qube and I borrowed his installation directory, copied it to my system and ran a make install. The install points at /usr/local/bin which means I can use a ${PATH} variable to control if my new Python V2.x or old Python V1.x is invoked. it claims to be V2.4 so I have no idea how it works, but I then downloaded the Planet code from its home site,, which I'd like to say is very simple but that wouldn't be true for me since I don't read Python, so with a bit of trial and error, this is what to do -

  1. I created a user called planet and ensured that $PATH & $MANPATH were set appropriately. i.e. to invoke my new version of python and then unpacked the archive into the user home directory. A sub-directory to hold the run time logs was created and also a sub-directory to hold files for a specific planet instance. (./Logs & ${HOME}/${PLANETNAME}.
  2. I then copied the fancy templates into ${HOME}/${PLANETNAME}, together with planet.css.
  3. I created a target directory which needs to be in the web server's file system. I chose ${WEBSERVER_ROOT}/planet/${PLANETNAME} and placed the image files into the target directory. The image files include the planet logo, the feed format badges and the face icon(s). (The face icon is exactly that, it allows the logoing of articles in the HTML version of the feed and the authors suggest a picture of the article author). Ensure the planet user has write permissions to this directory
  4. I then created the config file, I used explicit file and file directory names and placed the config file in the planet instance directory i.e. ${HOME}/${PLANETNAME}. The config file references a cache directory which planet uses. Planet uses a cache directory, this needs to be created and referenced in the config.ini. I placed this in the /var file system.
  5. The planet script, needs to be run occasionally. I chose to use cron to do this and wrote a script to ensure that all output was kept and written to a log file. (I also wrote a second script to keep these under control). I run planet every 15 minutes which given there's only one author is frequent enough. The log tidy up I run once/day. These jobs run as user planet, which is`why the planet user needs write privilidges to the target directory.
  6. I amended the index.html.tmpl and the planet.css files to get a colour conformity with the rest of my web space (except this blog) and discovered that the atom logo is missing, so I went and got myself one of those. Most of the amendments I made are to the sidebar. My planet is here..., PlanetCycling is here... which has a vanilla html page. I changed H1 to get my green banner and left justification.

Here's my H1 rule, which is used to implement the page banner -

h1 {
margin-top: 0px;
padding-top: 20px;

background-color: #690;
border: thin dotted #808080;

font-family: "Bitstream Vera Sans", sans-serif; font-weight: normal;
letter-spacing: -2px;
text-transform: lowercase;
text-align: right;
color: white;

Hope this helps!





« July 2016