通过rss或irc(使用irker)通知当前事件
rtorrent-notif的Python项目详细描述
说明
rtorrent notify旨在成为一个非常简单的工具来通知用户与rtorrent相关的事件。 它实际上可以用于其他类型的事件,通常是通用的。
运行
如果已安装,则可以运行rtorrent-notify。 否则,可以从python -m rtorrentnotify开始。
升级
如果从rtorrent2rss升级,则由于格式不兼容,事件数据库将被删除。
要求
- Pyrss2gen
- argparse(或python 2.7)
- 在本地主机上运行的irkerd服务器(可选,仅当您需要IRC通知时)
配置
将此添加到.rtorrent.rc:
system.method.set_key = event.download.finished,rtnfy_finished,"execute=rtorrent-notify,FINISH,$d.get_base_path=" system.method.set_key = event.download.inserted_new,rtnfy_inserted,"execute=~/rtorrent-notify/rtorrent-notify,INSERT,$d.get_name="
对于较旧版本的Rtorrent(0.8.4之前的版本):
on_finished = rtnfy_finished,"execute=rtorrent-notify,FINISH,$d.get_base_path=" on_start = rtnfy_started,"execute=rtorrent-notify,START,$d.get_name="
除非指定它们的位置,否则文件(rtorrent-notify.db和rtorrent-notify.xml)将写入主目录。有关详细信息,请启动rtorrent-notify-h。
FINISH和START只是字符串,您可以更改它们。
一些提示:
- 还有其他你可能感兴趣的活动。由于没有文档,您可以在rtorrent的源代码中尝试grep for event.。
- get_base_path不能与“inserted”事件一起使用,您可以使用get_name。
- 您将在ui/download.cc 中找到要使用的属性列表
运行rtorrent-notify-h可获得rtorrent notify命令的完整帮助。
示例
一些选项的高级用法是:
"execute=rtorrent-notify,-r,~/public_html/feed.xml,-n,irc://chat.freenode.net/mynick,FINISH,$d.get_base_path="
- 目标RSS源已从默认设置更改。
- 这还会向freenode nickmynick发送通知。-n被使用,而不是-iirc://chat.freenode.net/mynick,isnick,因为rtorrent的配置已经使用了,字符。
- 可以通过-iirc://chat.freenode.net/mychannel向频道发送通知。