向散居国外的人发布rss/atom提要的实用程序*
pod-feeder-v2的Python项目详细描述
吊舱给料机v2
向海外侨民发布RSS/Atom订阅源*
这是一个轻量级的、可定制的“bot”脚本,用于获取rss/atom提要和 重新发布到散居社会网络。贴在这里没有 保修,供公众使用。
v2是对 original pod_feeder脚本 用Perl编写(很差),不再受支持。迁移到此版本 是推荐的。
安装
2号舱需要Python3号。您可以使用pip轻松安装依赖项:
全系统
sudo pip3 install pod-feeder-v2
个人用户
pip3 install --user pod-feeder-v2
以非特权用户身份安装时,请确保您的$PATH
从Pod_Feeder“Classic”迁移
pod_feeder_v2的数据库模式与原始模式向后兼容,因此 您可以在现有的{{CD5}}文件(或什么)上指向脚本 你的电话)。
参数
--title-tags
和--url-tags
尚未结转 因为在实践中,它们通常会创建许多虚假的标记,而 “停止字词”功能很难实现。--user-agent
当前不是 因为feedparser库不支持它而实现。添加了几个新选项
--summary
、--debug
和--quiet
。
用法
此脚本旨在作为cron作业运行,其外观可能如下:
@hourly pod-feeder --feed-id myfeed --feed-url http://example.com/feeds/rss --pod-url https://diaspora.example.com --username user --password ******** --quiet
还有一个数据库清理程序脚本,您可以随时运行 控制数据库大小:
@weekly pf-clean-db feed.db > /dev/null 2>&1
usage: pod-feeder [-h] [--aspect-id ASPECT_ID] [--auto-tag AUTO_TAG]
[--category-tags] [--database DATABASE] [--embed-image]
--feed-id FEED_ID --feed-url FEED_URL
[--ignore-tag IGNORE_TAG] [--limit LIMIT] [--no-branding]
--pod-url POD_URL [--post-raw-link] [--timeout TIMEOUT]
[--username USERNAME] [--via VIA] [--summary | --full]
(--password PASSWORD | --fetch-only) [--debug | --quiet]
optional arguments:
-h, --help show this help message and exit
--aspect-id ASPECT_ID
Numerical aspect ID to share with. May be specified
multiple times (default: 'public')
--auto-tag AUTO_TAG Hashtags to add to all posts. May be specified
multiple times
--category-tags Automatically hashtagify RSS item 'categories' if any
--database DATABASE The file to store feed data (default: 'feed.db')
--embed-image Embed an image in the post if a link exists
--feed-id FEED_ID An arbitrary label for this feed
--feed-url FEED_URL The feed URL
--ignore-tag IGNORE_TAG
Hashtag to filter out. May be specified multiple times
--limit LIMIT Only post n items per script run, to prevent post-
spamming
--no-branding Do not include 'via pod_feeder_v2' footer to posts
--pod-url POD_URL The pod URL
--post-raw-link Post the raw link instead of hyperlinking the article
title
--timeout TIMEOUT How many hours to keep re-trying failed posts (default
72)
--username USERNAME The D* login username
--via VIA Sets the 'posted via' footer text (default:
'pod_feeder_v2')
--summary Post the summary text of the feed item
--full, --body Post the full text of the feed item
--password PASSWORD The D* user password
--fetch-only Don't publish to Diaspora, queue the new feed items
for later
--debug Show debugging output
--quiet Suppress normal output
youtube feeds上的一条注释
可以使用以下URL格式发布YouTube频道的订阅源:
https://www.youtube.com/feeds/videos.xml?channel_id=<channel id>