{"action":"opened","number":23,"pull_request":{"url":"https://api.github.com/repos/rails/weblog/pulls/23","id":27134537,"html_url":"https://github.com/rails/weblog/pull/23","diff_url":"https://github.com/rails/weblog/pull/23.diff","patch_url":"https://github.com/rails/weblog/pull/23.patch","issue_url":"https://api.github.com/repos/rails/weblog/issues/23","number":23,"state":"open","locked":false,"title":"Add script to import \"This Week in Rails\" newsletter","user":{"login":"pcreux","id":45299,"avatar_url":"https://avatars.githubusercontent.com/u/45299?v=3","gravatar_id":"","url":"https://api.github.com/users/pcreux","html_url":"https://github.com/pcreux","followers_url":"https://api.github.com/users/pcreux/followers","following_url":"https://api.github.com/users/pcreux/following{/other_user}","gists_url":"https://api.github.com/users/pcreux/gists{/gist_id}","starred_url":"https://api.github.com/users/pcreux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcreux/subscriptions","organizations_url":"https://api.github.com/users/pcreux/orgs","repos_url":"https://api.github.com/users/pcreux/repos","events_url":"https://api.github.com/users/pcreux/events{/privacy}","received_events_url":"https://api.github.com/users/pcreux/received_events","type":"User","site_admin":false},"body":"Here is a script to import [This Week in Rails](http://rails-weekly.goodbits.io/archive/) into the weblog. Give it the url of a newsletter and it generates a blog post in markdown format.\r\n\r\nIt requires the gem reverse_markdown. I did not want to make this a dependency of the weblog so you'll have to `gem install reverse_markdown`.\r\n\r\n\r\nHere is the result for the latest issue of This Week in Rails:\r\n\r\n[markdown](https://gist.github.com/pcreux/7aaea9b96396ae30e8c3)\r\n\r\n![this-week-in-rails](https://cloud.githubusercontent.com/assets/45299/5688284/2476e0d8-980a-11e4-9cb0-0e55acc6884c.png)\r\n","created_at":"2015-01-09T22:31:12Z","updated_at":"2015-01-09T22:31:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/weblog/pulls/23/commits","review_comments_url":"https://api.github.com/repos/rails/weblog/pulls/23/comments","review_comment_url":"https://api.github.com/repos/rails/weblog/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rails/weblog/issues/23/comments","statuses_url":"https://api.github.com/repos/rails/weblog/statuses/a2b191b5c40122b883666a018cf0590909c41d5f","head":{"label":"pcreux:import-this-week-in-rails","ref":"import-this-week-in-rails","sha":"a2b191b5c40122b883666a018cf0590909c41d5f","user":{"login":"pcreux","id":45299,"avatar_url":"https://avatars.githubusercontent.com/u/45299?v=3","gravatar_id":"","url":"https://api.github.com/users/pcreux","html_url":"https://github.com/pcreux","followers_url":"https://api.github.com/users/pcreux/followers","following_url":"https://api.github.com/users/pcreux/following{/other_user}","gists_url":"https://api.github.com/users/pcreux/gists{/gist_id}","starred_url":"https://api.github.com/users/pcreux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcreux/subscriptions","organizations_url":"https://api.github.com/users/pcreux/orgs","repos_url":"https://api.github.com/users/pcreux/repos","events_url":"https://api.github.com/users/pcreux/events{/privacy}","received_events_url":"https://api.github.com/users/pcreux/received_events","type":"User","site_admin":false},"repo":{"id":29037350,"name":"weblog","full_name":"pcreux/weblog","owner":{"login":"pcreux","id":45299,"avatar_url":"https://avatars.githubusercontent.com/u/45299?v=3","gravatar_id":"","url":"https://api.github.com/users/pcreux","html_url":"https://github.com/pcreux","followers_url":"https://api.github.com/users/pcreux/followers","following_url":"https://api.github.com/users/pcreux/following{/other_user}","gists_url":"https://api.github.com/users/pcreux/gists{/gist_id}","starred_url":"https://api.github.com/users/pcreux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcreux/subscriptions","organizations_url":"https://api.github.com/users/pcreux/orgs","repos_url":"https://api.github.com/users/pcreux/repos","events_url":"https://api.github.com/users/pcreux/events{/privacy}","received_events_url":"https://api.github.com/users/pcreux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcreux/weblog","description":"","fork":true,"url":"https://api.github.com/repos/pcreux/weblog","forks_url":"https://api.github.com/repos/pcreux/weblog/forks","keys_url":"https://api.github.com/repos/pcreux/weblog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcreux/weblog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcreux/weblog/teams","hooks_url":"https://api.github.com/repos/pcreux/weblog/hooks","issue_events_url":"https://api.github.com/repos/pcreux/weblog/issues/events{/number}","events_url":"https://api.github.com/repos/pcreux/weblog/events","assignees_url":"https://api.github.com/repos/pcreux/weblog/assignees{/user}","branches_url":"https://api.github.com/repos/pcreux/weblog/branches{/branch}","tags_url":"https://api.github.com/repos/pcreux/weblog/tags","blobs_url":"https://api.github.com/repos/pcreux/weblog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcreux/weblog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcreux/weblog/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcreux/weblog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcreux/weblog/statuses/{sha}","languages_url":"https://api.github.com/repos/pcreux/weblog/languages","stargazers_url":"https://api.github.com/repos/pcreux/weblog/stargazers","contributors_url":"https://api.github.com/repos/pcreux/weblog/contributors","subscribers_url":"https://api.github.com/repos/pcreux/weblog/subscribers","subscription_url":"https://api.github.com/repos/pcreux/weblog/subscription","commits_url":"https://api.github.com/repos/pcreux/weblog/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcreux/weblog/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcreux/weblog/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcreux/weblog/issues/comments/{number}","contents_url":"https://api.github.com/repos/pcreux/weblog/contents/{+path}","compare_url":"https://api.github.com/repos/pcreux/weblog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcreux/weblog/merges","archive_url":"https://api.github.com/repos/pcreux/weblog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcreux/weblog/downloads","issues_url":"https://api.github.com/repos/pcreux/weblog/issues{/number}","pulls_url":"https://api.github.com/repos/pcreux/weblog/pulls{/number}","milestones_url":"https://api.github.com/repos/pcreux/weblog/milestones{/number}","notifications_url":"https://api.github.com/repos/pcreux/weblog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcreux/weblog/labels{/name}","releases_url":"https://api.github.com/repos/pcreux/weblog/releases{/id}","created_at":"2015-01-09T22:01:50Z","updated_at":"2015-01-09T22:01:52Z","pushed_at":"2015-01-09T22:14:49Z","git_url":"git://github.com/pcreux/weblog.git","ssh_url":"git@github.com:pcreux/weblog.git","clone_url":"https://github.com/pcreux/weblog.git","svn_url":"https://github.com/pcreux/weblog","homepage":"http://weblog.rubyonrails.org","size":7762,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"rails:gh-pages","ref":"gh-pages","sha":"5a32c53fd5ace4152317108b601ee51491e549fa","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":3626330,"name":"weblog","full_name":"rails/weblog","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/weblog","description":"","fork":false,"url":"https://api.github.com/repos/rails/weblog","forks_url":"https://api.github.com/repos/rails/weblog/forks","keys_url":"https://api.github.com/repos/rails/weblog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/weblog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/weblog/teams","hooks_url":"https://api.github.com/repos/rails/weblog/hooks","issue_events_url":"https://api.github.com/repos/rails/weblog/issues/events{/number}","events_url":"https://api.github.com/repos/rails/weblog/events","assignees_url":"https://api.github.com/repos/rails/weblog/assignees{/user}","branches_url":"https://api.github.com/repos/rails/weblog/branches{/branch}","tags_url":"https://api.github.com/repos/rails/weblog/tags","blobs_url":"https://api.github.com/repos/rails/weblog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/weblog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/weblog/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/weblog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/weblog/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/weblog/languages","stargazers_url":"https://api.github.com/repos/rails/weblog/stargazers","contributors_url":"https://api.github.com/repos/rails/weblog/contributors","subscribers_url":"https://api.github.com/repos/rails/weblog/subscribers","subscription_url":"https://api.github.com/repos/rails/weblog/subscription","commits_url":"https://api.github.com/repos/rails/weblog/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/weblog/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/weblog/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/weblog/issues/comments/{number}","contents_url":"https://api.github.com/repos/rails/weblog/contents/{+path}","compare_url":"https://api.github.com/repos/rails/weblog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/weblog/merges","archive_url":"https://api.github.com/repos/rails/weblog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/weblog/downloads","issues_url":"https://api.github.com/repos/rails/weblog/issues{/number}","pulls_url":"https://api.github.com/repos/rails/weblog/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/weblog/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/weblog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/weblog/labels{/name}","releases_url":"https://api.github.com/repos/rails/weblog/releases{/id}","created_at":"2012-03-05T11:20:27Z","updated_at":"2015-01-06T20:17:41Z","pushed_at":"2015-01-06T20:17:41Z","git_url":"git://github.com/rails/weblog.git","ssh_url":"git@github.com:rails/weblog.git","clone_url":"https://github.com/rails/weblog.git","svn_url":"https://github.com/rails/weblog","homepage":"http://weblog.rubyonrails.org","size":7762,"stargazers_count":8,"watchers_count":8,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":8,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/weblog/pulls/23"},"html":{"href":"https://github.com/rails/weblog/pull/23"},"issue":{"href":"https://api.github.com/repos/rails/weblog/issues/23"},"comments":{"href":"https://api.github.com/repos/rails/weblog/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/weblog/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/weblog/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rails/weblog/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/rails/weblog/statuses/a2b191b5c40122b883666a018cf0590909c41d5f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":66,"deletions":0,"changed_files":1}}