Debian / Ubuntu Python: Set Planet Venus To Combine Two Or More RSS Feeds

by on December 14, 2012 · 3 comments· LAST UPDATED December 14, 2012

in , , ,

How do I setup "Planet Venus" under Debian or Ubuntu Linux to downloads news feeds (RSS) published by web sites and aggregates their content together into a single combined feed?

Tutorial details
DifficultyIntermediate (rss)
Root privilegesYes
RequirementsDebian/Ubuntu/Python
Web Server
Estimated completion timeN/A

From the project home page:

Planet is a flexible feed aggregator. It downloads news feeds published by web sites and aggregates their content together into a single combined feed, latest news first. It uses Mark Pilgrim's Universal Feed Parser to read from CDF, RDF, RSS and Atom feeds; Leonard Richardson's Beautiful Soup to correct markup issues; and either Tomas Styblo's templating engine or Daniel Viellard's implementation of XSLT to output static files in any format you can dream up.

You can use this tool to combine two or more feeds easily i.e. this software act as a "Feed Aggregator".

Installation

Type the following apt-get command:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install planet-venus

Sample outputs:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  python-html5lib python-htmltmpl python-libxslt1
Suggested packages:
  python-django python-genshi python-lxml
The following NEW packages will be installed:
  planet-venus python-html5lib python-htmltmpl python-libxslt1
0 upgraded, 4 newly installed, 0 to remove and 11 not upgraded.
Need to get 0 B/583 kB of archives.
After this operation, 2,904 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package python-html5lib.
(Reading database ... 281588 files and directories currently installed.)
Unpacking python-html5lib (from .../python-html5lib_0.90-1_all.deb) ...
Selecting previously deselected package python-htmltmpl.
Unpacking python-htmltmpl (from .../python-htmltmpl_1.22-10_all.deb) ...
Selecting previously deselected package python-libxslt1.
Unpacking python-libxslt1 (from .../python-libxslt1_1.1.26-6+squeeze2_amd64.deb) ...
Selecting previously deselected package planet-venus.
Unpacking planet-venus (from .../planet-venus_0~bzr116-1_all.deb) ...
Processing triggers for man-db ...
Setting up python-html5lib (0.90-1) ...
Setting up python-htmltmpl (1.22-10) ...
Setting up python-libxslt1 (1.1.26-6+squeeze2) ...
Setting up planet-venus (0~bzr116-1) ...
Processing triggers for python-support ...

How do I use planet venus?

Type the following command to create a default planet for planet.cyberciti.biz in /home/apache/domains/planet.cyberciti.biz/http:
$ mkdir -p /home/apache/domains/planet.cyberciti.biz/http
$ cd /home/apache/domains/planet.cyberciti.biz/http
$ planet --create linuxnews

To edit this default planet called linuxnews, enter:
$ cd linuxnews
$ vi planet.ini

Sample outputs:

# Global configuration
[Planet]
 
name            = nixCraft Linux News Planet 
link            = http://planet.cyberciti.biz/
owner_name      = nixCraft
owner_email     = webmaster@server1.cyberciti.biz
output_theme    = theme
cache_directory = cache
output_dir      = output
feed_timeout    = 20
items_per_page  = 60
log_level       = DEBUG
 
# RSS/Feed subscription configuration
# [Feed-RSS-URL]
# name = Web Site Name Here
 
[http://feeds.cyberciti.biz/Nixcraft-LinuxFreebsdSolarisTipsTricks]
name = nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format
 
[http://rss.slashdot.org/Slashdot/slashdotLinux]
name = Linux Stories From Slashdot
 
[http://feeds.feedburner.com/linuxtoday/linux]
name = Linux Today
 
[http://www.reddit.com/r/linux/.rss]
name = Reddit /r/Linux
 

Save and close the file.

Build default planet right away

Type the following command:
$ planet --verbose planet.ini
Sample outputs:

INFO:planet.runner:Socket timeout set to 20 seconds
INFO:planet.runner:Building work queue
INFO:planet.runner:Updating feed http://rss.slashdot.org/Slashdot/slashdotLinux
INFO:planet.runner:Updating feed http://feeds.cyberciti.biz/Nixcraft-LinuxFreebsdSolarisTipsTricks
INFO:planet.runner:Updating feed http://www.reddit.com/r/linux/.rss
INFO:planet.runner:Updating feed http://feeds.feedburner.com/linuxtoday/linux
INFO:planet.runner:Loading cached data

Test the results in your favorite web-browser:
http://planet.cyberciti.biz/linuxnews/output/atom.html
OR
http://localhost/linuxnews/output/index.html
Test the RSS result in your favorite rss reader:
http://planet.cyberciti.biz/linuxnews/output/atom.html
OR
http://localhost/linuxnews/output/atom.html
Sample outputs:

References:

Planet venus project home page.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 3 comments… read them below or add one }

1 db15 December 15, 2012 at 3:14 pm

Hi, is there a way for pagionation in the Venus Planet? You know, if i want e.g. 50 latest feeds on first page, a oldest on the second page and go on.

Reply

2 nixCraft December 18, 2012 at 7:20 pm

Use items_per_page, see this page for more info.

Reply

3 db15 December 19, 2012 at 9:22 am

Ok, but how to show older feeds in template? items_per_page eg. limits to show 50 newest feeds, and I want to have 150 feeds, 50 feeds per page. Is there a way to add something to template that will have <> eg. to browse for newset to oldest feeds?

Reply

Leave a Comment

Tagged as: , , , , , , ,

Previous Faq:

Next Faq: