imom0

给Picky添加了PubSubHubbub支持。

  •  
  •   imom0 · Oct 26, 2010 · 6993 views
    This topic created in 5735 days ago, the information mentioned may be changed or developed.
    给Picky添加了PubSubHubbub支持。
    什么是PubSubHubbub? http://code.google.com/p/pubsubhubbub/

    PubSubHubbub是资讯的流通变得更实时。

    需要改动Picky的地方不多。

    1.改动 Atom or RSS XML file

    在 /tpl/shared/index.xml 里找到

    code:

    <link rel="self" type="application/atom+xml" href="http://{{ site_domain }}/index.xml" />
    这一行,后面添加:

    code:

    <link rel="hub" href="http://pubsubhubbub.appspot.com/" />
    2.Ping the hub

    在 /writer.py 里找到 class WriterSynchronizeHandler,Ping Google Blog Search那个注释后面有这样一行:

    code:

    result = urlfetch.fetch(google_ping)
    在下面添加:

    code:

    hub_field = {"hub.mode":"publish","hub.url":"http://imimom0.appspot.com/index.xml"}
    hub_ping = urlfetch.fetch(url='http://pubsubhubbub.appspot.com/',payload=urllib.urlencode(hub_field),method=urlfetch.POST)

    上传后测试是否有效果,Gtalk/XMPP添加 [email protected] 机器人为好友,然后向它发送消息,内容为 "/subscribe http://imimom0.appspot.com/index.xml"。发送一篇测试日志,看是否有通知。

    http://imimom0.appspot.com/add-pubsubhubbub-feed-support-for-picky
    2 replies    1970-01-01 08:00:00 +08:00
    billychow
        1
    billychow  
       Oct 26, 2010
    可惜目前只有 GG 支持,twitter, facebook 等还是只支持 pull,不支持 push...
    claliu
        2
    claliu  
       Oct 26, 2010
    希望 @Livid 能够看到这个 post 如果可能的话 加到 @Livid 的 todo list
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   936 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 20:50 · PVG 04:50 · LAX 13:50 · JFK 16:50
    ♥ Do have faith in what you're doing.