{"action":"created","comment":{"url":"https://api.github.com/repos/openstenoproject/plover/pulls/comments/234438314","pull_request_review_id":176083983,"id":234438314,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDQzODMxNA==","diff_hunk":"@@ -238,6 +243,15 @@ def on_disable_output(self):\n     def on_configure(self):\n         self._configure()\n \n+    def on_open_config_folder(self):\n+        # webbrowser.open does not work on Mac so we need OS-specific logic\n+        if sys.platform.startswith('win'):\n+            os.startfile(CONFIG_DIR)\n+        elif sys.platform.startswith('linux'):\n+            subprocess.run(['xdg-open', CONFIG_DIR])","path":"plover/gui_qt/main_window.py","position":35,"original_position":35,"commit_id":"4b42ad20d3e5ea125f17d51d1747600753aaf3fd","original_commit_id":"4b42ad20d3e5ea125f17d51d1747600753aaf3fd","user":{"login":"benoit-pierre","id":5104286,"node_id":"MDQ6VXNlcjUxMDQyODY=","avatar_url":"https://avatars1.githubusercontent.com/u/5104286?v=4","gravatar_id":"","url":"https://api.github.com/users/benoit-pierre","html_url":"https://github.com/benoit-pierre","followers_url":"https://api.github.com/users/benoit-pierre/followers","following_url":"https://api.github.com/users/benoit-pierre/following{/other_user}","gists_url":"https://api.github.com/users/benoit-pierre/gists{/gist_id}","starred_url":"https://api.github.com/users/benoit-pierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoit-pierre/subscriptions","organizations_url":"https://api.github.com/users/benoit-pierre/orgs","repos_url":"https://api.github.com/users/benoit-pierre/repos","events_url":"https://api.github.com/users/benoit-pierre/events{/privacy}","received_events_url":"https://api.github.com/users/benoit-pierre/received_events","type":"User","site_admin":false},"body":"For Python 3.4 compatibility:\r\n```suggestion\r\n            subprocess.call(['xdg-open', CONFIG_DIR])\r\n```","created_at":"2018-11-18T10:40:47Z","updated_at":"2018-11-18T10:41:29Z","html_url":"https://github.com/openstenoproject/plover/pull/981#discussion_r234438314","pull_request_url":"https://api.github.com/repos/openstenoproject/plover/pulls/981","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openstenoproject/plover/pulls/comments/234438314"},"html":{"href":"https://github.com/openstenoproject/plover/pull/981#discussion_r234438314"},"pull_request":{"href":"https://api.github.com/repos/openstenoproject/plover/pulls/981"}}},"pull_request":{"url":"https://api.github.com/repos/openstenoproject/plover/pulls/981","id":199925574,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5OTI1NTc0","html_url":"https://github.com/openstenoproject/plover/pull/981","diff_url":"https://github.com/openstenoproject/plover/pull/981.diff","patch_url":"https://github.com/openstenoproject/plover/pull/981.patch","issue_url":"https://api.github.com/repos/openstenoproject/plover/issues/981","number":981,"state":"open","locked":false,"title":"gui_qt: Add open config folder action","user":{"login":"nsmarkop","id":4577561,"node_id":"MDQ6VXNlcjQ1Nzc1NjE=","avatar_url":"https://avatars3.githubusercontent.com/u/4577561?v=4","gravatar_id":"","url":"https://api.github.com/users/nsmarkop","html_url":"https://github.com/nsmarkop","followers_url":"https://api.github.com/users/nsmarkop/followers","following_url":"https://api.github.com/users/nsmarkop/following{/other_user}","gists_url":"https://api.github.com/users/nsmarkop/gists{/gist_id}","starred_url":"https://api.github.com/users/nsmarkop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsmarkop/subscriptions","organizations_url":"https://api.github.com/users/nsmarkop/orgs","repos_url":"https://api.github.com/users/nsmarkop/repos","events_url":"https://api.github.com/users/nsmarkop/events{/privacy}","received_events_url":"https://api.github.com/users/nsmarkop/received_events","type":"User","site_admin":false},"body":"<!-- 1. the issues (e.g. Fixes #123) or a description of the problem this PR fixes -->\r\nFixes #697.\r\n\r\n<!-- 2. Describe what you did, and if this PR has any open questions or requires more testing. -->\r\nI added an entry for \"Open config folder\" to the File menu that opens up the configuration folder.\r\n\r\n![image](https://user-images.githubusercontent.com/4577561/42416991-d356fb26-8242-11e8-9039-48cd4105c4f4.png)\r\n\r\nThe icon used is from [Icons8 Flat Color Icons](https://github.com/icons8/flat-color-icons).\r\n\r\nPerhaps the oddest part here is the use of webbrowser.open to open the folder. os.startfile is Windows exclusive, so I searched around for cross platform ways to open folders and files and ended up on that standard library function accomplishing the desired behavior despite the name. Alternatively something like this could be implemented, but I figured if webbrowser.open works it's simpler to rely on it:\r\n\r\n```python\r\nimport subprocess, os\r\nif sys.platform.startswith('darwin'):\r\n    subprocess.call(('open', filepath))\r\nelif os.name == 'nt':\r\n    os.startfile(filepath)\r\nelif os.name == 'posix':\r\n    subprocess.call(('xdg-open', filepath))\r\n```\r\n\r\nI've only verified behavior on Windows, so Mac / Linux testing would be nice.","created_at":"2018-07-08T05:05:54Z","updated_at":"2018-11-18T10:41:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6766b2896b3bf39c2760d17ddd65e377caf282c5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openstenoproject/plover/pulls/981/commits","review_comments_url":"https://api.github.com/repos/openstenoproject/plover/pulls/981/comments","review_comment_url":"https://api.github.com/repos/openstenoproject/plover/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openstenoproject/plover/issues/981/comments","statuses_url":"https://api.github.com/repos/openstenoproject/plover/statuses/4b42ad20d3e5ea125f17d51d1747600753aaf3fd","head":{"label":"nsmarkop:master","ref":"master","sha":"4b42ad20d3e5ea125f17d51d1747600753aaf3fd","user":{"login":"nsmarkop","id":4577561,"node_id":"MDQ6VXNlcjQ1Nzc1NjE=","avatar_url":"https://avatars3.githubusercontent.com/u/4577561?v=4","gravatar_id":"","url":"https://api.github.com/users/nsmarkop","html_url":"https://github.com/nsmarkop","followers_url":"https://api.github.com/users/nsmarkop/followers","following_url":"https://api.github.com/users/nsmarkop/following{/other_user}","gists_url":"https://api.github.com/users/nsmarkop/gists{/gist_id}","starred_url":"https://api.github.com/users/nsmarkop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsmarkop/subscriptions","organizations_url":"https://api.github.com/users/nsmarkop/orgs","repos_url":"https://api.github.com/users/nsmarkop/repos","events_url":"https://api.github.com/users/nsmarkop/events{/privacy}","received_events_url":"https://api.github.com/users/nsmarkop/received_events","type":"User","site_admin":false},"repo":{"id":116347980,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYzNDc5ODA=","name":"plover","full_name":"nsmarkop/plover","private":false,"owner":{"login":"nsmarkop","id":4577561,"node_id":"MDQ6VXNlcjQ1Nzc1NjE=","avatar_url":"https://avatars3.githubusercontent.com/u/4577561?v=4","gravatar_id":"","url":"https://api.github.com/users/nsmarkop","html_url":"https://github.com/nsmarkop","followers_url":"https://api.github.com/users/nsmarkop/followers","following_url":"https://api.github.com/users/nsmarkop/following{/other_user}","gists_url":"https://api.github.com/users/nsmarkop/gists{/gist_id}","starred_url":"https://api.github.com/users/nsmarkop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsmarkop/subscriptions","organizations_url":"https://api.github.com/users/nsmarkop/orgs","repos_url":"https://api.github.com/users/nsmarkop/repos","events_url":"https://api.github.com/users/nsmarkop/events{/privacy}","received_events_url":"https://api.github.com/users/nsmarkop/received_events","type":"User","site_admin":false},"html_url":"https://github.com/nsmarkop/plover","description":"Open source stenotype engine","fork":true,"url":"https://api.github.com/repos/nsmarkop/plover","forks_url":"https://api.github.com/repos/nsmarkop/plover/forks","keys_url":"https://api.github.com/repos/nsmarkop/plover/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nsmarkop/plover/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nsmarkop/plover/teams","hooks_url":"https://api.github.com/repos/nsmarkop/plover/hooks","issue_events_url":"https://api.github.com/repos/nsmarkop/plover/issues/events{/number}","events_url":"https://api.github.com/repos/nsmarkop/plover/events","assignees_url":"https://api.github.com/repos/nsmarkop/plover/assignees{/user}","branches_url":"https://api.github.com/repos/nsmarkop/plover/branches{/branch}","tags_url":"https://api.github.com/repos/nsmarkop/plover/tags","blobs_url":"https://api.github.com/repos/nsmarkop/plover/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nsmarkop/plover/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nsmarkop/plover/git/refs{/sha}","trees_url":"https://api.github.com/repos/nsmarkop/plover/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nsmarkop/plover/statuses/{sha}","languages_url":"https://api.github.com/repos/nsmarkop/plover/languages","stargazers_url":"https://api.github.com/repos/nsmarkop/plover/stargazers","contributors_url":"https://api.github.com/repos/nsmarkop/plover/contributors","subscribers_url":"https://api.github.com/repos/nsmarkop/plover/subscribers","subscription_url":"https://api.github.com/repos/nsmarkop/plover/subscription","commits_url":"https://api.github.com/repos/nsmarkop/plover/commits{/sha}","git_commits_url":"https://api.github.com/repos/nsmarkop/plover/git/commits{/sha}","comments_url":"https://api.github.com/repos/nsmarkop/plover/comments{/number}","issue_comment_url":"https://api.github.com/repos/nsmarkop/plover/issues/comments{/number}","contents_url":"https://api.github.com/repos/nsmarkop/plover/contents/{+path}","compare_url":"https://api.github.com/repos/nsmarkop/plover/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nsmarkop/plover/merges","archive_url":"https://api.github.com/repos/nsmarkop/plover/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nsmarkop/plover/downloads","issues_url":"https://api.github.com/repos/nsmarkop/plover/issues{/number}","pulls_url":"https://api.github.com/repos/nsmarkop/plover/pulls{/number}","milestones_url":"https://api.github.com/repos/nsmarkop/plover/milestones{/number}","notifications_url":"https://api.github.com/repos/nsmarkop/plover/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nsmarkop/plover/labels{/name}","releases_url":"https://api.github.com/repos/nsmarkop/plover/releases{/id}","deployments_url":"https://api.github.com/repos/nsmarkop/plover/deployments","created_at":"2018-01-05T05:57:40Z","updated_at":"2018-11-18T02:57:48Z","pushed_at":"2018-11-18T02:57:46Z","git_url":"git://github.com/nsmarkop/plover.git","ssh_url":"git@github.com:nsmarkop/plover.git","clone_url":"https://github.com/nsmarkop/plover.git","svn_url":"https://github.com/nsmarkop/plover","homepage":"http://opensteno.org/plover","size":21214,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openstenoproject:master","ref":"master","sha":"685bd3373dcf19817f59070274a33457ff145701","user":{"login":"openstenoproject","id":5880455,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4ODA0NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/5880455?v=4","gravatar_id":"","url":"https://api.github.com/users/openstenoproject","html_url":"https://github.com/openstenoproject","followers_url":"https://api.github.com/users/openstenoproject/followers","following_url":"https://api.github.com/users/openstenoproject/following{/other_user}","gists_url":"https://api.github.com/users/openstenoproject/gists{/gist_id}","starred_url":"https://api.github.com/users/openstenoproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstenoproject/subscriptions","organizations_url":"https://api.github.com/users/openstenoproject/orgs","repos_url":"https://api.github.com/users/openstenoproject/repos","events_url":"https://api.github.com/users/openstenoproject/events{/privacy}","received_events_url":"https://api.github.com/users/openstenoproject/received_events","type":"Organization","site_admin":false},"repo":{"id":4652212,"node_id":"MDEwOlJlcG9zaXRvcnk0NjUyMjEy","name":"plover","full_name":"openstenoproject/plover","private":false,"owner":{"login":"openstenoproject","id":5880455,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4ODA0NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/5880455?v=4","gravatar_id":"","url":"https://api.github.com/users/openstenoproject","html_url":"https://github.com/openstenoproject","followers_url":"https://api.github.com/users/openstenoproject/followers","following_url":"https://api.github.com/users/openstenoproject/following{/other_user}","gists_url":"https://api.github.com/users/openstenoproject/gists{/gist_id}","starred_url":"https://api.github.com/users/openstenoproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstenoproject/subscriptions","organizations_url":"https://api.github.com/users/openstenoproject/orgs","repos_url":"https://api.github.com/users/openstenoproject/repos","events_url":"https://api.github.com/users/openstenoproject/events{/privacy}","received_events_url":"https://api.github.com/users/openstenoproject/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openstenoproject/plover","description":"Open source stenotype engine","fork":false,"url":"https://api.github.com/repos/openstenoproject/plover","forks_url":"https://api.github.com/repos/openstenoproject/plover/forks","keys_url":"https://api.github.com/repos/openstenoproject/plover/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openstenoproject/plover/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openstenoproject/plover/teams","hooks_url":"https://api.github.com/repos/openstenoproject/plover/hooks","issue_events_url":"https://api.github.com/repos/openstenoproject/plover/issues/events{/number}","events_url":"https://api.github.com/repos/openstenoproject/plover/events","assignees_url":"https://api.github.com/repos/openstenoproject/plover/assignees{/user}","branches_url":"https://api.github.com/repos/openstenoproject/plover/branches{/branch}","tags_url":"https://api.github.com/repos/openstenoproject/plover/tags","blobs_url":"https://api.github.com/repos/openstenoproject/plover/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openstenoproject/plover/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openstenoproject/plover/git/refs{/sha}","trees_url":"https://api.github.com/repos/openstenoproject/plover/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openstenoproject/plover/statuses/{sha}","languages_url":"https://api.github.com/repos/openstenoproject/plover/languages","stargazers_url":"https://api.github.com/repos/openstenoproject/plover/stargazers","contributors_url":"https://api.github.com/repos/openstenoproject/plover/contributors","subscribers_url":"https://api.github.com/repos/openstenoproject/plover/subscribers","subscription_url":"https://api.github.com/repos/openstenoproject/plover/subscription","commits_url":"https://api.github.com/repos/openstenoproject/plover/commits{/sha}","git_commits_url":"https://api.github.com/repos/openstenoproject/plover/git/commits{/sha}","comments_url":"https://api.github.com/repos/openstenoproject/plover/comments{/number}","issue_comment_url":"https://api.github.com/repos/openstenoproject/plover/issues/comments{/number}","contents_url":"https://api.github.com/repos/openstenoproject/plover/contents/{+path}","compare_url":"https://api.github.com/repos/openstenoproject/plover/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openstenoproject/plover/merges","archive_url":"https://api.github.com/repos/openstenoproject/plover/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openstenoproject/plover/downloads","issues_url":"https://api.github.com/repos/openstenoproject/plover/issues{/number}","pulls_url":"https://api.github.com/repos/openstenoproject/plover/pulls{/number}","milestones_url":"https://api.github.com/repos/openstenoproject/plover/milestones{/number}","notifications_url":"https://api.github.com/repos/openstenoproject/plover/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openstenoproject/plover/labels{/name}","releases_url":"https://api.github.com/repos/openstenoproject/plover/releases{/id}","deployments_url":"https://api.github.com/repos/openstenoproject/plover/deployments","created_at":"2012-06-13T14:50:49Z","updated_at":"2018-11-14T00:35:36Z","pushed_at":"2018-11-18T02:57:48Z","git_url":"git://github.com/openstenoproject/plover.git","ssh_url":"git@github.com:openstenoproject/plover.git","clone_url":"https://github.com/openstenoproject/plover.git","svn_url":"https://github.com/openstenoproject/plover","homepage":"http://opensteno.org/plover","size":21231,"stargazers_count":589,"watchers_count":589,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":146,"mirror_url":null,"archived":false,"open_issues_count":125,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":146,"open_issues":125,"watchers":589,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openstenoproject/plover/pulls/981"},"html":{"href":"https://github.com/openstenoproject/plover/pull/981"},"issue":{"href":"https://api.github.com/repos/openstenoproject/plover/issues/981"},"comments":{"href":"https://api.github.com/repos/openstenoproject/plover/issues/981/comments"},"review_comments":{"href":"https://api.github.com/repos/openstenoproject/plover/pulls/981/comments"},"review_comment":{"href":"https://api.github.com/repos/openstenoproject/plover/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openstenoproject/plover/pulls/981/commits"},"statuses":{"href":"https://api.github.com/repos/openstenoproject/plover/statuses/4b42ad20d3e5ea125f17d51d1747600753aaf3fd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"benoit-pierre"}}