{"action":"created","comment":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/comments/77249275","id":77249275,"diff_hunk":"@@ -0,0 +1,144 @@\n+# Introduction:\n+# -------------\n+# This is used to open an SQLite database that's installed on your computer to create a Fathead output\n+# that's specified in http://docs.duckduckhack.com/resources/fathead-overview.html\n+#\n+# Page Structure:\n+# ---------------\n+# There is no page structure here because we're essentially scraping a database. The only requirement is that you have XCode.\n+#\n+# Pipeline:\n+# ---------\n+# Read DB -> Scrape / Process -> Output\n+#\n+# How do I test this?\n+# ------------------\n+# You'll need to have XCode installed on your computer. It comes bundled with the documentation that we need.\n+#\n+# TODO:\n+# - Get disambiguations working\n+#\n+# Updates:\n+#\n+# August 30, 2016\n+# - Now works with DocSets included in XCode 7.3.1\n+\n+import sqlite3\n+import re\n+import sys\n+\n+reload(sys)\n+sys.setdefaultencoding('utf8')\n+\n+# These contains all of the API documentation\n+# It only has classes and methods--it doesn't have actual tutorials.\n+ios = \"/Applications/Xcode.app/Contents/Developer/Documentation/DocSets/com.apple.adc.documentation.iOS.docset/Contents/Resources/docSet.dsidx\"","path":"lib/fathead/apple_docs_ios/parse.py","position":35,"original_position":35,"commit_id":"8ac1de2d3219ece9ce63775def718703059f319d","original_commit_id":"8ac1de2d3219ece9ce63775def718703059f319d","user":{"login":"moollaza","id":873785,"avatar_url":"https://avatars.githubusercontent.com/u/873785?v=3","gravatar_id":"","url":"https://api.github.com/users/moollaza","html_url":"https://github.com/moollaza","followers_url":"https://api.github.com/users/moollaza/followers","following_url":"https://api.github.com/users/moollaza/following{/other_user}","gists_url":"https://api.github.com/users/moollaza/gists{/gist_id}","starred_url":"https://api.github.com/users/moollaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moollaza/subscriptions","organizations_url":"https://api.github.com/users/moollaza/orgs","repos_url":"https://api.github.com/users/moollaza/repos","events_url":"https://api.github.com/users/moollaza/events{/privacy}","received_events_url":"https://api.github.com/users/moollaza/received_events","type":"User","site_admin":false},"body":"`download/com.apple.adc.documentation.iOS.docset/Contents/Resources/docSet.dsidx` -- the script has to be run on our Linux production machines so this path is never going to exist.\r\n\r\nWe'll need a `fetch.sh` script that gets the docset from somewhere and puts it into a local `download/` folder","created_at":"2016-09-01T20:39:56Z","updated_at":"2016-09-01T20:39:56Z","html_url":"https://github.com/duckduckgo/zeroclickinfo-fathead/pull/354#discussion_r77249275","pull_request_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/354","_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/comments/77249275"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-fathead/pull/354#discussion_r77249275"},"pull_request":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/354"}}},"pull_request":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/354","id":83506305,"html_url":"https://github.com/duckduckgo/zeroclickinfo-fathead/pull/354","diff_url":"https://github.com/duckduckgo/zeroclickinfo-fathead/pull/354.diff","patch_url":"https://github.com/duckduckgo/zeroclickinfo-fathead/pull/354.patch","issue_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues/354","number":354,"state":"open","locked":false,"title":"Add Apple Docs for iOS","user":{"login":"jagtalon","id":81969,"avatar_url":"https://avatars.githubusercontent.com/u/81969?v=3","gravatar_id":"","url":"https://api.github.com/users/jagtalon","html_url":"https://github.com/jagtalon","followers_url":"https://api.github.com/users/jagtalon/followers","following_url":"https://api.github.com/users/jagtalon/following{/other_user}","gists_url":"https://api.github.com/users/jagtalon/gists{/gist_id}","starred_url":"https://api.github.com/users/jagtalon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagtalon/subscriptions","organizations_url":"https://api.github.com/users/jagtalon/orgs","repos_url":"https://api.github.com/users/jagtalon/repos","events_url":"https://api.github.com/users/jagtalon/events{/privacy}","received_events_url":"https://api.github.com/users/jagtalon/received_events","type":"User","site_admin":false},"body":"Changes:\r\n- Redirects so that things like \"nsstring length\", \"length nsstring\", and \"nsstring.length\" all work Fixes #282 \r\n- Splits it into two IAs because the triggers are different for each, e.g., \"ios nsstring\" should show apple_docs_ios and \"osx nsstring\" should show apple_docs_macos. Fixes #315 \r\n- SQLite query is now updated to work with XCode 7.3.1 docsets\r\n\r\nhttps://duck.co/ia/view/apple_docs_ios","created_at":"2016-08-31T18:40:22Z","updated_at":"2016-09-01T20:39:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd893ec98c229a8743b60c475ec715e3be745289","assignee":{"login":"moollaza","id":873785,"avatar_url":"https://avatars.githubusercontent.com/u/873785?v=3","gravatar_id":"","url":"https://api.github.com/users/moollaza","html_url":"https://github.com/moollaza","followers_url":"https://api.github.com/users/moollaza/followers","following_url":"https://api.github.com/users/moollaza/following{/other_user}","gists_url":"https://api.github.com/users/moollaza/gists{/gist_id}","starred_url":"https://api.github.com/users/moollaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moollaza/subscriptions","organizations_url":"https://api.github.com/users/moollaza/orgs","repos_url":"https://api.github.com/users/moollaza/repos","events_url":"https://api.github.com/users/moollaza/events{/privacy}","received_events_url":"https://api.github.com/users/moollaza/received_events","type":"User","site_admin":false},"assignees":[{"login":"moollaza","id":873785,"avatar_url":"https://avatars.githubusercontent.com/u/873785?v=3","gravatar_id":"","url":"https://api.github.com/users/moollaza","html_url":"https://github.com/moollaza","followers_url":"https://api.github.com/users/moollaza/followers","following_url":"https://api.github.com/users/moollaza/following{/other_user}","gists_url":"https://api.github.com/users/moollaza/gists{/gist_id}","starred_url":"https://api.github.com/users/moollaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moollaza/subscriptions","organizations_url":"https://api.github.com/users/moollaza/orgs","repos_url":"https://api.github.com/users/moollaza/repos","events_url":"https://api.github.com/users/moollaza/events{/privacy}","received_events_url":"https://api.github.com/users/moollaza/received_events","type":"User","site_admin":false},{"login":"MariagraziaAlastra","id":3652195,"avatar_url":"https://avatars.githubusercontent.com/u/3652195?v=3","gravatar_id":"","url":"https://api.github.com/users/MariagraziaAlastra","html_url":"https://github.com/MariagraziaAlastra","followers_url":"https://api.github.com/users/MariagraziaAlastra/followers","following_url":"https://api.github.com/users/MariagraziaAlastra/following{/other_user}","gists_url":"https://api.github.com/users/MariagraziaAlastra/gists{/gist_id}","starred_url":"https://api.github.com/users/MariagraziaAlastra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MariagraziaAlastra/subscriptions","organizations_url":"https://api.github.com/users/MariagraziaAlastra/orgs","repos_url":"https://api.github.com/users/MariagraziaAlastra/repos","events_url":"https://api.github.com/users/MariagraziaAlastra/events{/privacy}","received_events_url":"https://api.github.com/users/MariagraziaAlastra/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/354/commits","review_comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/354/comments","review_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/comments{/number}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues/354/comments","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/statuses/8ac1de2d3219ece9ce63775def718703059f319d","head":{"label":"duckduckgo:jag/ios","ref":"jag/ios","sha":"8ac1de2d3219ece9ce63775def718703059f319d","user":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"repo":{"id":1997918,"name":"zeroclickinfo-fathead","full_name":"duckduckgo/zeroclickinfo-fathead","owner":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duckduckgo/zeroclickinfo-fathead","description":"DuckDuckGo Instant Answers based on keyword data files","fork":false,"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead","forks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/forks","keys_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/teams","hooks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/events","assignees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/tags","blobs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/subscription","commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/merges","archive_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/downloads","issues_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/releases{/id}","deployments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/deployments","created_at":"2011-07-04T23:42:33Z","updated_at":"2016-09-01T20:25:16Z","pushed_at":"2016-09-01T18:30:25Z","git_url":"git://github.com/duckduckgo/zeroclickinfo-fathead.git","ssh_url":"git@github.com:duckduckgo/zeroclickinfo-fathead.git","clone_url":"https://github.com/duckduckgo/zeroclickinfo-fathead.git","svn_url":"https://github.com/duckduckgo/zeroclickinfo-fathead","homepage":"http://duckduckhack.com/","size":13094,"stargazers_count":152,"watchers_count":152,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":254,"mirror_url":null,"open_issues_count":101,"forks":254,"open_issues":101,"watchers":152,"default_branch":"master"}},"base":{"label":"duckduckgo:master","ref":"master","sha":"03d20bf1181b059faca575905bf747e294ebf5b8","user":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"repo":{"id":1997918,"name":"zeroclickinfo-fathead","full_name":"duckduckgo/zeroclickinfo-fathead","owner":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duckduckgo/zeroclickinfo-fathead","description":"DuckDuckGo Instant Answers based on keyword data files","fork":false,"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead","forks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/forks","keys_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/teams","hooks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/events","assignees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/tags","blobs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/subscription","commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/merges","archive_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/downloads","issues_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/releases{/id}","deployments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/deployments","created_at":"2011-07-04T23:42:33Z","updated_at":"2016-09-01T20:25:16Z","pushed_at":"2016-09-01T18:30:25Z","git_url":"git://github.com/duckduckgo/zeroclickinfo-fathead.git","ssh_url":"git@github.com:duckduckgo/zeroclickinfo-fathead.git","clone_url":"https://github.com/duckduckgo/zeroclickinfo-fathead.git","svn_url":"https://github.com/duckduckgo/zeroclickinfo-fathead","homepage":"http://duckduckhack.com/","size":13094,"stargazers_count":152,"watchers_count":152,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":254,"mirror_url":null,"open_issues_count":101,"forks":254,"open_issues":101,"watchers":152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/354"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-fathead/pull/354"},"issue":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues/354"},"comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/issues/354/comments"},"review_comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/354/comments"},"review_comment":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/pulls/354/commits"},"statuses":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-fathead/statuses/8ac1de2d3219ece9ce63775def718703059f319d"}}}}
{"actor":{"display_login":"moollaza"}}