{"action":"created","comment":{"url":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/comments/338145496","pull_request_review_id":306017735,"id":338145496,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzODE0NTQ5Ng==","diff_hunk":"@@ -0,0 +1,198 @@\n+# Wagtail Content Import\n+\n+A module for Wagtail that provides functionality for importing page content from third-party sources.\n+Currently supports importing Google Docs into a StreamField.\n+\n+## Getting Started\n+\n+### Requirements:\n+* Django 2.2\n+* Wagtail 2.2\n+* Python 3\n+\n+### To install:\n+ 1. Run `python3 pip install wagtail-content-import`.\n+ 2. Add `'wagtail_content_import'` and `'wagtail_content_import.pickers.google'` to `INSTALLED_APPS`.\n+ \n+### To set up:\n+ Wagtail Google Docs integration relies on Google APIs, which you will first need to enable for your project:\n+\n+1. Navigate to the [Google API Library](https://console.developers.google.com/apis/library). Select a project for your Wagtail site, or create a new one now.\n+\n+2. Find and enable the [Google Docs](https://console.developers.google.com/apis/library/docs.googleapis.com) and [Google Drive](https://console.developers.google.com/apis/library/drive.googleapis.com) APIs.\n+    \n+3. Find and enable the [Google Picker](https://console.developers.google.com/apis/api/picker.googleapis.com) API, and copy its API key to the setting `GOOGLE_PICKER_API_KEY`.\n+\n+4. Open the [Credentials](https://console.developers.google.com/apis/credentials) page in the API Console.\n+\n+5. Select `Create credentials`, then `OAuth client ID`\n+\n+6. If you haven't already configured the consent screen, you will need to configure this now.\n+\n+    1. Under `Scopes for Google APIs`, click `Add scope`.\n+\n+    2. Add `../auth/documents.readonly` and `..auth/drive.readonly` scopes.\n+\n+        Note: adding these sensitive scopes means that you will need to submit your project for verification by Google to\n+        avoid user caps and warning pages during use.\n+        \n+    3. Add your domain to `Authorised domains`.\n+\n+ 7. For `Application type`, choose `Web application`\n+\n+ 8. Under `Authorised JavaScript origins`, add your domain.\n+\n+ 9. On the Credentials page, next to your Client ID, click the download item to download a JSON file of your client\n+    secret.\n+\n+ 10. Copy the text from this file, and use it to set `GOOGLE_OAUTH_CLIENT_CONFIG`.\n+\n+## Basic Usage\n+\n+1. To enable Google Docs import for a Page model, it should inherit from `ContentImportMixin` \n+(`wagtail_content_import.models.ContentImportMixin`). By default, content will be imported into into a StreamField called body\n+(see [Changing Import Fields](#Changing-Import-Fields) for how to change this).\n+\n+2. You'll then need to create a Mapper, which maps the parsed document into your StreamField blocks. Create a class deriving from `wagtail_content_import.mappers.streamfield.StreamFieldMapper`:\n+\n+    ```","path":"README.md","position":null,"original_position":58,"commit_id":"48ec224e83ddd9078eddbdbc7c6bb309f8bc8651","original_commit_id":"b15022b3e0ab630266161513164ed9a4cf555ac2","user":{"login":"jacobtoppm","id":55137073,"node_id":"MDQ6VXNlcjU1MTM3MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/55137073?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobtoppm","html_url":"https://github.com/jacobtoppm","followers_url":"https://api.github.com/users/jacobtoppm/followers","following_url":"https://api.github.com/users/jacobtoppm/following{/other_user}","gists_url":"https://api.github.com/users/jacobtoppm/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobtoppm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobtoppm/subscriptions","organizations_url":"https://api.github.com/users/jacobtoppm/orgs","repos_url":"https://api.github.com/users/jacobtoppm/repos","events_url":"https://api.github.com/users/jacobtoppm/events{/privacy}","received_events_url":"https://api.github.com/users/jacobtoppm/received_events","type":"User","site_admin":false},"body":"Thanks for the tip! I've added that now.","created_at":"2019-10-23T16:15:17Z","updated_at":"2019-10-23T16:15:17Z","html_url":"https://github.com/torchbox/wagtail-content-import/pull/10#discussion_r338145496","pull_request_url":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/10","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/comments/338145496"},"html":{"href":"https://github.com/torchbox/wagtail-content-import/pull/10#discussion_r338145496"},"pull_request":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/10"}},"in_reply_to_id":337991120},"pull_request":{"url":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/10","id":331483827,"node_id":"MDExOlB1bGxSZXF1ZXN0MzMxNDgzODI3","html_url":"https://github.com/torchbox/wagtail-content-import/pull/10","diff_url":"https://github.com/torchbox/wagtail-content-import/pull/10.diff","patch_url":"https://github.com/torchbox/wagtail-content-import/pull/10.patch","issue_url":"https://api.github.com/repos/torchbox/wagtail-content-import/issues/10","number":10,"state":"open","locked":false,"title":"13 docs","user":{"login":"jacobtoppm","id":55137073,"node_id":"MDQ6VXNlcjU1MTM3MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/55137073?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobtoppm","html_url":"https://github.com/jacobtoppm","followers_url":"https://api.github.com/users/jacobtoppm/followers","following_url":"https://api.github.com/users/jacobtoppm/following{/other_user}","gists_url":"https://api.github.com/users/jacobtoppm/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobtoppm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobtoppm/subscriptions","organizations_url":"https://api.github.com/users/jacobtoppm/orgs","repos_url":"https://api.github.com/users/jacobtoppm/repos","events_url":"https://api.github.com/users/jacobtoppm/events{/privacy}","received_events_url":"https://api.github.com/users/jacobtoppm/received_events","type":"User","site_admin":false},"body":"Adds first draft of README and further explanatory comments on classes.","created_at":"2019-10-23T11:13:38Z","updated_at":"2019-10-23T16:15:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34cf97e44d8ae6b740ade98c1036c6dcba708717","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/10/commits","review_comments_url":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/10/comments","review_comment_url":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/comments{/number}","comments_url":"https://api.github.com/repos/torchbox/wagtail-content-import/issues/10/comments","statuses_url":"https://api.github.com/repos/torchbox/wagtail-content-import/statuses/48ec224e83ddd9078eddbdbc7c6bb309f8bc8651","head":{"label":"torchbox:13-docs","ref":"13-docs","sha":"48ec224e83ddd9078eddbdbc7c6bb309f8bc8651","user":{"login":"torchbox","id":84015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MDE1","avatar_url":"https://avatars1.githubusercontent.com/u/84015?v=4","gravatar_id":"","url":"https://api.github.com/users/torchbox","html_url":"https://github.com/torchbox","followers_url":"https://api.github.com/users/torchbox/followers","following_url":"https://api.github.com/users/torchbox/following{/other_user}","gists_url":"https://api.github.com/users/torchbox/gists{/gist_id}","starred_url":"https://api.github.com/users/torchbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torchbox/subscriptions","organizations_url":"https://api.github.com/users/torchbox/orgs","repos_url":"https://api.github.com/users/torchbox/repos","events_url":"https://api.github.com/users/torchbox/events{/privacy}","received_events_url":"https://api.github.com/users/torchbox/received_events","type":"Organization","site_admin":false},"repo":{"id":192560062,"node_id":"MDEwOlJlcG9zaXRvcnkxOTI1NjAwNjI=","name":"wagtail-content-import","full_name":"torchbox/wagtail-content-import","private":false,"owner":{"login":"torchbox","id":84015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MDE1","avatar_url":"https://avatars1.githubusercontent.com/u/84015?v=4","gravatar_id":"","url":"https://api.github.com/users/torchbox","html_url":"https://github.com/torchbox","followers_url":"https://api.github.com/users/torchbox/followers","following_url":"https://api.github.com/users/torchbox/following{/other_user}","gists_url":"https://api.github.com/users/torchbox/gists{/gist_id}","starred_url":"https://api.github.com/users/torchbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torchbox/subscriptions","organizations_url":"https://api.github.com/users/torchbox/orgs","repos_url":"https://api.github.com/users/torchbox/repos","events_url":"https://api.github.com/users/torchbox/events{/privacy}","received_events_url":"https://api.github.com/users/torchbox/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/torchbox/wagtail-content-import","description":null,"fork":false,"url":"https://api.github.com/repos/torchbox/wagtail-content-import","forks_url":"https://api.github.com/repos/torchbox/wagtail-content-import/forks","keys_url":"https://api.github.com/repos/torchbox/wagtail-content-import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/torchbox/wagtail-content-import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/torchbox/wagtail-content-import/teams","hooks_url":"https://api.github.com/repos/torchbox/wagtail-content-import/hooks","issue_events_url":"https://api.github.com/repos/torchbox/wagtail-content-import/issues/events{/number}","events_url":"https://api.github.com/repos/torchbox/wagtail-content-import/events","assignees_url":"https://api.github.com/repos/torchbox/wagtail-content-import/assignees{/user}","branches_url":"https://api.github.com/repos/torchbox/wagtail-content-import/branches{/branch}","tags_url":"https://api.github.com/repos/torchbox/wagtail-content-import/tags","blobs_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/refs{/sha}","trees_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/torchbox/wagtail-content-import/statuses/{sha}","languages_url":"https://api.github.com/repos/torchbox/wagtail-content-import/languages","stargazers_url":"https://api.github.com/repos/torchbox/wagtail-content-import/stargazers","contributors_url":"https://api.github.com/repos/torchbox/wagtail-content-import/contributors","subscribers_url":"https://api.github.com/repos/torchbox/wagtail-content-import/subscribers","subscription_url":"https://api.github.com/repos/torchbox/wagtail-content-import/subscription","commits_url":"https://api.github.com/repos/torchbox/wagtail-content-import/commits{/sha}","git_commits_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/commits{/sha}","comments_url":"https://api.github.com/repos/torchbox/wagtail-content-import/comments{/number}","issue_comment_url":"https://api.github.com/repos/torchbox/wagtail-content-import/issues/comments{/number}","contents_url":"https://api.github.com/repos/torchbox/wagtail-content-import/contents/{+path}","compare_url":"https://api.github.com/repos/torchbox/wagtail-content-import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/torchbox/wagtail-content-import/merges","archive_url":"https://api.github.com/repos/torchbox/wagtail-content-import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/torchbox/wagtail-content-import/downloads","issues_url":"https://api.github.com/repos/torchbox/wagtail-content-import/issues{/number}","pulls_url":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls{/number}","milestones_url":"https://api.github.com/repos/torchbox/wagtail-content-import/milestones{/number}","notifications_url":"https://api.github.com/repos/torchbox/wagtail-content-import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/torchbox/wagtail-content-import/labels{/name}","releases_url":"https://api.github.com/repos/torchbox/wagtail-content-import/releases{/id}","deployments_url":"https://api.github.com/repos/torchbox/wagtail-content-import/deployments","created_at":"2019-06-18T14:47:22Z","updated_at":"2019-10-22T11:40:05Z","pushed_at":"2019-10-23T16:14:48Z","git_url":"git://github.com/torchbox/wagtail-content-import.git","ssh_url":"git@github.com:torchbox/wagtail-content-import.git","clone_url":"https://github.com/torchbox/wagtail-content-import.git","svn_url":"https://github.com/torchbox/wagtail-content-import","homepage":null,"size":60,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"torchbox:master","ref":"master","sha":"ef25e00b192fe8477f32325d2e4a51f9b619d94e","user":{"login":"torchbox","id":84015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MDE1","avatar_url":"https://avatars1.githubusercontent.com/u/84015?v=4","gravatar_id":"","url":"https://api.github.com/users/torchbox","html_url":"https://github.com/torchbox","followers_url":"https://api.github.com/users/torchbox/followers","following_url":"https://api.github.com/users/torchbox/following{/other_user}","gists_url":"https://api.github.com/users/torchbox/gists{/gist_id}","starred_url":"https://api.github.com/users/torchbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torchbox/subscriptions","organizations_url":"https://api.github.com/users/torchbox/orgs","repos_url":"https://api.github.com/users/torchbox/repos","events_url":"https://api.github.com/users/torchbox/events{/privacy}","received_events_url":"https://api.github.com/users/torchbox/received_events","type":"Organization","site_admin":false},"repo":{"id":192560062,"node_id":"MDEwOlJlcG9zaXRvcnkxOTI1NjAwNjI=","name":"wagtail-content-import","full_name":"torchbox/wagtail-content-import","private":false,"owner":{"login":"torchbox","id":84015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MDE1","avatar_url":"https://avatars1.githubusercontent.com/u/84015?v=4","gravatar_id":"","url":"https://api.github.com/users/torchbox","html_url":"https://github.com/torchbox","followers_url":"https://api.github.com/users/torchbox/followers","following_url":"https://api.github.com/users/torchbox/following{/other_user}","gists_url":"https://api.github.com/users/torchbox/gists{/gist_id}","starred_url":"https://api.github.com/users/torchbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torchbox/subscriptions","organizations_url":"https://api.github.com/users/torchbox/orgs","repos_url":"https://api.github.com/users/torchbox/repos","events_url":"https://api.github.com/users/torchbox/events{/privacy}","received_events_url":"https://api.github.com/users/torchbox/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/torchbox/wagtail-content-import","description":null,"fork":false,"url":"https://api.github.com/repos/torchbox/wagtail-content-import","forks_url":"https://api.github.com/repos/torchbox/wagtail-content-import/forks","keys_url":"https://api.github.com/repos/torchbox/wagtail-content-import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/torchbox/wagtail-content-import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/torchbox/wagtail-content-import/teams","hooks_url":"https://api.github.com/repos/torchbox/wagtail-content-import/hooks","issue_events_url":"https://api.github.com/repos/torchbox/wagtail-content-import/issues/events{/number}","events_url":"https://api.github.com/repos/torchbox/wagtail-content-import/events","assignees_url":"https://api.github.com/repos/torchbox/wagtail-content-import/assignees{/user}","branches_url":"https://api.github.com/repos/torchbox/wagtail-content-import/branches{/branch}","tags_url":"https://api.github.com/repos/torchbox/wagtail-content-import/tags","blobs_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/refs{/sha}","trees_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/torchbox/wagtail-content-import/statuses/{sha}","languages_url":"https://api.github.com/repos/torchbox/wagtail-content-import/languages","stargazers_url":"https://api.github.com/repos/torchbox/wagtail-content-import/stargazers","contributors_url":"https://api.github.com/repos/torchbox/wagtail-content-import/contributors","subscribers_url":"https://api.github.com/repos/torchbox/wagtail-content-import/subscribers","subscription_url":"https://api.github.com/repos/torchbox/wagtail-content-import/subscription","commits_url":"https://api.github.com/repos/torchbox/wagtail-content-import/commits{/sha}","git_commits_url":"https://api.github.com/repos/torchbox/wagtail-content-import/git/commits{/sha}","comments_url":"https://api.github.com/repos/torchbox/wagtail-content-import/comments{/number}","issue_comment_url":"https://api.github.com/repos/torchbox/wagtail-content-import/issues/comments{/number}","contents_url":"https://api.github.com/repos/torchbox/wagtail-content-import/contents/{+path}","compare_url":"https://api.github.com/repos/torchbox/wagtail-content-import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/torchbox/wagtail-content-import/merges","archive_url":"https://api.github.com/repos/torchbox/wagtail-content-import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/torchbox/wagtail-content-import/downloads","issues_url":"https://api.github.com/repos/torchbox/wagtail-content-import/issues{/number}","pulls_url":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls{/number}","milestones_url":"https://api.github.com/repos/torchbox/wagtail-content-import/milestones{/number}","notifications_url":"https://api.github.com/repos/torchbox/wagtail-content-import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/torchbox/wagtail-content-import/labels{/name}","releases_url":"https://api.github.com/repos/torchbox/wagtail-content-import/releases{/id}","deployments_url":"https://api.github.com/repos/torchbox/wagtail-content-import/deployments","created_at":"2019-06-18T14:47:22Z","updated_at":"2019-10-22T11:40:05Z","pushed_at":"2019-10-23T16:14:48Z","git_url":"git://github.com/torchbox/wagtail-content-import.git","ssh_url":"git@github.com:torchbox/wagtail-content-import.git","clone_url":"https://github.com/torchbox/wagtail-content-import.git","svn_url":"https://github.com/torchbox/wagtail-content-import","homepage":null,"size":60,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/10"},"html":{"href":"https://github.com/torchbox/wagtail-content-import/pull/10"},"issue":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/issues/10"},"comments":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/torchbox/wagtail-content-import/statuses/48ec224e83ddd9078eddbdbc7c6bb309f8bc8651"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jacobtoppm"}}