向散居国外的人发布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”迁移

  1. pod_feeder_v2的数据库模式与原始模式向后兼容,因此 您可以在现有的{{CD5}}文件(或什么)上指向脚本 你的电话)。

  2. 参数--title-tags--url-tags尚未结转 因为在实践中,它们通常会创建许多虚假的标记,而 “停止字词”功能很难实现。--user-agent当前不是 因为feedparser库不支持它而实现。

  3. 添加了几个新选项--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>

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带键的Selenium上的JAVA增量输入数   Java代码已编写,但运行后没有预期的输出   java如何存储文件数据行,并通过它的方法计算成字母,并在另一个文件中打印字母等级?   进行Web服务调用时eclipse中的java ClassNotFoundException   g.drawString()上的graphics2d Java“包装文本”+“自动字体大小”   任务不可序列化Java 1.8和Spark 2.1.1   使用流中现有servlet的JavaMuleESB   Java嵌套数组到递归方法的算法   java为垂直组添加背景   java有没有办法将类似CSV的文本字符串复制到2D数组?   java Android是否使用现有的XML布局将项目动态添加到ListView?   java JPA试图强迫我拥有一个名为“id”的属性和数据库列   java如何基于特定的数据集创建部分数据库转储?   java无法在暂停后恢复音频曲目   java在对象中存储字节数组,然后将其转换为ObjectOutputStream?(卡住了)   java获取SyndEntry的XML字符串值   java IText API将HTML文件转换为PDF格式和图像渲染问题   java我从我的oracle servlet中得到一个空白屏幕