{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/43134040","id":43134040,"diff_hunk":"@@ -1 +1,80 @@\n #include \"indexer/feature_meta.hpp\"\n+\n+namespace feature\n+{\n+string Metadata::GetWikiURL() const\n+{\n+  string value = this->Get(FMD_WIKIPEDIA);\n+  string::size_type i = value.find(':');\n+  if (i == string::npos)\n+    return string();\n+  return \"https://\" + value.substr(0, i) + \".wikipedia.org/wiki/\" + value.substr(i + 1);\n+}\n+\n+namespace\n+{\n+char HexToDec(char ch)\n+{\n+  if (ch >= '0' && ch <= '9')\n+    return ch - '0';\n+  if (ch >= 'a')\n+    ch -= 'a' - 'A';\n+  if (ch >= 'A' && ch <= 'F')\n+    return ch - 'A' + 10;\n+  return -1;\n+}","path":"indexer/feature_meta.cpp","position":25,"original_position":25,"commit_id":"d7b6f00519a9dde41c15b72b005176d00a2a7a50","original_commit_id":"d7b6f00519a9dde41c15b72b005176d00a2a7a50","user":{"login":"mpimenov","id":10366009,"avatar_url":"https://avatars.githubusercontent.com/u/10366009?v=3","gravatar_id":"","url":"https://api.github.com/users/mpimenov","html_url":"https://github.com/mpimenov","followers_url":"https://api.github.com/users/mpimenov/followers","following_url":"https://api.github.com/users/mpimenov/following{/other_user}","gists_url":"https://api.github.com/users/mpimenov/gists{/gist_id}","starred_url":"https://api.github.com/users/mpimenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpimenov/subscriptions","organizations_url":"https://api.github.com/users/mpimenov/orgs","repos_url":"https://api.github.com/users/mpimenov/repos","events_url":"https://api.github.com/users/mpimenov/events{/privacy}","received_events_url":"https://api.github.com/users/mpimenov/received_events","type":"User","site_admin":false},"body":"```}  // namespace``` и вверх (до namespace feature), пожалуйста\r\n","created_at":"2015-10-27T15:05:57Z","updated_at":"2015-10-27T15:05:57Z","html_url":"https://github.com/mapsme/omim/pull/397#discussion_r43134040","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/397","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/43134040"},"html":{"href":"https://github.com/mapsme/omim/pull/397#discussion_r43134040"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/397"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/397","id":48873813,"html_url":"https://github.com/mapsme/omim/pull/397","diff_url":"https://github.com/mapsme/omim/pull/397.diff","patch_url":"https://github.com/mapsme/omim/pull/397.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/397","number":397,"state":"open","locked":false,"title":"[metadata] Add GetWikiTitle and GetWikiURL methods","user":{"login":"Zverik","id":766031,"avatar_url":"https://avatars.githubusercontent.com/u/766031?v=3","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"body":"В place page нужно выводить ссылку на вики. Я тут добавил два метода, чтобы проще получить саму ссылку и её текст.","created_at":"2015-10-27T13:59:52Z","updated_at":"2015-10-27T15:05:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cdc3fae6c4bd8ceae8fbbd61f246767429fb9ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/397/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/397/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/397/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/d7b6f00519a9dde41c15b72b005176d00a2a7a50","head":{"label":"Zverik:wiki_methods","ref":"wiki_methods","sha":"d7b6f00519a9dde41c15b72b005176d00a2a7a50","user":{"login":"Zverik","id":766031,"avatar_url":"https://avatars.githubusercontent.com/u/766031?v=3","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"repo":{"id":43427426,"name":"omim","full_name":"Zverik/omim","owner":{"login":"Zverik","id":766031,"avatar_url":"https://avatars.githubusercontent.com/u/766031?v=3","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zverik/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/Zverik/omim","forks_url":"https://api.github.com/repos/Zverik/omim/forks","keys_url":"https://api.github.com/repos/Zverik/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zverik/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zverik/omim/teams","hooks_url":"https://api.github.com/repos/Zverik/omim/hooks","issue_events_url":"https://api.github.com/repos/Zverik/omim/issues/events{/number}","events_url":"https://api.github.com/repos/Zverik/omim/events","assignees_url":"https://api.github.com/repos/Zverik/omim/assignees{/user}","branches_url":"https://api.github.com/repos/Zverik/omim/branches{/branch}","tags_url":"https://api.github.com/repos/Zverik/omim/tags","blobs_url":"https://api.github.com/repos/Zverik/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zverik/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zverik/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zverik/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zverik/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/Zverik/omim/languages","stargazers_url":"https://api.github.com/repos/Zverik/omim/stargazers","contributors_url":"https://api.github.com/repos/Zverik/omim/contributors","subscribers_url":"https://api.github.com/repos/Zverik/omim/subscribers","subscription_url":"https://api.github.com/repos/Zverik/omim/subscription","commits_url":"https://api.github.com/repos/Zverik/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zverik/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zverik/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zverik/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zverik/omim/contents/{+path}","compare_url":"https://api.github.com/repos/Zverik/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zverik/omim/merges","archive_url":"https://api.github.com/repos/Zverik/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zverik/omim/downloads","issues_url":"https://api.github.com/repos/Zverik/omim/issues{/number}","pulls_url":"https://api.github.com/repos/Zverik/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/Zverik/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/Zverik/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zverik/omim/labels{/name}","releases_url":"https://api.github.com/repos/Zverik/omim/releases{/id}","created_at":"2015-09-30T10:43:06Z","updated_at":"2015-09-30T10:45:15Z","pushed_at":"2015-10-27T14:57:39Z","git_url":"git://github.com/Zverik/omim.git","ssh_url":"git@github.com:Zverik/omim.git","clone_url":"https://github.com/Zverik/omim.git","svn_url":"https://github.com/Zverik/omim","homepage":null,"size":1798336,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"mapsme:master","ref":"master","sha":"14cf32318752ab0151c2006cf1b008db773d4c22","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","created_at":"2015-09-20T02:57:13Z","updated_at":"2015-10-27T13:36:43Z","pushed_at":"2015-10-27T15:00:53Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":null,"size":1830591,"stargazers_count":1419,"watchers_count":1419,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":150,"mirror_url":null,"open_issues_count":46,"forks":150,"open_issues":46,"watchers":1419,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/397"},"html":{"href":"https://github.com/mapsme/omim/pull/397"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/397"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/397/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/397/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/397/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/d7b6f00519a9dde41c15b72b005176d00a2a7a50"}}}}