Skip to content

Instantly share code, notes, and snippets.

@malanjp
Created April 23, 2012 05:54
Show Gist options
  • Save malanjp/2469027 to your computer and use it in GitHub Desktop.
Save malanjp/2469027 to your computer and use it in GitHub Desktop.
TumblrのQuoteTextをGrowlに通知してみる
import gntp.notifier
import pumblr
growl = gntp.notifier.GrowlNotifier(
applicationName = "My Application Name",
notifications = ["New Messages"],
defaultNotifications = ["New Messages"],
)
growl.register()
api = pumblr.API(email='example@example.com', password='yourpassword')
data = api.dashboard(type='quote', num=5)
for p in data.posts:
if p.type == 'quote':
growl.notify(
noteType = "New Messages",
title = p.id,
description = p.quote_text,
icon = "http://example.com/icon.png",
sticky = False,
priority = 1,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment