如何在 Debian 或 Ubuntu Linux 下设置“Planet Venus”来下载网站发布的新闻源 (RSS) 并将其内容聚合到一个组合源中?如何在 Debian 或 Ubuntu Linux 上设置名为 Planet Venus 的 Atom/RSS 提要聚合器?
教程详情 | |
---|---|
难度级别 | 中间的 |
根权限 | 是的 |
要求 | Debian/Ubuntu/Python 网络服务器 |
美东时间。阅读时间 | 3分钟 |
Venus 是一个 Atom/RSS 提要聚合器。它是一个免费且开源的软件。它是用 Python 编写的。本页展示了如何在 Debian 或 Ubuntu Linux 上安装或设置 Planet Venus。从项目主页:
Planet 是一个灵活的 Feed 聚合器。它下载网站发布的新闻提要,并将其内容聚合到一个组合提要中,最新新闻优先。它使用 Mark Pilgrim 的 Universal Feed Parser 来读取 CDF、RDF、RSS 和 Atom feed;伦纳德理查森的美丽汤纠正标记问题;Tomas Styblo 的模板引擎或 Daniel Viellard 的 XSLT 实现可以以您能想到的任何格式输出静态文件。
您可以使用此工具轻松组合两个或多个提要,即该软件充当“提要聚合器”。
Debian/Ubuntu:设置 Planet Venus 作为 feed 聚合器
以下指令经过测试:
- Ubuntu Linux 12.04 LTS。
- Ubuntu Linux 16.0.4 LTS。
- Ubuntu Linux 18.0.4 LTS。
- Debian Linux 8 和 9(最新)稳定。
如何在 Debian 或 Ubuntu Linux 上安装 Planet Venus
键入以下apt-get 命令/ apt 命令来安装相同的命令:
或者
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install planet-venus
$ sudo apt update && sudo apt install planet-venus
我如何使用金星?
键入以下命令,在 /home/apache/domains/planet.example.com/http 中为planet.example.com 创建默认星球:
要编辑这个名为 linuxnews 的默认星球,请输入:
示例输出:
$ mkdir -p /home/apache/domains/planet.example.com/http
$ cd /home/apache/domains/planet.example.com/http
$ planet --create linuxnews
$ cd linuxnews
$ vi planet.ini
# 全局配置 [星球] name = example Linux News Planet链接 = http://planet.example.com/owner_name = exampleowner_email = webmaster@server1.example.comoutput_theme =主题cache_directory =缓存output_dir =输出feed_timeout = 20 items_per_page = 60 log_level = DEBUG # RSS/Feed 订阅配置 # [ Feed-RSS-URL ] # name =此处的网站名称 [ http://feeds.example.com/example-LinuxFreebsdSolarisTipsTricks ] name =示例:博客格式的 Linux 技巧、技巧、教程和想法 [ http://rss.slashdot.org/Slashdot/slashdotLinux ] name = Slashdot 的 Linux 故事 [ http://www.reddit.com/r/linux/.rss ] 名称 = Reddit /r/Linux
保存并关闭文件。
立即构建默认星球
键入以下命令:
$ planet --verbose planet.ini
示例输出:
信息:planet.runner:套接字超时设置为 20 秒 信息:planet.runner:构建工作队列 信息:planet.runner:更新提要 http://rss.slashdot.org/Slashdot/slashdotLinux 信息:planet.runner:更新提要 http://feeds.example.com/example-LinuxFreebsdSolarisTipsTricks 信息:planet.runner:更新提要 http://www.reddit.com/r/linux/.rss 信息:planet.runner:加载缓存数据
在您最喜欢的网络浏览器中测试结果:
http://planet.example.com/linuxnews/output/atom.html
或者
http://localhost/linuxnews/output/index.html
在您喜欢的 RSS 阅读器中测试 RSS 结果:
http://planet.example.com/linuxnews/output/atom.html
或者
http://localhost/linuxnews/output/atom.html
示例输出:
图01。HTML输出
图02:RSS阅读器中的Atom.xml
结论
您刚刚学习了如何在 Debian 或 Ubuntu Linux 上安装“Planet Venus”软件。这是一款很棒的“新闻之河”提要阅读器。它下载网站发布的新闻提要,并将其内容聚合到一个组合提要中,最新新闻优先。欲了解更多信息,请参阅此处的“金星行星”项目主页。