Planet Planet, now including Venus
Introduction
I originally installed Planet on a Cobalt Qube and moved to a Virtual Box version of Ubuntu 8. I copied the files to a web server. In 2010 I booted up an Amazon EC2 server and decided to install
Venus, a derived product on that machine.
Pre-requisites
You need Python, V2.2 or better.
There are several ways to install the package, but
git is now recommended.
On Ubuntu,For Ubuntu you need and may thus need to install python-librdf, libxml2 & xsltproc. The need can be assessed by using run_tests.py. The packages can be installed using
apt-get. librdf is optional see FOAF below.
apt-get install [python-librdf|libxml2|xsltproc]
See comment dated 21 Dec 2009
On 1and1,I needed to install planet venus on 1and1, so I used git clone to download the code.
I downloaded my tools, and amended functions to define a new BASEDIR. I do not have root access on this machine. runtests.py stated that
libxml2 and
xslt are both missing so I installed them from source.
I used
git clone to download them from
and then mucked around with the automake tools to compile them. It's good that we have access to the automake and gcc toolset. I ran
aclocal, autoheader, autoconf and ./autogen,sh to create a ./configure. I ran ./configure with a --prefix parameter set to a directory in my file space. I found
The errors that occured as I guessed what was needed didn't take too long to understand, it seems that all three auto* tools are needed to create a configure script, and then I need to set the local parameters.
On Centos,I have had problems installing Venus on Centos 5.3, and have written up my adventures on my
Centos 5.3 page.
FOAFRedland RDF is a package in the Ubuntu repositories, and can be installed using
Synaptic as well as the command line. The RDF package is used to create the FOAF implementation of the OPML files. If you don't want that, you don't need it.
Links
Here's the documentation
Git
I used
git to install Venus, and plan to use it to update it. I found the following links useful, or ought to have,
To find these I did, a
google "how to use git". I also read the man page.
I use
VENUS_HOME=<absolute home directory reference>
git --git-dir=${VENUS_HOME}/.git pullas the code to pull the updates.
Any comments on this appreciated, I have not yet finsihed testing this code. I run it twice/month. DFL 15 Feb 2011.
Creating a persoanl internet spore aka mingle
The original ambition was to create a personal spore, and I, in 2008/2009, created a mingle/planet on my home desktop and an Ubuntu desktop image on my works laptop. This has nearly all the feeds I create, which are documented at
http://davelevy.info/communities.html. My friend feed,
http://friendfeed.com/davelevy is a pretty good stab at a single consolidated feed, but the mingle look and feel is good so I shall persevere. It is now available online at
http://davelevy.dyndns.info/mingle
Themes
Planet Venus comes with two theme templates which are integrated with the templating package used by Planet. On the 11th May 2011, I rebuilt my
planet g3, a feed mirror for the
Gibberlings 3 News Feed. This service provides the feeds as raw text in XML which allows thier integration in other services. I decided to re-build the HTML page.
I tried to recreate the original theme which is content on the left, and a sidebar on the right. I wanted to have a fixed width with auto margins. The template configuration code caused some difficulty with this and so I hacked it using the techniques documented on
Venus Themes, on this site.
Managing Venus
I have finally written some shell scripts to help me manage multiple planets on a single UNIX image. These have been tested and deployed on Ubuntu 9 images.
Now V1.2, untar and gunzip the archive into the directory in which planet.py is located. Edit the
functions file so that BASEDIR is the directory in which planet.py is located. (Probably needs a bit more testing).
run_planet.sh runs planet once. It takes a either a URL, which must point to a config file, or a directory name, which must contain a valid config file called config.ini. It tests if the argument starts with http:// and assumes that if it does, that it is a valid URL, which means that the program will fail if the token is not a valid URL and/or if the URL is not a valid config file. If the directory is called mingle, then it assumes the config file is called mingle.ini. It also has a --help option, and --version option. Its currently V2.1, licensed as CC BY-SA. It is
ksh script.It calls ./functions to establish several functions. It also cycles log files. There must be a directory called ./Logs, this must contain a file called ${directory_name}.i, which contains the next unused number for the log name. The logs have the name format ./Logs/${directoryname}.log.n, where n is a number. The program performs some validation on the $1 to ensure that its environment is sound.
run_allplanets, invokes a function listplanets, which browses ./Logs/*.i to get the names of the planets and then runs them. /bin/sh
makelogctrzero, does what it says, it zeroises the contents of its .i file. It takes the directory name parameter. It has no help messages or other parameters. It has a none zero exit code if it can't find the file. /bin/sh
tidy_planetlogs.sh is a ksh, and deletes log files over a certain age. Currently two days I think. This is an environment variable declared by the program. It is one of the reasons that I might implement a config file. There are no arguments to this program.
getremoteconfig.sh, is used when a web config file is specified. It is called by run_planet.sh. It takes a URL which
must be a valid p[lanet config file, or the flags --list, --tidy, --version. --list lists the workfiles, --tidy deletes them. It does
not have a help parameter. I needed to write this because planet.py will not take a URL as an argument. It gets lost somewhere in ConfigParser which is distributed with Python and designed to solve the very problem I so often have when building shell suites. (It'd be good to fix this at the python level.)
stringisurl tests if the first argument starts with http://. This is implemented as a function in functions file and is where run_planet.sh invokes
the code lines. This is thus just a demo program.
makenewplanet creates a directory, and a log control file. It is /bin/sh, and calls makelogctrzero. It can use a current directory as a model and therefore copy the template and configuration files. It will delete the directory and log control file. It doesn't create an output directory. It has a help and version flag.
removeplanet calls makenewplanet with a -d flag.
run_allplanets & tidy_planetlogs.sh can be placed in a cron job.