{"action":"created","comment":{"url":"https://api.github.com/repos/thp/urlwatch/pulls/comments/32498253","id":32498253,"diff_hunk":"@@ -236,12 +247,40 @@ if __name__ == '__main__':\n             cache_dir = options.cache\n             log.info('using {} as cache directory'.format(cache_dir))\n                 \n+    if options.pushover_file:\n+\toptions.pushover = True\n             \n     # Created all needed folders\n     for needed_dir in (urlwatch_dir, cache_dir, scripts_dir):\n         if not os.path.isdir(needed_dir):\n             os.makedirs(needed_dir)\n \n+    if options.pushover:\n+        if chump is None:\n+            log.error('chump not installed')\n+            print 'Error: You need chump install to use the -P switch'\n+            sys.exit(1)\n+\n+        if options.pushover_file:\n+            if os.path.isfile(options.pushover_file):\n+                pushover_conf = options.pushover_file\n+            else:\n+                log.error('No such file: %s' % options.pushover_file)","path":"urlwatch","position":65,"original_position":65,"commit_id":"13fc4c057392fb9b7b786d6248cffd6e1e5958a3","original_commit_id":"13fc4c057392fb9b7b786d6248cffd6e1e5958a3","user":{"login":"thp","id":135241,"avatar_url":"https://avatars.githubusercontent.com/u/135241?v=3","gravatar_id":"","url":"https://api.github.com/users/thp","html_url":"https://github.com/thp","followers_url":"https://api.github.com/users/thp/followers","following_url":"https://api.github.com/users/thp/following{/other_user}","gists_url":"https://api.github.com/users/thp/gists{/gist_id}","starred_url":"https://api.github.com/users/thp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thp/subscriptions","organizations_url":"https://api.github.com/users/thp/orgs","repos_url":"https://api.github.com/users/thp/repos","events_url":"https://api.github.com/users/thp/events{/privacy}","received_events_url":"https://api.github.com/users/thp/received_events","type":"User","site_admin":false},"body":"Same here:\r\n\r\n```\r\nlog.error('No such file: %s', options.pushover_file)\r\n```","created_at":"2015-06-16T07:59:16Z","updated_at":"2015-06-16T07:59:16Z","html_url":"https://github.com/thp/urlwatch/pull/18#discussion_r32498253","pull_request_url":"https://api.github.com/repos/thp/urlwatch/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/thp/urlwatch/pulls/comments/32498253"},"html":{"href":"https://github.com/thp/urlwatch/pull/18#discussion_r32498253"},"pull_request":{"href":"https://api.github.com/repos/thp/urlwatch/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/thp/urlwatch/pulls/18","id":36091372,"html_url":"https://github.com/thp/urlwatch/pull/18","diff_url":"https://github.com/thp/urlwatch/pull/18.diff","patch_url":"https://github.com/thp/urlwatch/pull/18.patch","issue_url":"https://api.github.com/repos/thp/urlwatch/issues/18","number":18,"state":"open","locked":false,"title":"Added support for web change alerts via pushover","user":{"login":"atiro","id":9074093,"avatar_url":"https://avatars.githubusercontent.com/u/9074093?v=3","gravatar_id":"","url":"https://api.github.com/users/atiro","html_url":"https://github.com/atiro","followers_url":"https://api.github.com/users/atiro/followers","following_url":"https://api.github.com/users/atiro/following{/other_user}","gists_url":"https://api.github.com/users/atiro/gists{/gist_id}","starred_url":"https://api.github.com/users/atiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atiro/subscriptions","organizations_url":"https://api.github.com/users/atiro/orgs","repos_url":"https://api.github.com/users/atiro/repos","events_url":"https://api.github.com/users/atiro/events{/privacy}","received_events_url":"https://api.github.com/users/atiro/received_events","type":"User","site_admin":false},"body":"Copied from the XMPP patch, support for Pushover API to send notifications about website changes. Pushover config file needs to have App Key & User Key (created with a pushover account)","created_at":"2015-05-23T18:14:08Z","updated_at":"2015-06-16T07:59:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b7c6ec46d846f7f9114436d9fac2e04717ede23","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thp/urlwatch/pulls/18/commits","review_comments_url":"https://api.github.com/repos/thp/urlwatch/pulls/18/comments","review_comment_url":"https://api.github.com/repos/thp/urlwatch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thp/urlwatch/issues/18/comments","statuses_url":"https://api.github.com/repos/thp/urlwatch/statuses/13fc4c057392fb9b7b786d6248cffd6e1e5958a3","head":{"label":"atiro:pushover","ref":"pushover","sha":"13fc4c057392fb9b7b786d6248cffd6e1e5958a3","user":{"login":"atiro","id":9074093,"avatar_url":"https://avatars.githubusercontent.com/u/9074093?v=3","gravatar_id":"","url":"https://api.github.com/users/atiro","html_url":"https://github.com/atiro","followers_url":"https://api.github.com/users/atiro/followers","following_url":"https://api.github.com/users/atiro/following{/other_user}","gists_url":"https://api.github.com/users/atiro/gists{/gist_id}","starred_url":"https://api.github.com/users/atiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atiro/subscriptions","organizations_url":"https://api.github.com/users/atiro/orgs","repos_url":"https://api.github.com/users/atiro/repos","events_url":"https://api.github.com/users/atiro/events{/privacy}","received_events_url":"https://api.github.com/users/atiro/received_events","type":"User","site_admin":false},"repo":{"id":36135159,"name":"urlwatch","full_name":"atiro/urlwatch","owner":{"login":"atiro","id":9074093,"avatar_url":"https://avatars.githubusercontent.com/u/9074093?v=3","gravatar_id":"","url":"https://api.github.com/users/atiro","html_url":"https://github.com/atiro","followers_url":"https://api.github.com/users/atiro/followers","following_url":"https://api.github.com/users/atiro/following{/other_user}","gists_url":"https://api.github.com/users/atiro/gists{/gist_id}","starred_url":"https://api.github.com/users/atiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atiro/subscriptions","organizations_url":"https://api.github.com/users/atiro/orgs","repos_url":"https://api.github.com/users/atiro/repos","events_url":"https://api.github.com/users/atiro/events{/privacy}","received_events_url":"https://api.github.com/users/atiro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atiro/urlwatch","description":"A tool for monitoring webpages for updates","fork":true,"url":"https://api.github.com/repos/atiro/urlwatch","forks_url":"https://api.github.com/repos/atiro/urlwatch/forks","keys_url":"https://api.github.com/repos/atiro/urlwatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atiro/urlwatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atiro/urlwatch/teams","hooks_url":"https://api.github.com/repos/atiro/urlwatch/hooks","issue_events_url":"https://api.github.com/repos/atiro/urlwatch/issues/events{/number}","events_url":"https://api.github.com/repos/atiro/urlwatch/events","assignees_url":"https://api.github.com/repos/atiro/urlwatch/assignees{/user}","branches_url":"https://api.github.com/repos/atiro/urlwatch/branches{/branch}","tags_url":"https://api.github.com/repos/atiro/urlwatch/tags","blobs_url":"https://api.github.com/repos/atiro/urlwatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atiro/urlwatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atiro/urlwatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/atiro/urlwatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atiro/urlwatch/statuses/{sha}","languages_url":"https://api.github.com/repos/atiro/urlwatch/languages","stargazers_url":"https://api.github.com/repos/atiro/urlwatch/stargazers","contributors_url":"https://api.github.com/repos/atiro/urlwatch/contributors","subscribers_url":"https://api.github.com/repos/atiro/urlwatch/subscribers","subscription_url":"https://api.github.com/repos/atiro/urlwatch/subscription","commits_url":"https://api.github.com/repos/atiro/urlwatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/atiro/urlwatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/atiro/urlwatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/atiro/urlwatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/atiro/urlwatch/contents/{+path}","compare_url":"https://api.github.com/repos/atiro/urlwatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atiro/urlwatch/merges","archive_url":"https://api.github.com/repos/atiro/urlwatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atiro/urlwatch/downloads","issues_url":"https://api.github.com/repos/atiro/urlwatch/issues{/number}","pulls_url":"https://api.github.com/repos/atiro/urlwatch/pulls{/number}","milestones_url":"https://api.github.com/repos/atiro/urlwatch/milestones{/number}","notifications_url":"https://api.github.com/repos/atiro/urlwatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atiro/urlwatch/labels{/name}","releases_url":"https://api.github.com/repos/atiro/urlwatch/releases{/id}","created_at":"2015-05-23T17:47:56Z","updated_at":"2015-05-23T17:47:58Z","pushed_at":"2015-06-14T16:34:51Z","git_url":"git://github.com/atiro/urlwatch.git","ssh_url":"git@github.com:atiro/urlwatch.git","clone_url":"https://github.com/atiro/urlwatch.git","svn_url":"https://github.com/atiro/urlwatch","homepage":"http://thp.io/2008/urlwatch/","size":165,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thp:master","ref":"master","sha":"dcf7314861b3eeecf182009759b9c38a8394b79a","user":{"login":"thp","id":135241,"avatar_url":"https://avatars.githubusercontent.com/u/135241?v=3","gravatar_id":"","url":"https://api.github.com/users/thp","html_url":"https://github.com/thp","followers_url":"https://api.github.com/users/thp/followers","following_url":"https://api.github.com/users/thp/following{/other_user}","gists_url":"https://api.github.com/users/thp/gists{/gist_id}","starred_url":"https://api.github.com/users/thp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thp/subscriptions","organizations_url":"https://api.github.com/users/thp/orgs","repos_url":"https://api.github.com/users/thp/repos","events_url":"https://api.github.com/users/thp/events{/privacy}","received_events_url":"https://api.github.com/users/thp/received_events","type":"User","site_admin":false},"repo":{"id":16354416,"name":"urlwatch","full_name":"thp/urlwatch","owner":{"login":"thp","id":135241,"avatar_url":"https://avatars.githubusercontent.com/u/135241?v=3","gravatar_id":"","url":"https://api.github.com/users/thp","html_url":"https://github.com/thp","followers_url":"https://api.github.com/users/thp/followers","following_url":"https://api.github.com/users/thp/following{/other_user}","gists_url":"https://api.github.com/users/thp/gists{/gist_id}","starred_url":"https://api.github.com/users/thp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thp/subscriptions","organizations_url":"https://api.github.com/users/thp/orgs","repos_url":"https://api.github.com/users/thp/repos","events_url":"https://api.github.com/users/thp/events{/privacy}","received_events_url":"https://api.github.com/users/thp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thp/urlwatch","description":"A tool for monitoring webpages for updates","fork":false,"url":"https://api.github.com/repos/thp/urlwatch","forks_url":"https://api.github.com/repos/thp/urlwatch/forks","keys_url":"https://api.github.com/repos/thp/urlwatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thp/urlwatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thp/urlwatch/teams","hooks_url":"https://api.github.com/repos/thp/urlwatch/hooks","issue_events_url":"https://api.github.com/repos/thp/urlwatch/issues/events{/number}","events_url":"https://api.github.com/repos/thp/urlwatch/events","assignees_url":"https://api.github.com/repos/thp/urlwatch/assignees{/user}","branches_url":"https://api.github.com/repos/thp/urlwatch/branches{/branch}","tags_url":"https://api.github.com/repos/thp/urlwatch/tags","blobs_url":"https://api.github.com/repos/thp/urlwatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thp/urlwatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thp/urlwatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/thp/urlwatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thp/urlwatch/statuses/{sha}","languages_url":"https://api.github.com/repos/thp/urlwatch/languages","stargazers_url":"https://api.github.com/repos/thp/urlwatch/stargazers","contributors_url":"https://api.github.com/repos/thp/urlwatch/contributors","subscribers_url":"https://api.github.com/repos/thp/urlwatch/subscribers","subscription_url":"https://api.github.com/repos/thp/urlwatch/subscription","commits_url":"https://api.github.com/repos/thp/urlwatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/thp/urlwatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/thp/urlwatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/thp/urlwatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/thp/urlwatch/contents/{+path}","compare_url":"https://api.github.com/repos/thp/urlwatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thp/urlwatch/merges","archive_url":"https://api.github.com/repos/thp/urlwatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thp/urlwatch/downloads","issues_url":"https://api.github.com/repos/thp/urlwatch/issues{/number}","pulls_url":"https://api.github.com/repos/thp/urlwatch/pulls{/number}","milestones_url":"https://api.github.com/repos/thp/urlwatch/milestones{/number}","notifications_url":"https://api.github.com/repos/thp/urlwatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thp/urlwatch/labels{/name}","releases_url":"https://api.github.com/repos/thp/urlwatch/releases{/id}","created_at":"2014-01-29T18:42:20Z","updated_at":"2015-06-10T06:13:07Z","pushed_at":"2015-06-14T16:34:51Z","git_url":"git://github.com/thp/urlwatch.git","ssh_url":"git@github.com:thp/urlwatch.git","clone_url":"https://github.com/thp/urlwatch.git","svn_url":"https://github.com/thp/urlwatch","homepage":"http://thp.io/2008/urlwatch/","size":351,"stargazers_count":102,"watchers_count":102,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":6,"forks":29,"open_issues":6,"watchers":102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thp/urlwatch/pulls/18"},"html":{"href":"https://github.com/thp/urlwatch/pull/18"},"issue":{"href":"https://api.github.com/repos/thp/urlwatch/issues/18"},"comments":{"href":"https://api.github.com/repos/thp/urlwatch/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/thp/urlwatch/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/thp/urlwatch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thp/urlwatch/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/thp/urlwatch/statuses/13fc4c057392fb9b7b786d6248cffd6e1e5958a3"}}}}