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 planet.py 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 http://davelevy.dyndns.info/planet/davelevy and http://davelevy.dyndns.info/planet/g3 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}/planet.py 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.

tags:

Comments:

Post a Comment:
Comments are closed for this entry.
About

DaveLevy

Search

Archives
« May 2015
MonTueWedThuFriSatSun
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today