Planet网志聚合器
Planet是一个网志聚合器,聚合RSS或Atom等的网志内容提供者为一个Web站点的工具,例如很多社区现在都有其成员的网志聚合站,
例如 Planet Fedora, Planet Gnome, 和Planet KDE。
为保持最低的系统资源占有率,Planet使用基于模版文件生成静态页面的方法而不是运行web脚本。当在Fedora上安装Planet包后,模板的样本存放于/usr/share/doc/planet-2.0/examples/,而相应的 CSS和图片存放于/usr/share/doc/planet-2.0/examples/output。
需要建立自己的Planet时,可以先拷贝模板样本和相应的CSS和图片,然后按照这个模板改进为自己的模板。在下面的Planet例子中,~/planet/template将作为模板文件存放的位置,而 ~/public_html/planet作为Planet输出的位置(CSS和图片以及生成的HTML/XML存放的位置):
$ mkdir -p planet ~/public_html/planet
$ cp /usr/share/doc/planet-2.0/examples/*tmpl /usr/share/doc/planet-2.0/examples/fancy/*tmpl ~/planet
$ cp -r /usr/share/doc/planet-2.0/examples/output/* ~/public_html/planet
下一步是创建一个配置文件,配置文件的例子为/usr/share/doc/planet-2.0/examples/; 下面是按照我们之前假定的路径(位置)要求的配置文件例子,
# Configuration file for planet
# Basic planet details
[Planet]
name = myPlanet
link = http://concord3.proximity.on.ca/~chris/planet/
owner_name = Chris Tyler
owner_email = chris.tyler@example.com
# Directory for cached feed data
cache_directory = /home/chris/planet/cache
# Directory for output HTML and XML files
output_dir = /home/chris/public_html/planet
# List of template files to be processed
template_files = planet/template/atom.xml.tmpl planet/template/foafroll.xml.tmpl planet/template/index.html.tmpl planet/template/opml.xml.tmpl planet/template/rss10.xml.tmpl planet/template/rss20.xml.tmpl
# Feeds to be processed
[http://blog.chris.tylers.info/index.php?feeds]
name = Chris Tyler
face = images/chris_tyler_hackergotchi.png
[http://planet.fedoraproject.org/atom.xml]
name = Planet Fedora
[http://rss.slashdot.org/Slashdot/slashdot]
name = Slashdot
[http://dailypackage.fedorabook.com/index.php?feeds]
name = Fedora Daily Package
保存该文件到合适的位置(如, ~/planet/config.ini)然后运行planet ~/planet/config.ini(配置文件作为命令参数):
$ planet ~/planet/config.ini
如果结果看起来不错, 就可以用crontab 把这个任务固定下来周期的执行以便定时更新聚合新闻:
安装命令: yum install planet$ (crontab -l;echo "50 * * * * /usr/bin/planet $HOME/planet/config.ini")|crontab
图形安装: 浏览模式下没有列出,使用搜索标签搜索Planet
菜单位置: 无(一般使用命令行或cron任务运行)
命令: /usr/bin/planet
网站: http://planetplanet.org
Comments