Skip to content

Commit

Permalink
Few more PEP8 fixes and a quick usage note
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Palmer committed Jun 14, 2015
1 parent 8b0f1cf commit 13fc4c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ A: Add your password to keyring using:

urlwatch -s smtp.example.com:587 -f alice@example.com -t bob@example.com --tls --auth ...

Q: How do I receive Pushover notifications that a website has changed
A: You will need a pushover account, and to register this programme with your
Pushover account to receive a unique API key. Create a pushover.conf file
in ~/.urlwatch ( in standard Python config format) as follows:

[App]
key = [YOUR APP KEY]

[User]
key = [YOUR USER KEY]

and tell urlwatch to use this (enabling pushover notifications) with
-P ~/.urlwatch/pushover.conf


CONTACT
-------
Expand Down
11 changes: 5 additions & 6 deletions urlwatch
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,15 @@ if __name__ == '__main__':
if not options.quiet:
print short_summary

if(options.pushover):
if options.pushover:
try:
app = chump.Application(pushover_app_key)
user = app.get_user(pushover_user_key)
message = user.create_message(
title='Website Change Detected',
message=short_summary,
html=True,
sound='spacealarm'
)
title='Website Change Detected',
message=short_summary,
html=True,
sound='spacealarm')
message.send()
except:
log.info('Failed to send update message via pushover')
Expand Down

0 comments on commit 13fc4c0

Please sign in to comment.