将源转换为邮件目录
feed2maildir的Python项目详细描述
在您喜爱的兼容maildir的电子邮件客户端中阅读rss/atom提要。
要求
- Python2.7+/3.2+
- feedparser
- python-dateutil
用法
只需运行feed2maildir,setup.py应该将其放在$path中。 您需要一个json配置文件,位于$HOME/.f2mrc,它看起来像 这个:
{"db":"~/.f2mdb","maildir":"~/mail/feeds","feeds":{"Coding Horror":"http://feeds.feedburner.com/codinghorror/","Commit Strip":"http://www.commitstrip.com/en/feed/","XKCD":"http://xkcd.com/rss.xml","What If?":"http://what-if.xkcd.com/feed.atom","Dilbert":"http://feed.dilbert.com/dilbert/daily_strip?format=xml","BSDNow":"http://feeds.feedburner.com/BsdNowOgg"}}
注意,dict中的最后一个元素不能后跟逗号,因为 python的json.loads()这样说。
有一组命令行参数可覆盖配置文件:
optional arguments: -h, --help show this help message and exit -c <file> override the config file location (~/.f2mrc) -d <file> override the database file location (~/.f2mdb) -m <dir> override the maildir location (None) -s strip HTML from the feeds -l just write the links without the update
要定期检查更新,只需将其放入cron中,每小时运行一次 差不多吧。