{"action":"created","comment":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/comments/30494001","id":30494001,"diff_hunk":"@@ -2,11 +2,22 @@\n \"\"\"\n Display system RAM and CPU utilization.\n \n-NOTE: If you want py3status to show you your CPU temperature,\n-change value of CPUTEMP into True in Py3status class - CPUInfo function\n-and REMEMBER that you must install lm_sensors if you want CPU temp!\n-\n-@author Shahin Azad <ishahinism at Gmail>\n+Confiuration parameters:\n+    - format: output format string\n+    - med_threshold: percent to consider CPU or RAM usage as 'medium load'","path":"py3status/modules/sysdata.py","position":11,"original_position":11,"commit_id":"95da611ba024db9f0368b32a294f9742c08b48e6","original_commit_id":"95da611ba024db9f0368b32a294f9742c08b48e6","user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"body":"please sort the parameters alphabetically","created_at":"2015-05-18T09:48:40Z","updated_at":"2015-05-18T09:48:40Z","html_url":"https://github.com/ultrabug/py3status/pull/100#discussion_r30494001","pull_request_url":"https://api.github.com/repos/ultrabug/py3status/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/comments/30494001"},"html":{"href":"https://github.com/ultrabug/py3status/pull/100#discussion_r30494001"},"pull_request":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/100","id":35568025,"html_url":"https://github.com/ultrabug/py3status/pull/100","diff_url":"https://github.com/ultrabug/py3status/pull/100.diff","patch_url":"https://github.com/ultrabug/py3status/pull/100.patch","issue_url":"https://api.github.com/repos/ultrabug/py3status/issues/100","number":100,"state":"open","locked":false,"title":"add format string support for sysdata module, refactor and cleanup","user":{"login":"shrimpza","id":6191747,"avatar_url":"https://avatars.githubusercontent.com/u/6191747?v=3","gravatar_id":"","url":"https://api.github.com/users/shrimpza","html_url":"https://github.com/shrimpza","followers_url":"https://api.github.com/users/shrimpza/followers","following_url":"https://api.github.com/users/shrimpza/following{/other_user}","gists_url":"https://api.github.com/users/shrimpza/gists{/gist_id}","starred_url":"https://api.github.com/users/shrimpza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrimpza/subscriptions","organizations_url":"https://api.github.com/users/shrimpza/orgs","repos_url":"https://api.github.com/users/shrimpza/repos","events_url":"https://api.github.com/users/shrimpza/events{/privacy}","received_events_url":"https://api.github.com/users/shrimpza/received_events","type":"User","site_admin":false},"body":"In response to issue #98 - add format string support for the `sysdata` module.\r\n\r\nI've also done a bunch of other (what I think to be) general cleanup, particularly no longer relying on the hard-coded `CPUTEMP` option (it now relies on the presence of the `{cpu_temp}` format string variable), the consolidation of the output into a single method (formatting now makes output easier to manage), and I've added or tweaked several docstrings.\r\n\r\nMy only point of concern, not being a particularly proficient Python programmer (my first Python code in many many years), which could be reviewed by someone with a bit more relevant experience, is the extraction of the CPU temperature within the `cpuTemp` method. It may be a bit amateurish, but it seems to work as expected :).\r\n\r\nI actually feel like including temperature in this module is a bit of a mix of concerns, and there should probably be a dedicated `sensors` module - but I was reluctant to remove functionality from existing code.","created_at":"2015-05-16T08:44:17Z","updated_at":"2015-05-18T09:48:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ae90a3c8c4ef39a5ce4a02430a24a0a8511870b","assignee":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ultrabug/py3status/pulls/100/commits","review_comments_url":"https://api.github.com/repos/ultrabug/py3status/pulls/100/comments","review_comment_url":"https://api.github.com/repos/ultrabug/py3status/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ultrabug/py3status/issues/100/comments","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/95da611ba024db9f0368b32a294f9742c08b48e6","head":{"label":"shrimpza:master","ref":"master","sha":"95da611ba024db9f0368b32a294f9742c08b48e6","user":{"login":"shrimpza","id":6191747,"avatar_url":"https://avatars.githubusercontent.com/u/6191747?v=3","gravatar_id":"","url":"https://api.github.com/users/shrimpza","html_url":"https://github.com/shrimpza","followers_url":"https://api.github.com/users/shrimpza/followers","following_url":"https://api.github.com/users/shrimpza/following{/other_user}","gists_url":"https://api.github.com/users/shrimpza/gists{/gist_id}","starred_url":"https://api.github.com/users/shrimpza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrimpza/subscriptions","organizations_url":"https://api.github.com/users/shrimpza/orgs","repos_url":"https://api.github.com/users/shrimpza/repos","events_url":"https://api.github.com/users/shrimpza/events{/privacy}","received_events_url":"https://api.github.com/users/shrimpza/received_events","type":"User","site_admin":false},"repo":{"id":35713343,"name":"py3status","full_name":"shrimpza/py3status","owner":{"login":"shrimpza","id":6191747,"avatar_url":"https://avatars.githubusercontent.com/u/6191747?v=3","gravatar_id":"","url":"https://api.github.com/users/shrimpza","html_url":"https://github.com/shrimpza","followers_url":"https://api.github.com/users/shrimpza/followers","following_url":"https://api.github.com/users/shrimpza/following{/other_user}","gists_url":"https://api.github.com/users/shrimpza/gists{/gist_id}","starred_url":"https://api.github.com/users/shrimpza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrimpza/subscriptions","organizations_url":"https://api.github.com/users/shrimpza/orgs","repos_url":"https://api.github.com/users/shrimpza/repos","events_url":"https://api.github.com/users/shrimpza/events{/privacy}","received_events_url":"https://api.github.com/users/shrimpza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shrimpza/py3status","description":"py3status is an extensible i3status wrapper written in python","fork":true,"url":"https://api.github.com/repos/shrimpza/py3status","forks_url":"https://api.github.com/repos/shrimpza/py3status/forks","keys_url":"https://api.github.com/repos/shrimpza/py3status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shrimpza/py3status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shrimpza/py3status/teams","hooks_url":"https://api.github.com/repos/shrimpza/py3status/hooks","issue_events_url":"https://api.github.com/repos/shrimpza/py3status/issues/events{/number}","events_url":"https://api.github.com/repos/shrimpza/py3status/events","assignees_url":"https://api.github.com/repos/shrimpza/py3status/assignees{/user}","branches_url":"https://api.github.com/repos/shrimpza/py3status/branches{/branch}","tags_url":"https://api.github.com/repos/shrimpza/py3status/tags","blobs_url":"https://api.github.com/repos/shrimpza/py3status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shrimpza/py3status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shrimpza/py3status/git/refs{/sha}","trees_url":"https://api.github.com/repos/shrimpza/py3status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shrimpza/py3status/statuses/{sha}","languages_url":"https://api.github.com/repos/shrimpza/py3status/languages","stargazers_url":"https://api.github.com/repos/shrimpza/py3status/stargazers","contributors_url":"https://api.github.com/repos/shrimpza/py3status/contributors","subscribers_url":"https://api.github.com/repos/shrimpza/py3status/subscribers","subscription_url":"https://api.github.com/repos/shrimpza/py3status/subscription","commits_url":"https://api.github.com/repos/shrimpza/py3status/commits{/sha}","git_commits_url":"https://api.github.com/repos/shrimpza/py3status/git/commits{/sha}","comments_url":"https://api.github.com/repos/shrimpza/py3status/comments{/number}","issue_comment_url":"https://api.github.com/repos/shrimpza/py3status/issues/comments{/number}","contents_url":"https://api.github.com/repos/shrimpza/py3status/contents/{+path}","compare_url":"https://api.github.com/repos/shrimpza/py3status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shrimpza/py3status/merges","archive_url":"https://api.github.com/repos/shrimpza/py3status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shrimpza/py3status/downloads","issues_url":"https://api.github.com/repos/shrimpza/py3status/issues{/number}","pulls_url":"https://api.github.com/repos/shrimpza/py3status/pulls{/number}","milestones_url":"https://api.github.com/repos/shrimpza/py3status/milestones{/number}","notifications_url":"https://api.github.com/repos/shrimpza/py3status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shrimpza/py3status/labels{/name}","releases_url":"https://api.github.com/repos/shrimpza/py3status/releases{/id}","created_at":"2015-05-16T06:53:02Z","updated_at":"2015-05-16T06:53:03Z","pushed_at":"2015-05-16T08:31:18Z","git_url":"git://github.com/shrimpza/py3status.git","ssh_url":"git@github.com:shrimpza/py3status.git","clone_url":"https://github.com/shrimpza/py3status.git","svn_url":"https://github.com/shrimpza/py3status","homepage":"","size":2274,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ultrabug:master","ref":"master","sha":"722913641ca01e55195cd01f6f730e5d7bb8c810","user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"repo":{"id":8292338,"name":"py3status","full_name":"ultrabug/py3status","owner":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ultrabug/py3status","description":"py3status is an extensible i3status wrapper written in python","fork":false,"url":"https://api.github.com/repos/ultrabug/py3status","forks_url":"https://api.github.com/repos/ultrabug/py3status/forks","keys_url":"https://api.github.com/repos/ultrabug/py3status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ultrabug/py3status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ultrabug/py3status/teams","hooks_url":"https://api.github.com/repos/ultrabug/py3status/hooks","issue_events_url":"https://api.github.com/repos/ultrabug/py3status/issues/events{/number}","events_url":"https://api.github.com/repos/ultrabug/py3status/events","assignees_url":"https://api.github.com/repos/ultrabug/py3status/assignees{/user}","branches_url":"https://api.github.com/repos/ultrabug/py3status/branches{/branch}","tags_url":"https://api.github.com/repos/ultrabug/py3status/tags","blobs_url":"https://api.github.com/repos/ultrabug/py3status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ultrabug/py3status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ultrabug/py3status/git/refs{/sha}","trees_url":"https://api.github.com/repos/ultrabug/py3status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/{sha}","languages_url":"https://api.github.com/repos/ultrabug/py3status/languages","stargazers_url":"https://api.github.com/repos/ultrabug/py3status/stargazers","contributors_url":"https://api.github.com/repos/ultrabug/py3status/contributors","subscribers_url":"https://api.github.com/repos/ultrabug/py3status/subscribers","subscription_url":"https://api.github.com/repos/ultrabug/py3status/subscription","commits_url":"https://api.github.com/repos/ultrabug/py3status/commits{/sha}","git_commits_url":"https://api.github.com/repos/ultrabug/py3status/git/commits{/sha}","comments_url":"https://api.github.com/repos/ultrabug/py3status/comments{/number}","issue_comment_url":"https://api.github.com/repos/ultrabug/py3status/issues/comments{/number}","contents_url":"https://api.github.com/repos/ultrabug/py3status/contents/{+path}","compare_url":"https://api.github.com/repos/ultrabug/py3status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ultrabug/py3status/merges","archive_url":"https://api.github.com/repos/ultrabug/py3status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ultrabug/py3status/downloads","issues_url":"https://api.github.com/repos/ultrabug/py3status/issues{/number}","pulls_url":"https://api.github.com/repos/ultrabug/py3status/pulls{/number}","milestones_url":"https://api.github.com/repos/ultrabug/py3status/milestones{/number}","notifications_url":"https://api.github.com/repos/ultrabug/py3status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ultrabug/py3status/labels{/name}","releases_url":"https://api.github.com/repos/ultrabug/py3status/releases{/id}","created_at":"2013-02-19T14:59:13Z","updated_at":"2015-05-16T21:06:53Z","pushed_at":"2015-05-16T08:44:18Z","git_url":"git://github.com/ultrabug/py3status.git","ssh_url":"git@github.com:ultrabug/py3status.git","clone_url":"https://github.com/ultrabug/py3status.git","svn_url":"https://github.com/ultrabug/py3status","homepage":"","size":2274,"stargazers_count":147,"watchers_count":147,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":6,"forks":44,"open_issues":6,"watchers":147,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/100"},"html":{"href":"https://github.com/ultrabug/py3status/pull/100"},"issue":{"href":"https://api.github.com/repos/ultrabug/py3status/issues/100"},"comments":{"href":"https://api.github.com/repos/ultrabug/py3status/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/ultrabug/py3status/statuses/95da611ba024db9f0368b32a294f9742c08b48e6"}}}}