Friendfeed ã®ã¨ã³ããªã Growl ã§è¡¨ç¤º
Friendfeed API ã python ãã使ãæ°è¦æ´æ°åã®ã¨ã³ããªã Growl ã«è¡¨ç¤ºããã¹ã¯ãªãããä½ã£ãã®ã§å ¬éã
friendfeed-api
http://code.google.com/p/friendfeed-api/
ããã©ã¤ãã©ãªãè½ã¨ãã¦ã㦠python ãã£ã¬ã¯ããªã® friendfeed.py ã使ç¨ã
èªåã® feed ãåãã®ã« remote key ãå¿
è¦ãªã®ã§ãfriendfeed ã«ãã°ã¤ã³ããã¾ã¾
https://friendfeed.com/account/api
ã«ã¢ã¯ã»ã¹ãã¦å
¥æã
python ãã Growl ã使ãæ¹æ³ã¯id:nishiohirokazuã®[http://d.hatena.ne.jp/nishiohirokazu/20080318/12
05833455:title=Pythonã§Growlãå©ã]ãåèã
Growl ã«è¡¨ç¤ºããç»åãããã¡ãã£ã¨ãµã¤ãºã大ããã®ãããã°ãããã ãã©ã
http://friendfeed.com/static/images/icons/internal.png
import time import datetime import Growl from friendfeed import FriendFeed def ffeed(nick, key): session = FriendFeed(auth_nickname=nick, auth_key=key) def homefeed(): return session.fetch_home_feed() return homefeed def main(): img = Growl.Image.imageFromPath('./internal.png') g = Growl.GrowlNotifier( applicationName='FFgrowl', notifications=['Entry'] ) g.register() recent_entry_time = datetime.datetime.now() homefeed = ffeed("user", "key") while True: feed = homefeed() for entry in feed["entries"]: if recent_entry_time < entry["published"]: g.notify( noteType='Entry', title='%s %s' % (entry["user"]["nickname"], entry["service"]["name"]), description=entry["title"].encode("latin-1"), icon=img, sticky=False) recent_entry_time = feed["entries"][0]["published"] time.sleep(60) if __name__ == "__main__": main()