{"action":"created","comment":{"url":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/comments/66582382","id":66582382,"diff_hunk":"@@ -0,0 +1,58 @@\n+# -*- coding: utf-8 -*-\n+import regex\n+from sefaria.model import *\n+from sources import functions\n+\n+\n+\"\"\"\n+TODO:\n+1. Create Regex\n+2. Pull all Tosafot References from Shaas\n+3. Convert each Tosafot to a String\n+4. Decide how to isolate targeted strings using regex\n+5. Replace the period with a dash\n+6. upload them using the API\n+\n+\"\"\"\n+\n+\n+def tosafotPeriodToDash():\n+    tosafotReferences = getCommentatorReferenceCollection(\"Tosafot\")\n+    listOfFixedTosafot = removeAllDashedTosafot(tosafotReferences)\n+\n+\n+def getCommentatorReferenceCollection(commentator):\n+    allRefs = []\n+    for mesechet in library.get_indexes_in_category('Bavli'):\n+        print(mesechet)\n+        allRefs.append(library.get_index(getReferenceName(commentator,mesechet)).all_segment_refs())\n+    return allRefs\n+\n+def getReferenceName(commentator, mesechet):\n+    return \"{} on {}\".format(commentator, mesechet)\n+\n+\n+\n+def removeAllDashedTosafot(tosafotReferences):\n+    selectedTosafot = []\n+    for mesechet in tosafotReferences:\n+        for eachComment in mesechet:\n+            commentary = TextChunk(eachComment,'he').as_string()\n+            theFirstDash = commentary.find('-')\n+            theFirstPeriod = commentary.find('.')\n+            if (theFirstDash != -1):\n+                if(theFirstPeriod < theFirstDash):\n+                    convertToTempList = list(commentary)\n+                    convertToTempList[theFirstPeriod] = ' -'","path":"sources/Scripts/tosafotPeriodToDash.py","position":46,"original_position":46,"commit_id":"8d48f8426c13b9fe644e34cb866fdc0e269e2603","original_commit_id":"8d48f8426c13b9fe644e34cb866fdc0e269e2603","user":{"login":"JonMosenkis","id":11008636,"avatar_url":"https://avatars.githubusercontent.com/u/11008636?v=3","gravatar_id":"","url":"https://api.github.com/users/JonMosenkis","html_url":"https://github.com/JonMosenkis","followers_url":"https://api.github.com/users/JonMosenkis/followers","following_url":"https://api.github.com/users/JonMosenkis/following{/other_user}","gists_url":"https://api.github.com/users/JonMosenkis/gists{/gist_id}","starred_url":"https://api.github.com/users/JonMosenkis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonMosenkis/subscriptions","organizations_url":"https://api.github.com/users/JonMosenkis/orgs","repos_url":"https://api.github.com/users/JonMosenkis/repos","events_url":"https://api.github.com/users/JonMosenkis/events{/privacy}","received_events_url":"https://api.github.com/users/JonMosenkis/received_events","type":"User","site_admin":false},"body":"commentary = commenatry.replace(u'-', u' .', 1)","created_at":"2016-06-10T09:03:25Z","updated_at":"2016-06-10T09:03:25Z","html_url":"https://github.com/Sefaria/Sefaria-Data/pull/79#discussion_r66582382","pull_request_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/comments/66582382"},"html":{"href":"https://github.com/Sefaria/Sefaria-Data/pull/79#discussion_r66582382"},"pull_request":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/79","id":73287166,"html_url":"https://github.com/Sefaria/Sefaria-Data/pull/79","diff_url":"https://github.com/Sefaria/Sefaria-Data/pull/79.diff","patch_url":"https://github.com/Sefaria/Sefaria-Data/pull/79.patch","issue_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/issues/79","number":79,"state":"open","locked":false,"title":"Fixed bug in Self Reference link script","user":{"login":"joshuagoldmeier","id":16867983,"avatar_url":"https://avatars.githubusercontent.com/u/16867983?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuagoldmeier","html_url":"https://github.com/joshuagoldmeier","followers_url":"https://api.github.com/users/joshuagoldmeier/followers","following_url":"https://api.github.com/users/joshuagoldmeier/following{/other_user}","gists_url":"https://api.github.com/users/joshuagoldmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuagoldmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuagoldmeier/subscriptions","organizations_url":"https://api.github.com/users/joshuagoldmeier/orgs","repos_url":"https://api.github.com/users/joshuagoldmeier/repos","events_url":"https://api.github.com/users/joshuagoldmeier/events{/privacy}","received_events_url":"https://api.github.com/users/joshuagoldmeier/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-09T21:14:27Z","updated_at":"2016-06-10T09:03:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ba0d58f198e1ba5f0b812f4247575478a0bb45a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/79/commits","review_comments_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/79/comments","review_comment_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/issues/79/comments","statuses_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/statuses/8d48f8426c13b9fe644e34cb866fdc0e269e2603","head":{"label":"joshuagoldmeier:master","ref":"master","sha":"8d48f8426c13b9fe644e34cb866fdc0e269e2603","user":{"login":"joshuagoldmeier","id":16867983,"avatar_url":"https://avatars.githubusercontent.com/u/16867983?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuagoldmeier","html_url":"https://github.com/joshuagoldmeier","followers_url":"https://api.github.com/users/joshuagoldmeier/followers","following_url":"https://api.github.com/users/joshuagoldmeier/following{/other_user}","gists_url":"https://api.github.com/users/joshuagoldmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuagoldmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuagoldmeier/subscriptions","organizations_url":"https://api.github.com/users/joshuagoldmeier/orgs","repos_url":"https://api.github.com/users/joshuagoldmeier/repos","events_url":"https://api.github.com/users/joshuagoldmeier/events{/privacy}","received_events_url":"https://api.github.com/users/joshuagoldmeier/received_events","type":"User","site_admin":false},"repo":{"id":60453974,"name":"Sefaria-Data","full_name":"joshuagoldmeier/Sefaria-Data","owner":{"login":"joshuagoldmeier","id":16867983,"avatar_url":"https://avatars.githubusercontent.com/u/16867983?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuagoldmeier","html_url":"https://github.com/joshuagoldmeier","followers_url":"https://api.github.com/users/joshuagoldmeier/followers","following_url":"https://api.github.com/users/joshuagoldmeier/following{/other_user}","gists_url":"https://api.github.com/users/joshuagoldmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuagoldmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuagoldmeier/subscriptions","organizations_url":"https://api.github.com/users/joshuagoldmeier/orgs","repos_url":"https://api.github.com/users/joshuagoldmeier/repos","events_url":"https://api.github.com/users/joshuagoldmeier/events{/privacy}","received_events_url":"https://api.github.com/users/joshuagoldmeier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshuagoldmeier/Sefaria-Data","description":"Source files, scripts and data imported to Sefaria.","fork":true,"url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data","forks_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/forks","keys_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/teams","hooks_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/hooks","issue_events_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/issues/events{/number}","events_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/events","assignees_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/assignees{/user}","branches_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/branches{/branch}","tags_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/tags","blobs_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/statuses/{sha}","languages_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/languages","stargazers_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/stargazers","contributors_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/contributors","subscribers_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/subscribers","subscription_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/subscription","commits_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/contents/{+path}","compare_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/merges","archive_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/downloads","issues_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/issues{/number}","pulls_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/pulls{/number}","milestones_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/milestones{/number}","notifications_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/labels{/name}","releases_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/releases{/id}","deployments_url":"https://api.github.com/repos/joshuagoldmeier/Sefaria-Data/deployments","created_at":"2016-06-05T10:07:25Z","updated_at":"2016-06-05T10:11:07Z","pushed_at":"2016-06-09T21:11:35Z","git_url":"git://github.com/joshuagoldmeier/Sefaria-Data.git","ssh_url":"git@github.com:joshuagoldmeier/Sefaria-Data.git","clone_url":"https://github.com/joshuagoldmeier/Sefaria-Data.git","svn_url":"https://github.com/joshuagoldmeier/Sefaria-Data","homepage":"http://www.sefaria.org","size":2009698,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"Sefaria:master","ref":"master","sha":"570a80904d828bd6e2953012ecc0638ea610e2cb","user":{"login":"Sefaria","id":15019224,"avatar_url":"https://avatars.githubusercontent.com/u/15019224?v=3","gravatar_id":"","url":"https://api.github.com/users/Sefaria","html_url":"https://github.com/Sefaria","followers_url":"https://api.github.com/users/Sefaria/followers","following_url":"https://api.github.com/users/Sefaria/following{/other_user}","gists_url":"https://api.github.com/users/Sefaria/gists{/gist_id}","starred_url":"https://api.github.com/users/Sefaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sefaria/subscriptions","organizations_url":"https://api.github.com/users/Sefaria/orgs","repos_url":"https://api.github.com/users/Sefaria/repos","events_url":"https://api.github.com/users/Sefaria/events{/privacy}","received_events_url":"https://api.github.com/users/Sefaria/received_events","type":"Organization","site_admin":false},"repo":{"id":5502765,"name":"Sefaria-Data","full_name":"Sefaria/Sefaria-Data","owner":{"login":"Sefaria","id":15019224,"avatar_url":"https://avatars.githubusercontent.com/u/15019224?v=3","gravatar_id":"","url":"https://api.github.com/users/Sefaria","html_url":"https://github.com/Sefaria","followers_url":"https://api.github.com/users/Sefaria/followers","following_url":"https://api.github.com/users/Sefaria/following{/other_user}","gists_url":"https://api.github.com/users/Sefaria/gists{/gist_id}","starred_url":"https://api.github.com/users/Sefaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sefaria/subscriptions","organizations_url":"https://api.github.com/users/Sefaria/orgs","repos_url":"https://api.github.com/users/Sefaria/repos","events_url":"https://api.github.com/users/Sefaria/events{/privacy}","received_events_url":"https://api.github.com/users/Sefaria/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sefaria/Sefaria-Data","description":"Source files, scripts and data imported to Sefaria.","fork":false,"url":"https://api.github.com/repos/Sefaria/Sefaria-Data","forks_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/forks","keys_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/teams","hooks_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/hooks","issue_events_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/issues/events{/number}","events_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/events","assignees_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/assignees{/user}","branches_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/branches{/branch}","tags_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/tags","blobs_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/statuses/{sha}","languages_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/languages","stargazers_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/stargazers","contributors_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/contributors","subscribers_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/subscribers","subscription_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/subscription","commits_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/contents/{+path}","compare_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/merges","archive_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/downloads","issues_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/issues{/number}","pulls_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls{/number}","milestones_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/milestones{/number}","notifications_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/labels{/name}","releases_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/releases{/id}","deployments_url":"https://api.github.com/repos/Sefaria/Sefaria-Data/deployments","created_at":"2012-08-22T00:18:38Z","updated_at":"2016-01-19T12:03:31Z","pushed_at":"2016-06-09T21:14:27Z","git_url":"git://github.com/Sefaria/Sefaria-Data.git","ssh_url":"git@github.com:Sefaria/Sefaria-Data.git","clone_url":"https://github.com/Sefaria/Sefaria-Data.git","svn_url":"https://github.com/Sefaria/Sefaria-Data","homepage":"http://www.sefaria.org","size":2021409,"stargazers_count":32,"watchers_count":32,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":1,"forks":28,"open_issues":1,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/79"},"html":{"href":"https://github.com/Sefaria/Sefaria-Data/pull/79"},"issue":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/issues/79"},"comments":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/Sefaria/Sefaria-Data/statuses/8d48f8426c13b9fe644e34cb866fdc0e269e2603"}}}}
{"actor":{"display_login":"JonMosenkis"}}