GitHub PullRequestReviewCommentEvent at 2014-10-30 19:55:37
Repository: translators
Actor: zuphilip
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/zotero/translators/pulls/comments/19631819","id":19631819,"diff_hunk":"@@ -87,17 +88,92 @@ function doWeb(doc, url) {\n \t\n }\n \n+// scrape documents that are only in the beck-online \"Leitsatz-Kartei\", i.e. \n+// where only information about the article, not the article itself is in beck-online\n+function scrapeLSK(doc, url) {\n+\tvar\titem = new Zotero.Item(mappingClassNameToItemType['LSK']);\n+\t\n+\tvar description = ZU.xpathText(doc, \"//*[@id='dokument']/h1\");\n+\tvar descriptionItems = description.split(':');\n+\n+\t//authors\n+\tvar authorsString = descriptionItems[0];\n+\t\n+\tvar authors = authorsString.split(\"/\");\n+\tvar authorsItems = new Array();\n+\n+\tfor (var index = 0; index < authors.length; ++index) {\n+\t\tvar author = Zotero.Utilities.trimInternal(authors[index]);\n+\t\tauthorsItems.push ( Zotero.Utilities.cleanAuthor(author, 'author', false) );\n+\t}\n+\titem.creators = authorsItems;\n+\t\n+\t//title\n+\titem.title = ZU.trimInternal(descriptionItems[1]);\n+\t\n+\t// src\n+\tvar src = ZU.xpathText(doc, \"//div[@class='lsk-fundst']/ul/li\");\n+\t\n+\t//date \n+\tvar date = src.match(/\\d\\d\\d\\d+/g);\n+\t\n+\t// some articles do not have a date\n+\tif (date) {\n+\t\titem.date = date[0];\n+\t}\n+\telse {\n+\t\t// if we cannot determine date, leave it blank\n+\t\titem.date = \"\";\n+\t}\n+\t\n+\t//journal\n+\tvar journalStr = src.substr(0, src.indexOf(date)-1);","path":"beck-online.js","position":62,"original_position":62,"commit_id":"68379a9a7db8fc64e6368c0338ce0ee9761bb64a","original_commit_id":"b92ac15844f23bb4d70a5651f39fc9f15211c4bc","user":{"login":"zuphilip","id":5199995,"avatar_url":"https://avatars.githubusercontent.com/u/5199995?v=2","gravatar_id":"","url":"https://api.github.com/users/zuphilip","html_url":"https://github.com/zuphilip","followers_url":"https://api.github.com/users/zuphilip/followers","following_url":"https://api.github.com/users/zuphilip/following{/other_user}","gists_url":"https://api.github.com/users/zuphilip/gists{/gist_id}","starred_url":"https://api.github.com/users/zuphilip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zuphilip/subscriptions","organizations_url":"https://api.github.com/users/zuphilip/orgs","repos_url":"https://api.github.com/users/zuphilip/repos","events_url":"https://api.github.com/users/zuphilip/events{/privacy}","received_events_url":"https://api.github.com/users/zuphilip/received_events","type":"User","site_admin":false},"body":"I was refering to the line\r\n```\r\nvar journalStr = src.substr(0, src.indexOf(date)-1);\r\n```\r\nif `date=undef`, then src.indexOf will be something?","created_at":"2014-10-30T19:55:37Z","updated_at":"2014-10-30T19:55:37Z","html_url":"https://github.com/zotero/translators/pull/793#discussion_r19631819","pull_request_url":"https://api.github.com/repos/zotero/translators/pulls/793","_links":{"self":{"href":"https://api.github.com/repos/zotero/translators/pulls/comments/19631819"},"html":{"href":"https://github.com/zotero/translators/pull/793#discussion_r19631819"},"pull_request":{"href":"https://api.github.com/repos/zotero/translators/pulls/793"}}},"pull_request":{"url":"https://api.github.com/repos/zotero/translators/pulls/793","id":23563624,"html_url":"https://github.com/zotero/translators/pull/793","diff_url":"https://github.com/zotero/translators/pull/793.diff","patch_url":"https://github.com/zotero/translators/pull/793.patch","issue_url":"https://api.github.com/repos/zotero/translators/issues/793","number":793,"state":"open","locked":false,"title":"Update beck-online.js","user":{"login":"rm2342","id":9452312,"avatar_url":"https://avatars.githubusercontent.com/u/9452312?v=2","gravatar_id":"","url":"https://api.github.com/users/rm2342","html_url":"https://github.com/rm2342","followers_url":"https://api.github.com/users/rm2342/followers","following_url":"https://api.github.com/users/rm2342/following{/other_user}","gists_url":"https://api.github.com/users/rm2342/gists{/gist_id}","starred_url":"https://api.github.com/users/rm2342/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rm2342/subscriptions","organizations_url":"https://api.github.com/users/rm2342/orgs","repos_url":"https://api.github.com/users/rm2342/repos","events_url":"https://api.github.com/users/rm2342/events{/privacy}","received_events_url":"https://api.github.com/users/rm2342/received_events","type":"User","site_admin":false},"body":"1. beck-online.js\r\nAdded support for beck-online \"Leitsatzkartei\" LSK (database of leading records), i.e. scraping of articles where beck-online does not have the article itself but only information about the article\r\n\r\n2. juris\r\nAdded new translator for the German legal database Juris.","created_at":"2014-10-29T20:49:56Z","updated_at":"2014-10-30T19:55:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc2d15d9f37a847f732906aa52388573c3551862","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zotero/translators/pulls/793/commits","review_comments_url":"https://api.github.com/repos/zotero/translators/pulls/793/comments","review_comment_url":"https://api.github.com/repos/zotero/translators/pulls/comments/{number}","comments_url":"https://api.github.com/repos/zotero/translators/issues/793/comments","statuses_url":"https://api.github.com/repos/zotero/translators/statuses/68379a9a7db8fc64e6368c0338ce0ee9761bb64a","head":{"label":"rm2342:master","ref":"master","sha":"68379a9a7db8fc64e6368c0338ce0ee9761bb64a","user":{"login":"rm2342","id":9452312,"avatar_url":"https://avatars.githubusercontent.com/u/9452312?v=2","gravatar_id":"","url":"https://api.github.com/users/rm2342","html_url":"https://github.com/rm2342","followers_url":"https://api.github.com/users/rm2342/followers","following_url":"https://api.github.com/users/rm2342/following{/other_user}","gists_url":"https://api.github.com/users/rm2342/gists{/gist_id}","starred_url":"https://api.github.com/users/rm2342/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rm2342/subscriptions","organizations_url":"https://api.github.com/users/rm2342/orgs","repos_url":"https://api.github.com/users/rm2342/repos","events_url":"https://api.github.com/users/rm2342/events{/privacy}","received_events_url":"https://api.github.com/users/rm2342/received_events","type":"User","site_admin":false},"repo":{"id":25939069,"name":"translators","full_name":"rm2342/translators","owner":{"login":"rm2342","id":9452312,"avatar_url":"https://avatars.githubusercontent.com/u/9452312?v=2","gravatar_id":"","url":"https://api.github.com/users/rm2342","html_url":"https://github.com/rm2342","followers_url":"https://api.github.com/users/rm2342/followers","following_url":"https://api.github.com/users/rm2342/following{/other_user}","gists_url":"https://api.github.com/users/rm2342/gists{/gist_id}","starred_url":"https://api.github.com/users/rm2342/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rm2342/subscriptions","organizations_url":"https://api.github.com/users/rm2342/orgs","repos_url":"https://api.github.com/users/rm2342/repos","events_url":"https://api.github.com/users/rm2342/events{/privacy}","received_events_url":"https://api.github.com/users/rm2342/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rm2342/translators","description":"Zotero Translators","fork":true,"url":"https://api.github.com/repos/rm2342/translators","forks_url":"https://api.github.com/repos/rm2342/translators/forks","keys_url":"https://api.github.com/repos/rm2342/translators/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rm2342/translators/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rm2342/translators/teams","hooks_url":"https://api.github.com/repos/rm2342/translators/hooks","issue_events_url":"https://api.github.com/repos/rm2342/translators/issues/events{/number}","events_url":"https://api.github.com/repos/rm2342/translators/events","assignees_url":"https://api.github.com/repos/rm2342/translators/assignees{/user}","branches_url":"https://api.github.com/repos/rm2342/translators/branches{/branch}","tags_url":"https://api.github.com/repos/rm2342/translators/tags","blobs_url":"https://api.github.com/repos/rm2342/translators/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rm2342/translators/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rm2342/translators/git/refs{/sha}","trees_url":"https://api.github.com/repos/rm2342/translators/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rm2342/translators/statuses/{sha}","languages_url":"https://api.github.com/repos/rm2342/translators/languages","stargazers_url":"https://api.github.com/repos/rm2342/translators/stargazers","contributors_url":"https://api.github.com/repos/rm2342/translators/contributors","subscribers_url":"https://api.github.com/repos/rm2342/translators/subscribers","subscription_url":"https://api.github.com/repos/rm2342/translators/subscription","commits_url":"https://api.github.com/repos/rm2342/translators/commits{/sha}","git_commits_url":"https://api.github.com/repos/rm2342/translators/git/commits{/sha}","comments_url":"https://api.github.com/repos/rm2342/translators/comments{/number}","issue_comment_url":"https://api.github.com/repos/rm2342/translators/issues/comments/{number}","contents_url":"https://api.github.com/repos/rm2342/translators/contents/{+path}","compare_url":"https://api.github.com/repos/rm2342/translators/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rm2342/translators/merges","archive_url":"https://api.github.com/repos/rm2342/translators/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rm2342/translators/downloads","issues_url":"https://api.github.com/repos/rm2342/translators/issues{/number}","pulls_url":"https://api.github.com/repos/rm2342/translators/pulls{/number}","milestones_url":"https://api.github.com/repos/rm2342/translators/milestones{/number}","notifications_url":"https://api.github.com/repos/rm2342/translators/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rm2342/translators/labels{/name}","releases_url":"https://api.github.com/repos/rm2342/translators/releases{/id}","created_at":"2014-10-29T20:04:10Z","updated_at":"2014-10-29T20:42:46Z","pushed_at":"2014-10-30T19:30:35Z","git_url":"git://github.com/rm2342/translators.git","ssh_url":"git@github.com:rm2342/translators.git","clone_url":"https://github.com/rm2342/translators.git","svn_url":"https://github.com/rm2342/translators","homepage":"http://www.zotero.org/support/dev/translators","size":18424,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"zotero:master","ref":"master","sha":"79f344e78b91bd24dcc18ac93c8f6975b258bd74","user":{"login":"zotero","id":891917,"avatar_url":"https://avatars.githubusercontent.com/u/891917?v=2","gravatar_id":"","url":"https://api.github.com/users/zotero","html_url":"https://github.com/zotero","followers_url":"https://api.github.com/users/zotero/followers","following_url":"https://api.github.com/users/zotero/following{/other_user}","gists_url":"https://api.github.com/users/zotero/gists{/gist_id}","starred_url":"https://api.github.com/users/zotero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotero/subscriptions","organizations_url":"https://api.github.com/users/zotero/orgs","repos_url":"https://api.github.com/users/zotero/repos","events_url":"https://api.github.com/users/zotero/events{/privacy}","received_events_url":"https://api.github.com/users/zotero/received_events","type":"Organization","site_admin":false},"repo":{"id":1991863,"name":"translators","full_name":"zotero/translators","owner":{"login":"zotero","id":891917,"avatar_url":"https://avatars.githubusercontent.com/u/891917?v=2","gravatar_id":"","url":"https://api.github.com/users/zotero","html_url":"https://github.com/zotero","followers_url":"https://api.github.com/users/zotero/followers","following_url":"https://api.github.com/users/zotero/following{/other_user}","gists_url":"https://api.github.com/users/zotero/gists{/gist_id}","starred_url":"https://api.github.com/users/zotero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotero/subscriptions","organizations_url":"https://api.github.com/users/zotero/orgs","repos_url":"https://api.github.com/users/zotero/repos","events_url":"https://api.github.com/users/zotero/events{/privacy}","received_events_url":"https://api.github.com/users/zotero/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zotero/translators","description":"Zotero Translators","fork":false,"url":"https://api.github.com/repos/zotero/translators","forks_url":"https://api.github.com/repos/zotero/translators/forks","keys_url":"https://api.github.com/repos/zotero/translators/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zotero/translators/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zotero/translators/teams","hooks_url":"https://api.github.com/repos/zotero/translators/hooks","issue_events_url":"https://api.github.com/repos/zotero/translators/issues/events{/number}","events_url":"https://api.github.com/repos/zotero/translators/events","assignees_url":"https://api.github.com/repos/zotero/translators/assignees{/user}","branches_url":"https://api.github.com/repos/zotero/translators/branches{/branch}","tags_url":"https://api.github.com/repos/zotero/translators/tags","blobs_url":"https://api.github.com/repos/zotero/translators/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zotero/translators/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zotero/translators/git/refs{/sha}","trees_url":"https://api.github.com/repos/zotero/translators/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zotero/translators/statuses/{sha}","languages_url":"https://api.github.com/repos/zotero/translators/languages","stargazers_url":"https://api.github.com/repos/zotero/translators/stargazers","contributors_url":"https://api.github.com/repos/zotero/translators/contributors","subscribers_url":"https://api.github.com/repos/zotero/translators/subscribers","subscription_url":"https://api.github.com/repos/zotero/translators/subscription","commits_url":"https://api.github.com/repos/zotero/translators/commits{/sha}","git_commits_url":"https://api.github.com/repos/zotero/translators/git/commits{/sha}","comments_url":"https://api.github.com/repos/zotero/translators/comments{/number}","issue_comment_url":"https://api.github.com/repos/zotero/translators/issues/comments/{number}","contents_url":"https://api.github.com/repos/zotero/translators/contents/{+path}","compare_url":"https://api.github.com/repos/zotero/translators/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zotero/translators/merges","archive_url":"https://api.github.com/repos/zotero/translators/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zotero/translators/downloads","issues_url":"https://api.github.com/repos/zotero/translators/issues{/number}","pulls_url":"https://api.github.com/repos/zotero/translators/pulls{/number}","milestones_url":"https://api.github.com/repos/zotero/translators/milestones{/number}","notifications_url":"https://api.github.com/repos/zotero/translators/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zotero/translators/labels{/name}","releases_url":"https://api.github.com/repos/zotero/translators/releases{/id}","created_at":"2011-07-03T17:40:38Z","updated_at":"2014-10-29T10:21:01Z","pushed_at":"2014-10-28T22:06:16Z","git_url":"git://github.com/zotero/translators.git","ssh_url":"git@github.com:zotero/translators.git","clone_url":"https://github.com/zotero/translators.git","svn_url":"https://github.com/zotero/translators","homepage":"http://www.zotero.org/support/dev/translators","size":18424,"stargazers_count":121,"watchers_count":121,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":111,"forks":104,"open_issues":111,"watchers":121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zotero/translators/pulls/793"},"html":{"href":"https://github.com/zotero/translators/pull/793"},"issue":{"href":"https://api.github.com/repos/zotero/translators/issues/793"},"comments":{"href":"https://api.github.com/repos/zotero/translators/issues/793/comments"},"review_comments":{"href":"https://api.github.com/repos/zotero/translators/pulls/793/comments"},"review_comment":{"href":"https://api.github.com/repos/zotero/translators/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/zotero/translators/pulls/793/commits"},"statuses":{"href":"https://api.github.com/repos/zotero/translators/statuses/68379a9a7db8fc64e6368c0338ce0ee9761bb64a"}}}}