{"action":"created","comment":{"url":"https://api.github.com/repos/albertlauncher/python/pulls/comments/152861091","pull_request_review_id":78788236,"id":152861091,"diff_hunk":"@@ -0,0 +1,129 @@\n+\"\"\" CopyQ Clipboard Management \"\"\"\n+\n+import subprocess\n+from albertv0 import *\n+from shutil import which\n+\n+__iid__ = \"PythonInterface/v0.1\"\n+__prettyname__ = \"CopyQ\"\n+__version__ = \"1.0\"\n+__trigger__ = \"cq \"\n+__author__ = \"BarbUk, Benedict Dudel\"\n+__dependencies__ = [\"copyq\"]\n+\n+\n+if which(\"copyq\") is None:\n+    raise Exception(\"'copyq' is not in $PATH.\")\n+\n+iconPath = iconLookup('copyq')\n+\n+\n+def handleQuery(query):\n+    if query.isTriggered:\n+        if not query.string or query.string == \"\":\n+            return getLastItems()\n+\n+        item = searchItems(query.string)\n+        if not item == None:\n+            return item\n+\n+    return [Item(\n+            id=__prettyname__,\n+            icon=iconPath,\n+            text=__prettyname__,\n+            subtext=\"No entry found for your search query.\",\n+            completion=\"\",\n+            actions=[]\n+    )]\n+\n+def getLastItems():\n+    size = getStackSize()\n+    if size >= 14:\n+        size = 14\n+\n+    items = []\n+    for rowCounter in range(0, size):\n+        item = getCopyItem(rowCounter)\n+        if item == None:\n+            continue\n+\n+        items.append(item)\n+\n+    return items\n+\n+def searchItems(queryValue):\n+    item = searchItemByValue(queryValue)\n+    if not item == None:\n+        return [item]\n+\n+    item = searchItemByItemNumber(queryValue.strip())\n+    if not item == None:\n+        return [item]\n+\n+    return None\n+\n+def searchItemByValue(queryValue):\n+    size = getStackSize()\n+    if size >= 50:","path":"CopyQ.py","position":67,"original_position":67,"commit_id":"941e6fbf14f906ea5a2e9bd9e64d17ed04c23127","original_commit_id":"941e6fbf14f906ea5a2e9bd9e64d17ed04c23127","user":{"login":"raghuramos1987","id":740085,"avatar_url":"https://avatars3.githubusercontent.com/u/740085?v=4","gravatar_id":"","url":"https://api.github.com/users/raghuramos1987","html_url":"https://github.com/raghuramos1987","followers_url":"https://api.github.com/users/raghuramos1987/followers","following_url":"https://api.github.com/users/raghuramos1987/following{/other_user}","gists_url":"https://api.github.com/users/raghuramos1987/gists{/gist_id}","starred_url":"https://api.github.com/users/raghuramos1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raghuramos1987/subscriptions","organizations_url":"https://api.github.com/users/raghuramos1987/orgs","repos_url":"https://api.github.com/users/raghuramos1987/repos","events_url":"https://api.github.com/users/raghuramos1987/events{/privacy}","received_events_url":"https://api.github.com/users/raghuramos1987/received_events","type":"User","site_admin":false},"body":"why 50 specifically?","created_at":"2017-11-23T19:03:45Z","updated_at":"2017-11-23T19:05:11Z","html_url":"https://github.com/albertlauncher/python/pull/1#discussion_r152861091","pull_request_url":"https://api.github.com/repos/albertlauncher/python/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/albertlauncher/python/pulls/comments/152861091"},"html":{"href":"https://github.com/albertlauncher/python/pull/1#discussion_r152861091"},"pull_request":{"href":"https://api.github.com/repos/albertlauncher/python/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/albertlauncher/python/pulls/1","id":150411434,"html_url":"https://github.com/albertlauncher/python/pull/1","diff_url":"https://github.com/albertlauncher/python/pull/1.diff","patch_url":"https://github.com/albertlauncher/python/pull/1.patch","issue_url":"https://api.github.com/repos/albertlauncher/python/issues/1","number":1,"state":"open","locked":false,"title":"Add CopyQ extension for clipboard management","user":{"login":"benedictdudel","id":14878247,"avatar_url":"https://avatars2.githubusercontent.com/u/14878247?v=4","gravatar_id":"","url":"https://api.github.com/users/benedictdudel","html_url":"https://github.com/benedictdudel","followers_url":"https://api.github.com/users/benedictdudel/followers","following_url":"https://api.github.com/users/benedictdudel/following{/other_user}","gists_url":"https://api.github.com/users/benedictdudel/gists{/gist_id}","starred_url":"https://api.github.com/users/benedictdudel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedictdudel/subscriptions","organizations_url":"https://api.github.com/users/benedictdudel/orgs","repos_url":"https://api.github.com/users/benedictdudel/repos","events_url":"https://api.github.com/users/benedictdudel/events{/privacy}","received_events_url":"https://api.github.com/users/benedictdudel/received_events","type":"User","site_admin":false},"body":"I migrated the old CopyQ extension and added the following features:\r\n\r\n- search by value or with copyq entry number\r\n- remove action to remove a specific clipboard item\r\n\r\nLet me know what you think!","created_at":"2017-11-02T21:42:41Z","updated_at":"2017-11-23T19:05:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4061a2aa21be503e0eadc16fd8dd991b6ab841c9","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/albertlauncher/python/pulls/1/commits","review_comments_url":"https://api.github.com/repos/albertlauncher/python/pulls/1/comments","review_comment_url":"https://api.github.com/repos/albertlauncher/python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/albertlauncher/python/issues/1/comments","statuses_url":"https://api.github.com/repos/albertlauncher/python/statuses/941e6fbf14f906ea5a2e9bd9e64d17ed04c23127","head":{"label":"benedictdudel:feature/copyq-extension","ref":"feature/copyq-extension","sha":"941e6fbf14f906ea5a2e9bd9e64d17ed04c23127","user":{"login":"benedictdudel","id":14878247,"avatar_url":"https://avatars2.githubusercontent.com/u/14878247?v=4","gravatar_id":"","url":"https://api.github.com/users/benedictdudel","html_url":"https://github.com/benedictdudel","followers_url":"https://api.github.com/users/benedictdudel/followers","following_url":"https://api.github.com/users/benedictdudel/following{/other_user}","gists_url":"https://api.github.com/users/benedictdudel/gists{/gist_id}","starred_url":"https://api.github.com/users/benedictdudel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedictdudel/subscriptions","organizations_url":"https://api.github.com/users/benedictdudel/orgs","repos_url":"https://api.github.com/users/benedictdudel/repos","events_url":"https://api.github.com/users/benedictdudel/events{/privacy}","received_events_url":"https://api.github.com/users/benedictdudel/received_events","type":"User","site_admin":false},"repo":{"id":109321282,"name":"python","full_name":"benedictdudel/python","owner":{"login":"benedictdudel","id":14878247,"avatar_url":"https://avatars2.githubusercontent.com/u/14878247?v=4","gravatar_id":"","url":"https://api.github.com/users/benedictdudel","html_url":"https://github.com/benedictdudel","followers_url":"https://api.github.com/users/benedictdudel/followers","following_url":"https://api.github.com/users/benedictdudel/following{/other_user}","gists_url":"https://api.github.com/users/benedictdudel/gists{/gist_id}","starred_url":"https://api.github.com/users/benedictdudel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedictdudel/subscriptions","organizations_url":"https://api.github.com/users/benedictdudel/orgs","repos_url":"https://api.github.com/users/benedictdudel/repos","events_url":"https://api.github.com/users/benedictdudel/events{/privacy}","received_events_url":"https://api.github.com/users/benedictdudel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benedictdudel/python","description":"A repository for the official Python extensions","fork":true,"url":"https://api.github.com/repos/benedictdudel/python","forks_url":"https://api.github.com/repos/benedictdudel/python/forks","keys_url":"https://api.github.com/repos/benedictdudel/python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benedictdudel/python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benedictdudel/python/teams","hooks_url":"https://api.github.com/repos/benedictdudel/python/hooks","issue_events_url":"https://api.github.com/repos/benedictdudel/python/issues/events{/number}","events_url":"https://api.github.com/repos/benedictdudel/python/events","assignees_url":"https://api.github.com/repos/benedictdudel/python/assignees{/user}","branches_url":"https://api.github.com/repos/benedictdudel/python/branches{/branch}","tags_url":"https://api.github.com/repos/benedictdudel/python/tags","blobs_url":"https://api.github.com/repos/benedictdudel/python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benedictdudel/python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benedictdudel/python/git/refs{/sha}","trees_url":"https://api.github.com/repos/benedictdudel/python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benedictdudel/python/statuses/{sha}","languages_url":"https://api.github.com/repos/benedictdudel/python/languages","stargazers_url":"https://api.github.com/repos/benedictdudel/python/stargazers","contributors_url":"https://api.github.com/repos/benedictdudel/python/contributors","subscribers_url":"https://api.github.com/repos/benedictdudel/python/subscribers","subscription_url":"https://api.github.com/repos/benedictdudel/python/subscription","commits_url":"https://api.github.com/repos/benedictdudel/python/commits{/sha}","git_commits_url":"https://api.github.com/repos/benedictdudel/python/git/commits{/sha}","comments_url":"https://api.github.com/repos/benedictdudel/python/comments{/number}","issue_comment_url":"https://api.github.com/repos/benedictdudel/python/issues/comments{/number}","contents_url":"https://api.github.com/repos/benedictdudel/python/contents/{+path}","compare_url":"https://api.github.com/repos/benedictdudel/python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benedictdudel/python/merges","archive_url":"https://api.github.com/repos/benedictdudel/python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benedictdudel/python/downloads","issues_url":"https://api.github.com/repos/benedictdudel/python/issues{/number}","pulls_url":"https://api.github.com/repos/benedictdudel/python/pulls{/number}","milestones_url":"https://api.github.com/repos/benedictdudel/python/milestones{/number}","notifications_url":"https://api.github.com/repos/benedictdudel/python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benedictdudel/python/labels{/name}","releases_url":"https://api.github.com/repos/benedictdudel/python/releases{/id}","deployments_url":"https://api.github.com/repos/benedictdudel/python/deployments","created_at":"2017-11-02T21:35:04Z","updated_at":"2017-11-02T21:35:06Z","pushed_at":"2017-11-12T14:49:58Z","git_url":"git://github.com/benedictdudel/python.git","ssh_url":"git@github.com:benedictdudel/python.git","clone_url":"https://github.com/benedictdudel/python.git","svn_url":"https://github.com/benedictdudel/python","homepage":null,"size":80,"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,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"albertlauncher:master","ref":"master","sha":"fa7b062b695566019fa9add82db642782a1f41c3","user":{"login":"albertlauncher","id":18707603,"avatar_url":"https://avatars0.githubusercontent.com/u/18707603?v=4","gravatar_id":"","url":"https://api.github.com/users/albertlauncher","html_url":"https://github.com/albertlauncher","followers_url":"https://api.github.com/users/albertlauncher/followers","following_url":"https://api.github.com/users/albertlauncher/following{/other_user}","gists_url":"https://api.github.com/users/albertlauncher/gists{/gist_id}","starred_url":"https://api.github.com/users/albertlauncher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertlauncher/subscriptions","organizations_url":"https://api.github.com/users/albertlauncher/orgs","repos_url":"https://api.github.com/users/albertlauncher/repos","events_url":"https://api.github.com/users/albertlauncher/events{/privacy}","received_events_url":"https://api.github.com/users/albertlauncher/received_events","type":"Organization","site_admin":false},"repo":{"id":107601840,"name":"python","full_name":"albertlauncher/python","owner":{"login":"albertlauncher","id":18707603,"avatar_url":"https://avatars0.githubusercontent.com/u/18707603?v=4","gravatar_id":"","url":"https://api.github.com/users/albertlauncher","html_url":"https://github.com/albertlauncher","followers_url":"https://api.github.com/users/albertlauncher/followers","following_url":"https://api.github.com/users/albertlauncher/following{/other_user}","gists_url":"https://api.github.com/users/albertlauncher/gists{/gist_id}","starred_url":"https://api.github.com/users/albertlauncher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertlauncher/subscriptions","organizations_url":"https://api.github.com/users/albertlauncher/orgs","repos_url":"https://api.github.com/users/albertlauncher/repos","events_url":"https://api.github.com/users/albertlauncher/events{/privacy}","received_events_url":"https://api.github.com/users/albertlauncher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/albertlauncher/python","description":"A repository for the official Python extensions","fork":false,"url":"https://api.github.com/repos/albertlauncher/python","forks_url":"https://api.github.com/repos/albertlauncher/python/forks","keys_url":"https://api.github.com/repos/albertlauncher/python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/albertlauncher/python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/albertlauncher/python/teams","hooks_url":"https://api.github.com/repos/albertlauncher/python/hooks","issue_events_url":"https://api.github.com/repos/albertlauncher/python/issues/events{/number}","events_url":"https://api.github.com/repos/albertlauncher/python/events","assignees_url":"https://api.github.com/repos/albertlauncher/python/assignees{/user}","branches_url":"https://api.github.com/repos/albertlauncher/python/branches{/branch}","tags_url":"https://api.github.com/repos/albertlauncher/python/tags","blobs_url":"https://api.github.com/repos/albertlauncher/python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/albertlauncher/python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/albertlauncher/python/git/refs{/sha}","trees_url":"https://api.github.com/repos/albertlauncher/python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/albertlauncher/python/statuses/{sha}","languages_url":"https://api.github.com/repos/albertlauncher/python/languages","stargazers_url":"https://api.github.com/repos/albertlauncher/python/stargazers","contributors_url":"https://api.github.com/repos/albertlauncher/python/contributors","subscribers_url":"https://api.github.com/repos/albertlauncher/python/subscribers","subscription_url":"https://api.github.com/repos/albertlauncher/python/subscription","commits_url":"https://api.github.com/repos/albertlauncher/python/commits{/sha}","git_commits_url":"https://api.github.com/repos/albertlauncher/python/git/commits{/sha}","comments_url":"https://api.github.com/repos/albertlauncher/python/comments{/number}","issue_comment_url":"https://api.github.com/repos/albertlauncher/python/issues/comments{/number}","contents_url":"https://api.github.com/repos/albertlauncher/python/contents/{+path}","compare_url":"https://api.github.com/repos/albertlauncher/python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/albertlauncher/python/merges","archive_url":"https://api.github.com/repos/albertlauncher/python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/albertlauncher/python/downloads","issues_url":"https://api.github.com/repos/albertlauncher/python/issues{/number}","pulls_url":"https://api.github.com/repos/albertlauncher/python/pulls{/number}","milestones_url":"https://api.github.com/repos/albertlauncher/python/milestones{/number}","notifications_url":"https://api.github.com/repos/albertlauncher/python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/albertlauncher/python/labels{/name}","releases_url":"https://api.github.com/repos/albertlauncher/python/releases{/id}","deployments_url":"https://api.github.com/repos/albertlauncher/python/deployments","created_at":"2017-10-19T21:42:50Z","updated_at":"2017-10-19T21:45:15Z","pushed_at":"2017-11-23T01:05:16Z","git_url":"git://github.com/albertlauncher/python.git","ssh_url":"git@github.com:albertlauncher/python.git","clone_url":"https://github.com/albertlauncher/python.git","svn_url":"https://github.com/albertlauncher/python","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/albertlauncher/python/pulls/1"},"html":{"href":"https://github.com/albertlauncher/python/pull/1"},"issue":{"href":"https://api.github.com/repos/albertlauncher/python/issues/1"},"comments":{"href":"https://api.github.com/repos/albertlauncher/python/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/albertlauncher/python/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/albertlauncher/python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/albertlauncher/python/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/albertlauncher/python/statuses/941e6fbf14f906ea5a2e9bd9e64d17ed04c23127"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"raghuramos1987"}}