将源转换为邮件目录

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中,每小时运行一次 差不多吧。

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

推荐PyPI第三方库


热门话题
java从arraylist元素调用方法   开关案例中的java错误。。。代码不返回任何内容   在TeamCity:Task:app:processDebugResources上使用Gradle进行构建时java失败   Android Studio的java Gradle同步(SDK)问题   小程序中的java Tic Tack Toe游戏:图像不工作   火柴ABC12;10;250.3使用regexjava   java如何在任务栏的系统托盘中隐藏JFrame   java ListProperty<T>与ObjectProperty<ObservableList<T>>   java如何将resultset数据转换为我的对象。以下是数据的格式   JavaJSF2和oracle   java Junit和EasyMock意外失败   使用java从生成的xml文档中删除xml声明   使用high ResultSet时某些表的java ArrayIndexOutOfBoundsException。fetchSize()   java检测点击按钮   while循环不会结束(Java)   java如何通过JUNIT将数据与文件进行比较?   hadoop Hive Java API寄存器JAR